changeset 13:f5fdf41c08b8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cutadapt commit 1663496ce146a311569a340b0b809dc5127e0830
author iuc
date Tue, 12 Jun 2018 15:38:04 -0400
parents 78e1cf88d133
children c76ee709ffb9
files cutadapt.xml
diffstat 1 files changed, 116 insertions(+), 119 deletions(-) [+]
line wrap: on
line diff
--- a/cutadapt.xml	Thu May 24 18:24:08 2018 -0400
+++ b/cutadapt.xml	Tue Jun 12 15:38:04 2018 -0400
@@ -10,138 +10,135 @@
     <version_command>cutadapt --version</version_command>
 
     <command detect_errors="exit_code"><![CDATA[
-
-        ## Link in the input and output files, so Cutadapt can tell their type
+## Link in the input and output files, so Cutadapt can tell their type
 
-        #import re
-        #set format = "fastq"
-        #set read1 = "input_f"
-        #set read2 = "input_r"
-        #set paired = False
-        #set library_type = str($library.type)
-        #if $library_type == 'paired':
-        #set paired = True
-        #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier))
-        #set read2 = re.sub('[^\w\-\s]', '_', str($library.input_2.element_identifier))
-        #set input_1 = $library.input_1
-        #set input_2 = $library.input_2
-        #else if $library_type == 'paired_collection'
-        #set paired = True
-        #set input_1 = $library.input_1.forward
-        #set input_2 = $library.input_1.reverse
-        #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.name))
-        #else
-        #set input_1 = $library.input_1
-        #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier))
-        #end if
+#import re
+#set read1 = "input_f"
+#set read2 = "input_r"
+#set paired = False
+#set library_type = str($library.type)
+#if $library_type == 'paired':
+#set paired = True
+#set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier))
+#set read2 = re.sub('[^\w\-\s]', '_', str($library.input_2.element_identifier))
+#set input_1 = $library.input_1
+#set input_2 = $library.input_2
+#else if $library_type == 'paired_collection'
+#set paired = True
+#set input_1 = $library.input_1.forward
+#set input_2 = $library.input_1.reverse
+#set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.name))
+#else
+#set input_1 = $library.input_1
+#set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier))
+#end if
 
-        #if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"):
-            #set read1 = $read1 + ".fq.gz"
-            #set out1 = "out1.gz"
-        #else if $input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"):
-            #set read1 = $read1 + ".fq.bz2"
-            #set out1 = "out1.bz2"
-        #else if $input_1.is_of_type('fasta'):
-            #set format = "fasta"
-            #set read1 = $read1 + ".fa"
-            #set out1 = "out1.fa"
-        #else:
-            #set read1 = $read1 + ".fq"
-            #set out1 = "out1.fq"
-        #end if
-        ln -f -s '${input_1}' '$read1' &&
+#if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"):
+    #set read1 = $read1 + ".fq.gz"
+    #set out1 = "out1.gz"
+#else if $input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"):
+    #set read1 = $read1 + ".fq.bz2"
+    #set out1 = "out1.bz2"
+#else if $input_1.is_of_type('fasta'):
+    #set read1 = $read1 + ".fa"
+    #set out1 = "out1.fa"
+#else:
+    #set read1 = $read1 + ".fq"
+    #set out1 = "out1.fq"
+#end if
+ln -f -s '${input_1}' '$read1' &&
 
-        #if $paired:
-            #if $input_2.is_of_type("fastq.gz", "fastqsanger.gz"):
-                #set read2 = $read2 + ".fq.gz"
-                #set out2 = "out2.gz"
-            #else if $input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"):
-                #set read2 = $read2 + ".fq.bz2"
-                #set out2 = "out2.bz2"
-            #else if $input_2.is_of_type('fasta'):
-                #set format = "fasta"
-                #set read2 = $read2 + ".fa"
-                #set out2 = "out2.fa"
-            #else:
-                #set read2 = $read2 + ".fq"
-                #set out2 = "out2.fq"
-            #end if
-            ln -f -s '${input_2}' '$read2' &&
-        #end if
+#if $paired:
+    #if $input_2.is_of_type("fastq.gz", "fastqsanger.gz"):
+        #set read2 = $read2 + ".fq.gz"
+        #set out2 = "out2.gz"
+    #else if $input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"):
+        #set read2 = $read2 + ".fq.bz2"
+        #set out2 = "out2.bz2"
+    #else if $input_2.is_of_type('fasta'):
+        #set read2 = $read2 + ".fa"
+        #set out2 = "out2.fa"
+    #else:
+        #set read2 = $read2 + ".fq"
+        #set out2 = "out2.fq"
+    #end if
+    ln -f -s '${input_2}' '$read2' &&
+#end if
 
-        ## Run Cutadapt
+## Run Cutadapt
+
+cutadapt
 
-        cutadapt
-
-        -j \${GALAXY_SLOTS:-4}
-
-        --format=$format
+## cutadapt (up to version 1.16) can't be run in multicore mode with these options
+#if not any(($output_options.info_file, $output_options.rest_file, $output_options.wildcard_file, $output_options.too_short_file, $output_options.too_long_file, $output_options.untrimmed_file))
+     -j \${GALAXY_SLOTS:-1}
+#end if
 
-       #if str( $library.type ) == "single":
-            @read1_options@
-            --output='$out1'
-        #else:
-            @read1_options@
-            @read2_options@
-            --output='$out1'
-            --paired-output='$out2'
-        #end if
+#if str( $library.type ) == "single":
+    @read1_options@
+    --output='$out1'
+#else:
+    @read1_options@
+    @read2_options@
+    --output='$out1'
+    --paired-output='$out2'
+#end if
 
-        --error-rate=$adapter_options.error_rate
-        --times=$adapter_options.count
-        --overlap=$adapter_options.overlap
-        $adapter_options.no_indels
-        $adapter_options.match_read_wildcards
+--error-rate=$adapter_options.error_rate
+--times=$adapter_options.count
+--overlap=$adapter_options.overlap
+$adapter_options.no_indels
+$adapter_options.match_read_wildcards
 
 
-        $filter_options.discard
-        $filter_options.discard_untrimmed
-        $filter_options.no_trim
-        $filter_options.mask_adapter
-        #if str($filter_options.min) != '0':
-            --minimum-length=$filter_options.min
-        #end if
-        #if str($filter_options.max) != '0':
-            --maximum-length=$filter_options.max
-        #end if
-        #if $filter_options.max_n:
-            --max-n=$filter_options.max_n
-        #end if
-        #if str( $library.type ) != "single":
-            #if $filter_options.pair_filter:
-                --pair-filter=$filter_options.pair_filter
-            #end if
-        #end if
+$filter_options.discard
+$filter_options.discard_untrimmed
+$filter_options.no_trim
+$filter_options.mask_adapter
+#if str($filter_options.min) != '0':
+    --minimum-length=$filter_options.min
+#end if
+#if str($filter_options.max) != '0':
+    --maximum-length=$filter_options.max
+#end if
+#if $filter_options.max_n:
+    --max-n=$filter_options.max_n
+#end if
+#if str( $library.type ) != "single":
+    #if $filter_options.pair_filter:
+        --pair-filter=$filter_options.pair_filter
+    #end if
+#end if
 
 
-        #if str($read_mod_options.quality_cutoff) != '0':
-           --quality-cutoff=$read_mod_options.quality_cutoff
-        #end if
-        #if str($read_mod_options.nextseq_trim) != '0':
-            --nextseq-trim=$read_mod_options.nextseq_trim
-        #end if
-        $read_mod_options.trim_n
-        #if $read_mod_options.prefix != '':
-            --prefix="$read_mod_options.prefix"
-        #end if
-        #if $read_mod_options.suffix != '':
-            --suffix="$read_mod_options.suffix"
-        #end if
-        #if str($read_mod_options.length) != '0':
-            --length=$$read_mod_options.length
-        #end if
-        #if $read_mod_options.length_tag != '':
-            --length-tag="$read_mod_options.length_tag"
-        #end if
+#if str($read_mod_options.quality_cutoff) != '0':
+   --quality-cutoff=$read_mod_options.quality_cutoff
+#end if
+#if str($read_mod_options.nextseq_trim) != '0':
+    --nextseq-trim=$read_mod_options.nextseq_trim
+#end if
+$read_mod_options.trim_n
+#if $read_mod_options.prefix != '':
+    --prefix="$read_mod_options.prefix"
+#end if
+#if $read_mod_options.suffix != '':
+    --suffix="$read_mod_options.suffix"
+#end if
+#if str($read_mod_options.length) != '0':
+    --length=$$read_mod_options.length
+#end if
+#if $read_mod_options.length_tag != '':
+    --length-tag="$read_mod_options.length_tag"
+#end if
 
-        '${read1}'
-        #if $paired:
-            '${read2}'
-        #end if
+'${read1}'
+#if $paired:
+    '${read2}'
+#end if
 
-        #if $output_options.report:
-            > report.txt
-        #end if
+#if $output_options.report:
+    > report.txt
+#end if
     ]]></command>
     <inputs>