Skip to content

Commit 1044c63

Browse files
committed
Update main workflow with changes to single_mouse_classifier objects
1 parent f6433ba commit 1044c63

File tree

2 files changed

+6
-74
lines changed

2 files changed

+6
-74
lines changed

nextflow/configs/profiles/sumner2.config

Lines changed: 4 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
workDir = "/flashscratch/${USER}/nextflow-work"
44

5+
includeConfig { "/projects/kumar-lab/data/jabs/classifiers/v0.37.0/latest.config" }
6+
57
params {
68
/*
79
* Additional Parameters for the sumner2 profile
@@ -14,10 +16,6 @@ params {
1416
* - filter_processed: whether to filter processed files in the batch
1517

1618
* - jabs_version: version of JABS used for the classifiers
17-
* - classifier_project_folders: directory containing the classifier project folders
18-
* - classifier_training_file_folder: directory containing the classifier training files
19-
* - exported_classifier_folder: directory containing the exported classifiers
20-
* - classifier_artifact_suffix: suffix for the classifier artifacts
2119
* - classifier_window_sizes: window sizes cached for use in classifiers
2220
* - single_mouse_classifiers: classifiers for single mouse behavior. Each classifier is described as
2321
behavior name (identical key used in JABS): [
@@ -37,75 +35,10 @@ params {
3735
heuristic_classifier_folder = "/JABS-postprocess/heuristic_classifiers/"
3836
filter_processed = false
3937

40-
jabs_version = "0.18.1"
41-
classifier_project_folders = "/projects/kumar-lab/multimouse-pipeline/nextflow-artifacts/project_folders/"
42-
classifier_training_file_folder = "/projects/kumar-lab/multimouse-pipeline/nextflow-artifacts/training_files/"
43-
exported_classifier_folder = "/projects/kumar-lab/multimouse-pipeline/nextflow-artifacts/exported_classifiers/"
44-
classifier_artifact_suffix = "_classifier_v${jabs_version}.pickle"
38+
jabs_version = "v0.37.0"
4539
classifier_window_sizes = [2, 5, 10, 20, 30, 60]
4640
// Classifiers are described as behavior_name: project_folder
47-
single_mouse_classifiers = [
48-
"grooming": [
49-
"project_folder_name": "grooming",
50-
"stitch_value": 10*30,
51-
"filter_value": 3*30,
52-
],
53-
"scratch": [
54-
"project_folder_name": "jabs-paper",
55-
"stitch_value": 5,
56-
"filter_value": 5,
57-
],
58-
// "Leg_splaying": [ // Currently can't be exported successfully
59-
// "project_folder_name": "ptz",
60-
// "stitch_value": 5,
61-
// "filter_value": 5,
62-
// ],
63-
"Side_seizure": [
64-
"project_folder_name": "ptz",
65-
"stitch_value": 5,
66-
"filter_value": 5,
67-
],
68-
"Tail_jerk": [
69-
"project_folder_name": "ptz",
70-
"stitch_value": 5,
71-
"filter_value": 5,
72-
],
73-
"Wild_jumping": [
74-
"project_folder_name": "ptz",
75-
"stitch_value": 5,
76-
"filter_value": 5,
77-
],
78-
"Escape": [
79-
"project_folder_name": "jabs-vivek",
80-
"stitch_value": 5,
81-
"filter_value": 5,
82-
],
83-
"Rearing_supported": [
84-
"project_folder_name": "jabs-vivek",
85-
"stitch_value": 5,
86-
"filter_value": 5,
87-
],
88-
"Rearing_unsupported": [
89-
"project_folder_name": "jabs-vivek",
90-
"stitch_value": 5,
91-
"filter_value": 5,
92-
],
93-
"Turn_left": [
94-
"project_folder_name": "jabs-vivek",
95-
"stitch_value": 5,
96-
"filter_value": 5,
97-
],
98-
"Turn_right": [
99-
"project_folder_name": "jabs-vivek",
100-
"stitch_value": 5,
101-
"filter_value": 5,
102-
],
103-
// "Jerk": [ // Needs to be re-exported to remove static object features (unavailable for single mouse)
104-
// "project_folder_name": "social-play",
105-
// "stitch_value": 1,
106-
// "filter_value": 6,
107-
// ]
108-
]
41+
10942
heuristic_classifiers = ["corner", "corner_facing", "freeze", "locomotion", "periphery", "wall_facing"]
11043

11144
// Number of 5-minute bins for transforming summary tables into bins

nextflow/modules/jabs_classifiers.nf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ process PREDICT_CLASSIFIERS {
6767

6868
script:
6969
"""
70-
for classifier in ${classifiers.keySet().collect { params.exported_classifier_folder + it + params.classifier_artifact_suffix }.join(' ')};
70+
for classifier_path in ${classifiers.collect { _behavior, details -> details.classifier_path }.join(' ')};
7171
do
72-
ln -s \${classifier} .
73-
jabs-classify classify --classifier \$(basename \${classifier}) --input-pose ${in_pose} --out-dir . --feature-dir .
72+
jabs-classify classify --classifier "\${classifier_path}" --input-pose ${in_pose} --out-dir . --feature-dir .
7473
done
7574
"""
7675
}

0 commit comments

Comments
 (0)