diff cfsan_centriflaken.xml @ 123:b9c76c256e2c

planemo upload
author kkonganti
date Wed, 03 Jul 2024 12:54:16 -0400
parents b6fcae1983cb
children 45ccd0403784
line wrap: on
line diff
--- a/cfsan_centriflaken.xml	Wed Jul 03 12:13:14 2024 -0400
+++ b/cfsan_centriflaken.xml	Wed Jul 03 12:54:16 2024 -0400
@@ -5,11 +5,11 @@
     </requirements>    
     <version_command>nextflow -version</version_command>
     <command detect_errors="exit_code"><![CDATA[
-	mkdir -p cpipes-input || exit 1;
-    pwd_path=\$(pwd);
     time_stamp=\$(date +%Y-%m-%d-%s);
     work_dir="/galaxy/nf-work-dirs/centriflaken_work_dir-"\${time_stamp};
+    input_path="\${work_dir}/cpipes-input"
     mkdir -p \$work_dir || exit 1;
+    mkdir -p "\${input_path}" || exit 1;
     #import re
     #if (str($input_read_type_cond.input_read_type) == "single_long"):
 	    #for _, $unpaired in enumerate($input_read_type_cond.input):
@@ -18,7 +18,7 @@
                 #set read1_ext = re.sub('fastqsanger', 'fastq', str($unpaired.ext))
                 #set read1 = str($unpaired.name) + str('.') + $read1_ext
             #end if
-            ln -sf '$unpaired' './cpipes-input/$read1';
+            ln -sf '$unpaired' "\${input_path}/$read1";
 	    #end for
     #elif (str($input_read_type_cond.input_read_type) == "paired"):
 	    #for _, $pair in enumerate($input_read_type_cond.input_pair)
@@ -32,11 +32,11 @@
             #if not str($pair.reverse.name).endswith(('.fastq', '.fastq.gz')):
                 #set read_R2 = $read_R2 + str('.') + $read_R2_ext
             #end if
-	        ln -sf '$pair.forward' './cpipes-input/$read_R1';
-	        ln -sf '$pair.reverse' './cpipes-input/$read_R2';
+	        ln -sf '$pair.forward' "\${input_path}/$read_R1";
+	        ln -sf '$pair.reverse' "\${input_path}/$read_R2";
 	    #end for
     #end if
-	$__tool_directory__/0.4.2/cpipes
+	nextflow /galaxy/cfsan-centriflaken-db/0.4.2/cpipes
     --pipeline $input_read_type_cond.pipeline_cond.pipeline
     -work-dir \${work_dir}
     #if ($input_read_type_cond.pipeline_cond.pipeline == "centriflaken"):
@@ -60,8 +60,8 @@
             --fq_single_end false --fq2_suffix '${input_read_type_cond.fq2_suffix}'
         #end if
     #end if
-	--input \${pwd_path}/cpipes-input
-	--output \${pwd_path}/cpipes-output
+	--input \${input_path}
+	--output \${work_dir}/cpipes-output
     --fq_suffix '${input_read_type_cond.fq_suffix}'
     #if ($fq_filter_by_len != ""):
         --fq_filter_by_len $fq_filter_by_len
@@ -73,10 +73,9 @@
         --seqkit_rmdup_run true
     #end if
 	-profile gxkubernetes;
-    mv './cpipes-output/${input_read_type_cond.pipeline_cond.pipeline}-multiqc/multiqc_report.html' './multiqc_report.html' > /dev/null 2>&1 || exit 1;
-    mv './cpipes-output/${input_read_type_cond.pipeline_cond.pipeline}-results/kraken2_extract_contigs' kraken2_extract_contigs > /dev/null 2>&1 || exit 1;
-    rm -rf ./cpipes-output > /dev/null 2>&1 || exit 1;
-    rm -rf ./work > /dev/null 2>&1 || exit 1
+    mv "\${work_dir}/cpipes-output/${input_read_type_cond.pipeline_cond.pipeline}-multiqc/multiqc_report.html" './multiqc_report.html' > /dev/null 2>&1 || exit 1;
+    mv "\${work_dir}/cpipes-output/${input_read_type_cond.pipeline_cond.pipeline}-results/kraken2_extract_contigs" kraken2_extract_contigs > /dev/null 2>&1 || exit 1;
+    rm -rf "\${work_dir}/cpipes-output" > /dev/null 2>&1 || exit 1;
     ]]></command>
     <inputs>
         <conditional name="input_read_type_cond">