comparison cutadapt.xml @ 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
comparison
equal deleted inserted replaced
12:78e1cf88d133 13:f5fdf41c08b8
8 </requirements> 8 </requirements>
9 9
10 <version_command>cutadapt --version</version_command> 10 <version_command>cutadapt --version</version_command>
11 11
12 <command detect_errors="exit_code"><![CDATA[ 12 <command detect_errors="exit_code"><![CDATA[
13 13 ## Link in the input and output files, so Cutadapt can tell their type
14 ## Link in the input and output files, so Cutadapt can tell their type 14
15 15 #import re
16 #import re 16 #set read1 = "input_f"
17 #set format = "fastq" 17 #set read2 = "input_r"
18 #set read1 = "input_f" 18 #set paired = False
19 #set read2 = "input_r" 19 #set library_type = str($library.type)
20 #set paired = False 20 #if $library_type == 'paired':
21 #set library_type = str($library.type) 21 #set paired = True
22 #if $library_type == 'paired': 22 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier))
23 #set paired = True 23 #set read2 = re.sub('[^\w\-\s]', '_', str($library.input_2.element_identifier))
24 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier)) 24 #set input_1 = $library.input_1
25 #set read2 = re.sub('[^\w\-\s]', '_', str($library.input_2.element_identifier)) 25 #set input_2 = $library.input_2
26 #set input_1 = $library.input_1 26 #else if $library_type == 'paired_collection'
27 #set input_2 = $library.input_2 27 #set paired = True
28 #else if $library_type == 'paired_collection' 28 #set input_1 = $library.input_1.forward
29 #set paired = True 29 #set input_2 = $library.input_1.reverse
30 #set input_1 = $library.input_1.forward 30 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.name))
31 #set input_2 = $library.input_1.reverse 31 #else
32 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.name)) 32 #set input_1 = $library.input_1
33 #else 33 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier))
34 #set input_1 = $library.input_1 34 #end if
35 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier)) 35
36 #end if 36 #if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"):
37 37 #set read1 = $read1 + ".fq.gz"
38 #if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"): 38 #set out1 = "out1.gz"
39 #set read1 = $read1 + ".fq.gz" 39 #else if $input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"):
40 #set out1 = "out1.gz" 40 #set read1 = $read1 + ".fq.bz2"
41 #else if $input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): 41 #set out1 = "out1.bz2"
42 #set read1 = $read1 + ".fq.bz2" 42 #else if $input_1.is_of_type('fasta'):
43 #set out1 = "out1.bz2" 43 #set read1 = $read1 + ".fa"
44 #else if $input_1.is_of_type('fasta'): 44 #set out1 = "out1.fa"
45 #set format = "fasta" 45 #else:
46 #set read1 = $read1 + ".fa" 46 #set read1 = $read1 + ".fq"
47 #set out1 = "out1.fa" 47 #set out1 = "out1.fq"
48 #else: 48 #end if
49 #set read1 = $read1 + ".fq" 49 ln -f -s '${input_1}' '$read1' &&
50 #set out1 = "out1.fq" 50
51 #end if 51 #if $paired:
52 ln -f -s '${input_1}' '$read1' && 52 #if $input_2.is_of_type("fastq.gz", "fastqsanger.gz"):
53 53 #set read2 = $read2 + ".fq.gz"
54 #if $paired: 54 #set out2 = "out2.gz"
55 #if $input_2.is_of_type("fastq.gz", "fastqsanger.gz"): 55 #else if $input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"):
56 #set read2 = $read2 + ".fq.gz" 56 #set read2 = $read2 + ".fq.bz2"
57 #set out2 = "out2.gz" 57 #set out2 = "out2.bz2"
58 #else if $input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"): 58 #else if $input_2.is_of_type('fasta'):
59 #set read2 = $read2 + ".fq.bz2" 59 #set read2 = $read2 + ".fa"
60 #set out2 = "out2.bz2" 60 #set out2 = "out2.fa"
61 #else if $input_2.is_of_type('fasta'): 61 #else:
62 #set format = "fasta" 62 #set read2 = $read2 + ".fq"
63 #set read2 = $read2 + ".fa" 63 #set out2 = "out2.fq"
64 #set out2 = "out2.fa" 64 #end if
65 #else: 65 ln -f -s '${input_2}' '$read2' &&
66 #set read2 = $read2 + ".fq" 66 #end if
67 #set out2 = "out2.fq" 67
68 #end if 68 ## Run Cutadapt
69 ln -f -s '${input_2}' '$read2' && 69
70 #end if 70 cutadapt
71 71
72 ## Run Cutadapt 72 ## cutadapt (up to version 1.16) can't be run in multicore mode with these options
73 73 #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))
74 cutadapt 74 -j \${GALAXY_SLOTS:-1}
75 75 #end if
76 -j \${GALAXY_SLOTS:-4} 76
77 77 #if str( $library.type ) == "single":
78 --format=$format 78 @read1_options@
79 79 --output='$out1'
80 #if str( $library.type ) == "single": 80 #else:
81 @read1_options@ 81 @read1_options@
82 --output='$out1' 82 @read2_options@
83 #else: 83 --output='$out1'
84 @read1_options@ 84 --paired-output='$out2'
85 @read2_options@ 85 #end if
86 --output='$out1' 86
87 --paired-output='$out2' 87 --error-rate=$adapter_options.error_rate
88 #end if 88 --times=$adapter_options.count
89 89 --overlap=$adapter_options.overlap
90 --error-rate=$adapter_options.error_rate 90 $adapter_options.no_indels
91 --times=$adapter_options.count 91 $adapter_options.match_read_wildcards
92 --overlap=$adapter_options.overlap 92
93 $adapter_options.no_indels 93
94 $adapter_options.match_read_wildcards 94 $filter_options.discard
95 95 $filter_options.discard_untrimmed
96 96 $filter_options.no_trim
97 $filter_options.discard 97 $filter_options.mask_adapter
98 $filter_options.discard_untrimmed 98 #if str($filter_options.min) != '0':
99 $filter_options.no_trim 99 --minimum-length=$filter_options.min
100 $filter_options.mask_adapter 100 #end if
101 #if str($filter_options.min) != '0': 101 #if str($filter_options.max) != '0':
102 --minimum-length=$filter_options.min 102 --maximum-length=$filter_options.max
103 #end if 103 #end if
104 #if str($filter_options.max) != '0': 104 #if $filter_options.max_n:
105 --maximum-length=$filter_options.max 105 --max-n=$filter_options.max_n
106 #end if 106 #end if
107 #if $filter_options.max_n: 107 #if str( $library.type ) != "single":
108 --max-n=$filter_options.max_n 108 #if $filter_options.pair_filter:
109 #end if 109 --pair-filter=$filter_options.pair_filter
110 #if str( $library.type ) != "single": 110 #end if
111 #if $filter_options.pair_filter: 111 #end if
112 --pair-filter=$filter_options.pair_filter 112
113 #end if 113
114 #end if 114 #if str($read_mod_options.quality_cutoff) != '0':
115 115 --quality-cutoff=$read_mod_options.quality_cutoff
116 116 #end if
117 #if str($read_mod_options.quality_cutoff) != '0': 117 #if str($read_mod_options.nextseq_trim) != '0':
118 --quality-cutoff=$read_mod_options.quality_cutoff 118 --nextseq-trim=$read_mod_options.nextseq_trim
119 #end if 119 #end if
120 #if str($read_mod_options.nextseq_trim) != '0': 120 $read_mod_options.trim_n
121 --nextseq-trim=$read_mod_options.nextseq_trim 121 #if $read_mod_options.prefix != '':
122 #end if 122 --prefix="$read_mod_options.prefix"
123 $read_mod_options.trim_n 123 #end if
124 #if $read_mod_options.prefix != '': 124 #if $read_mod_options.suffix != '':
125 --prefix="$read_mod_options.prefix" 125 --suffix="$read_mod_options.suffix"
126 #end if 126 #end if
127 #if $read_mod_options.suffix != '': 127 #if str($read_mod_options.length) != '0':
128 --suffix="$read_mod_options.suffix" 128 --length=$$read_mod_options.length
129 #end if 129 #end if
130 #if str($read_mod_options.length) != '0': 130 #if $read_mod_options.length_tag != '':
131 --length=$$read_mod_options.length 131 --length-tag="$read_mod_options.length_tag"
132 #end if 132 #end if
133 #if $read_mod_options.length_tag != '': 133
134 --length-tag="$read_mod_options.length_tag" 134 '${read1}'
135 #end if 135 #if $paired:
136 136 '${read2}'
137 '${read1}' 137 #end if
138 #if $paired: 138
139 '${read2}' 139 #if $output_options.report:
140 #end if 140 > report.txt
141 141 #end if
142 #if $output_options.report:
143 > report.txt
144 #end if
145 ]]></command> 142 ]]></command>
146 <inputs> 143 <inputs>
147 144
148 <!-- Reads --> 145 <!-- Reads -->
149 <conditional name="library"> 146 <conditional name="library">