diff --git a/nextflow/configs/profiles/sumner2.config b/nextflow/configs/profiles/sumner2.config index bc2e10f..8f79707 100644 --- a/nextflow/configs/profiles/sumner2.config +++ b/nextflow/configs/profiles/sumner2.config @@ -183,7 +183,7 @@ process { container = "/projects/kumar-lab/meta/images/JABS-behavior-classifier/headless/v0.36.1/latest.sif" } withLabel: "jabs_postprocess" { - container = "/projects/kumar-lab/meta/images/JABS-postprocess/jabs-postprocess/v0.3.1/latest.sif" + container = "/projects/kumar-lab/meta/images/JABS-postprocess/jabs-postprocess/v0.4.0/latest.sif" } withLabel: "jabs_table_convert" { container = "/projects/kumar-lab/meta/images/mouse-tracking-runtime/RBase/v0.1.2/latest.sif" diff --git a/nextflow/modules/jabs_classifiers.nf b/nextflow/modules/jabs_classifiers.nf index 6f9efc8..9c4162b 100644 --- a/nextflow/modules/jabs_classifiers.nf +++ b/nextflow/modules/jabs_classifiers.nf @@ -103,14 +103,22 @@ process GENERATE_BEHAVIOR_TABLES { tuple path("${in_pose.baseName}*_bouts.csv"), path("${in_pose.baseName}*_summaries.csv"), emit: files script: + def behaviorJson = groovy.json.JsonOutput.toJson([ + behaviors: classifiers.collect { entry -> + [ + behavior: entry.key, + stitch_gap: entry.value.stitch_value, + min_bout_length: entry.value.filter_value + ] + } + ]) """ - behavior_command="--behavior ${classifiers.collect { entry -> "$entry.key --stitch-gap $entry.value.stitch_value --min-bout-length $entry.value.filter_value" }.join(' --behavior ')}" jabs-postprocess generate-tables \ --project-folder . \ --feature-folder . \ --out-prefix ${in_pose.baseName} \ --out-bin-size 5 \ - \${behavior_command} + --behavior-config '${behaviorJson}' """ }