From e63662489aff80e4c211e601f5f6d8312762905d Mon Sep 17 00:00:00 2001 From: thalassemia Date: Thu, 28 Nov 2024 03:59:51 -0800 Subject: [PATCH] Quote paths in Nextflow script to handle spaces --- runscripts/nextflow/analysis.nf | 20 ++++++++++---------- runscripts/nextflow/sim.nf | 4 ++-- runscripts/nextflow/template.nf | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/runscripts/nextflow/analysis.nf b/runscripts/nextflow/analysis.nf index 604d30890..53e10a4c7 100644 --- a/runscripts/nextflow/analysis.nf +++ b/runscripts/nextflow/analysis.nf @@ -24,8 +24,8 @@ process analysisSingle { --lineage_seed $lineage_seed \\ --generation $generation \\ --agent_id "$agent_id" \\ - --variant_metadata_path ${variant_metadata} \\ - -o \$(pwd)/plots \\ + --variant_metadata_path "${variant_metadata}" \\ + -o "\$(pwd)/plots" \\ -t single cd plots cd experiment_id=* @@ -71,8 +71,8 @@ process analysisMultiDaughter { --variant $variant \\ --lineage_seed $lineage_seed \\ --generation $generation \\ - --variant_metadata_path ${variant_metadata} \\ - -o \$(pwd)/plots \\ + --variant_metadata_path "${variant_metadata}" \\ + -o "\$(pwd)/plots" \\ -t multidaughter cd plots cd experiment_id=* @@ -116,8 +116,8 @@ process analysisMultiGeneration { --experiment_id "$experiment_id" \\ --variant $variant \\ --lineage_seed $lineage_seed \\ - --variant_metadata_path ${variant_metadata} \\ - -o \$(pwd)/plots \\ + --variant_metadata_path "${variant_metadata}" \\ + -o "\$(pwd)/plots" \\ -t multigeneration cd plots cd experiment_id=* @@ -159,8 +159,8 @@ process analysisMultiSeed { --validation_data_path "$kb/validationData.cPickle" \\ --experiment_id "$experiment_id" \\ --variant $variant \\ - --variant_metadata_path ${variant_metadata} \\ - -o \$(pwd)/plots \\ + --variant_metadata_path "${variant_metadata}" \\ + -o "\$(pwd)/plots" \\ -t multiseed cd plots cd experiment_id=* @@ -199,8 +199,8 @@ process analysisMultiVariant { --validation_data_path "$kb/validationData.cPickle" \\ --experiment_id "$experiment_id" \\ --variant ${variant.join(" ")} \\ - --variant_metadata_path ${variant_metadata} \\ - -o \$(pwd)/plots \\ + --variant_metadata_path "${variant_metadata}" \\ + -o "\$(pwd)/plots" \\ -t multivariant cd plots cd experiment_id=* diff --git a/runscripts/nextflow/sim.nf b/runscripts/nextflow/sim.nf index 48b44745e..d1d3968a3 100644 --- a/runscripts/nextflow/sim.nf +++ b/runscripts/nextflow/sim.nf @@ -29,7 +29,7 @@ process simGen0 { PYTHONPATH=${params.projectRoot} python ${params.projectRoot}/ecoli/experiments/ecoli_master_sim.py \\ --config $config \\ --sim_data_path $sim_data \\ - --daughter_outdir \$(pwd) \\ + --daughter_outdir "\$(pwd)" \\ --variant ${sim_data.getBaseName()} \\ --seed ${lineage_seed} \\ --lineage_seed ${lineage_seed} \\ @@ -79,7 +79,7 @@ process sim { --config $config \\ --sim_data_path $sim_data \\ --initial_state_file ${initial_state.getBaseName()} \\ - --daughter_outdir \$(pwd) \\ + --daughter_outdir "\$(pwd)" \\ --variant ${sim_data.getBaseName()} \\ --seed ${sim_seed} \\ --lineage_seed ${lineage_seed} \\ diff --git a/runscripts/nextflow/template.nf b/runscripts/nextflow/template.nf index 662c2b370..825d17d85 100644 --- a/runscripts/nextflow/template.nf +++ b/runscripts/nextflow/template.nf @@ -12,7 +12,7 @@ process runParca { script: """ - PYTHONPATH=${params.projectRoot} python ${params.projectRoot}/runscripts/parca.py --config $config -o \$(pwd) + PYTHONPATH=${params.projectRoot} python ${params.projectRoot}/runscripts/parca.py --config "$config" -o "\$(pwd)" """ stub: @@ -37,10 +37,10 @@ process analysisParca { script: """ - PYTHONPATH=${params.projectRoot} python ${params.projectRoot}/runscripts/analysis.py --config $config \ - --sim_data_path=$kb/simData.cPickle \ - --validation_data_path=$kb/validationData.cPickle \ - -o \$(pwd)/plots \ + PYTHONPATH=${params.projectRoot} python ${params.projectRoot}/runscripts/analysis.py --config "$config" \ + --sim_data_path="$kb/simData.cPickle" \ + --validation_data_path="$kb/validationData.cPickle" \ + -o "\$(pwd)/plots" \ -t parca """ @@ -66,7 +66,7 @@ process createVariants { script: """ PYTHONPATH=${params.projectRoot} python ${params.projectRoot}/runscripts/create_variants.py \ - --config $config --kb $kb -o \$(pwd) + --config "$config" --kb "$kb" -o "\$(pwd)" """ stub: