comparison snippy.xml @ 2:776ebd1239da draft

planemo upload commit dcedcb76831fd639d1468a308a78ac359ecd2496
author iuc
date Mon, 18 Mar 2019 10:59:29 -0400
parents 82f2b6f20fa2
children feb7e635c6af
comparison
equal deleted inserted replaced
1:82f2b6f20fa2 2:776ebd1239da
9 <expand macro="version_command" /> 9 <expand macro="version_command" />
10 10
11 <command detect_errors="exit_code"><![CDATA[ 11 <command detect_errors="exit_code"><![CDATA[
12 12
13 #if $ref.is_of_type("fasta") 13 #if $ref.is_of_type("fasta")
14 cp '$ref' 'foo.fna' && 14 cp '$ref' 'ref.fna' &&
15 #end if 15 #end if
16 #if $ref.is_of_type("genbank") 16 #if $ref.is_of_type("genbank")
17 cp '$ref' 'foo.gbk' && 17 cp '$ref' 'ref.gbk' &&
18 #end if 18 #end if
19 snippy 19 snippy
20 --outdir 'out' 20 --outdir 'out'
21 --cpus "\${GALAXY_SLOTS:-1}" 21 --cpus \${GALAXY_SLOTS:-1}
22 --ram \$((\${GALAXY_MEMORY_MB:-4096}/1024))
22 #if $ref.is_of_type("fasta") 23 #if $ref.is_of_type("fasta")
23 --ref 'foo.fna' 24 --ref 'ref.fna'
24 #end if 25 #end if
25 #if $ref.is_of_type("genbank") 26 #if $ref.is_of_type("genbank")
26 --ref 'foo.gbk' 27 --ref 'ref.gbk'
27 #end if 28 #end if
28 --mapqual $adv.mapqual 29 --mapqual $adv.mapqual
29 --mincov $adv.mincov 30 --mincov $adv.mincov
30 --minfrac $adv.minfrac 31 --minfrac $adv.minfrac
32 --minqual $adv.minqual
31 #if $adv.rgid 33 #if $adv.rgid
32 --rgid '$advanced.rgid' 34 --rgid '$adv.rgid'
33 #end if 35 #end if
34 #if $adv.bwaopt 36 #if $adv.bwaopt
35 --bwaopt '$advanced.bwaopt' 37 --bwaopt '$adv.bwaopt'
36 #end if 38 #end if
37 39
38 #if str( $fastq_input.fastq_input_selector ) == "paired" 40 #if str( $fastq_input.fastq_input_selector ) == "paired"
39 --pe1 '$fastq_input.fastq_input1' 41 --R1 '$fastq_input.fastq_input1'
40 --pe2 '$fastq_input.fastq_input2' 42 --R2 '$fastq_input.fastq_input2'
41 #end if 43 #end if
42 #if str( $fastq_input.fastq_input_selector ) == "paired_collection" 44 #if str( $fastq_input.fastq_input_selector ) == "paired_collection"
43 --pe1 '$fastq_input.fastq_input.forward' 45 --R1 '$fastq_input.fastq_input.forward'
44 --pe2 '$fastq_input.fastq_input.reverse' 46 --R2 '$fastq_input.fastq_input.reverse'
45 #end if 47 #end if
46 #if str( $fastq_input.fastq_input_selector ) == "single" 48 #if str( $fastq_input.fastq_input_selector ) == "single"
47 --se '$fastq_input.fastq_input' 49 --se '$fastq_input.fastq_input'
48 #end if 50 #end if
49 #if str( $fastq_input.fastq_input_selector ) == "paired_iv" 51 #if str( $fastq_input.fastq_input_selector ) == "paired_iv"
50 --peil '$fastq_input.fastq_input' 52 --peil '$fastq_input.fastq_input'
51 #end if 53 #end if
52
53 &&
54
55 gunzip out/snps.depth.gz
56 54
57 && 55 &&
58 56
59 #import re 57 #import re
60 #if str( $fastq_input.fastq_input_selector ) == "paired" 58 #if str( $fastq_input.fastq_input_selector ) == "paired"
61 #set $dir_name = re.sub('[^\w_]', '_', $fastq_input.fastq_input1.element_identifier) 59 #set $dir_name = re.sub('[^\w_]', '_', $fastq_input.fastq_input1.element_identifier)
60 #elif str( $fastq_input.fastq_input_selector ) == "paired_collection"
61 #set $dir_name = re.sub('[^\w_]', '_', $fastq_input.fastq_input.name)
62 #else 62 #else
63 #set $dir_name = re.sub('[^\w_]', '_', $fastq_input.fastq_input.element_identifier) 63 #set $dir_name = re.sub('[^\w_]', '_', $fastq_input.fastq_input.element_identifier)
64 #end if 64 #end if
65 65
66 mkdir -p ${dir_name} && cp -r out/reference out/snps.tab out/snps.aligned.fa ${dir_name}/ && 66 mkdir -p ${dir_name} && cp -r out/reference out/snps.tab out/snps.aligned.fa out/snps.vcf ${dir_name}/ &&
67 tar -czf out.tgz ${dir_name} 67 tar -czf out.tgz ${dir_name}
68 #if "outcon" in str($outputs) and $adv.rename_cons
69 && sed -i 's/>.*/>${dir_name}/' out/snps.consensus.fa
70 #end if
68 71
69 72
70 ]]></command> 73 ]]></command>
71 74
72 <inputs> 75 <inputs>
97 100
98 <section name="adv" title="Advanced parameters" expanded="false"> 101 <section name="adv" title="Advanced parameters" expanded="false">
99 <param name="mapqual" type="integer" value="60" label="Minimum mapping quality" help="Minimum mapping quality to allow" /> 102 <param name="mapqual" type="integer" value="60" label="Minimum mapping quality" help="Minimum mapping quality to allow" />
100 <param name="mincov" type="integer" value="10" label="Minimum coverage" help="Minimum coverage to call a snp" /> 103 <param name="mincov" type="integer" value="10" label="Minimum coverage" help="Minimum coverage to call a snp" />
101 <param name="minfrac" type="float" value="0.9" label="Minumum proportion for variant evidence" help="Minumum proportion for variant evidence" /> 104 <param name="minfrac" type="float" value="0.9" label="Minumum proportion for variant evidence" help="Minumum proportion for variant evidence" />
105 <param name="minqual" type="float" value="100.0" label="Minumum QUALITY in VCF column 6" help="Minumum QUALITY in VCF column 6" />
102 <param name="rgid" type="text" value="" label="Bam header @RG ID" help="Use this @RG ID: in the BAM header" /> 106 <param name="rgid" type="text" value="" label="Bam header @RG ID" help="Use this @RG ID: in the BAM header" />
103 <param name="bwaopt" type="text" value="" label="Extra BWA MEM options" help="Extra BWA MEM options, eg. -x pacbio" /> 107 <param name="bwaopt" type="text" value="" label="Extra BWA MEM options" help="Extra BWA MEM options, eg. -x pacbio" />
108 <param name="rename_cons" type="boolean" truevalue="rename_cons" falsevalue="" help="When producing an output of the reference genome with variants instantiated, edit the header so that it is named after the input VCF" />
104 </section> 109 </section>
105 110
106 <param name="outputs" type="select" multiple="true" display="checkboxes" label="Output selection"> 111 <param name="outputs" type="select" multiple="true" display="checkboxes" label="Output selection">
107 <option value="outvcf" selected="True">The final annotated variants in VCF format</option> 112 <option value="outvcf" selected="True">The final annotated variants in VCF format</option>
108 <option value="outgff" selected="False">The variants in GFF3 format</option> 113 <option value="outgff" selected="False">The variants in GFF3 format</option>
153 158
154 </outputs> 159 </outputs>
155 160
156 <tests> 161 <tests>
157 162
158 <test> <!-- test 1 - fasta ref default --> 163 <test> <!-- test 0 - fasta ref no snps -->
159 <param name="ref" value="wildtype.fna" ftype="fasta" /> 164 <param name="ref" value="reference.fasta" ftype="fasta" />
160 <param name="fastq_input_selector" value="paired" /> 165 <param name="fastq_input_selector" value="paired" />
161 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" /> 166 <param name="fastq_input1" ftype="fastqsanger" value="a_1.fastq" />
162 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" /> 167 <param name="fastq_input2" ftype="fastqsanger" value="a_2.fastq" />
168 <param name="mincov" value="2" />
169 <param name="minqual" value="60" />
163 <param name="outputs" value="outgff,outsum" /> 170 <param name="outputs" value="outgff,outsum" />
164 <output name="snpsum" ftype="tabular" file="fna_ref/snps.txt" lines_diff="6" /> 171 <output name="snpsum" ftype="tabular" file="a_fna_ref_mincov_2_minqual_60.snps.txt" lines_diff="6" />
165 <output name="snpgff" ftype="gff3" file="fna_ref/snps.gff" /> 172 <output name="snpgff" ftype="gff3" file="a_fna_ref_mincov_2_minqual_60.snps.gff" />
166 </test> 173 </test>
167 174
168 <test> <!-- test 2 - gbk ref default --> 175 <test> <!-- test 1 - fasta ref one snp -->
169 <param name="ref" value="wildtype.gbk" ftype="genbank" /> 176 <param name="ref" value="reference.fasta" ftype="fasta" />
170 <param name="fastq_input_selector" value="paired" /> 177 <param name="fastq_input_selector" value="paired" />
171 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" /> 178 <param name="fastq_input1" ftype="fastqsanger" value="b_1.fastq" />
172 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" /> 179 <param name="fastq_input2" ftype="fastqsanger" value="b_2.fastq" />
180 <param name="mincov" value="2" />
181 <param name="minqual" value="60" />
173 <param name="outputs" value="outgff,outsum" /> 182 <param name="outputs" value="outgff,outsum" />
174 <output name="snpsum" ftype="tabular" file="gbk_ref/snps.txt" lines_diff="6" /> 183 <output name="snpsum" ftype="tabular" file="b_fna_ref_mincov_2_minqual_60.snps.txt" lines_diff="6" />
175 <output name="snpgff" ftype="gff3" file="gbk_ref/snps.gff" /> 184 <output name="snpgff" ftype="gff3" file="b_fna_ref_mincov_2_minqual_60.snps.gff" />
176 </test> 185 </test>
177 186
178 <test> <!-- test 3 - gbk mapqual=40 --> 187 <test> <!-- test 2 - fasta ref one snp paired_collection -->
179 <param name="ref" value="wildtype.gbk" ftype="genbank" /> 188 <param name="ref" value="reference.fasta" ftype="fasta" />
180 <param name="fastq_input_selector" value="paired" />
181 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" />
182 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" />
183 <param name="outputs" value="outgff,outsum" />
184 <param name="mapqual" value="40" />
185 <output name="snpsum" ftype="tabular" file="map_qual/snps.txt" lines_diff="6" />
186 <output name="snpgff" ftype="gff3" file="map_qual/snps.gff" />
187 </test>
188
189 <test> <!-- test 4 - gbk mincov=15 -->
190 <param name="ref" value="wildtype.gbk" ftype="genbank" />
191 <param name="fastq_input_selector" value="paired" />
192 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" />
193 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" />
194 <param name="mincov" value="15" />
195 <param name="outputs" value="outgff,outsum" />
196 <output name="snpsum" ftype="tabular" file="min_cov/snps.txt" lines_diff="6" />
197 <output name="snpgff" ftype="gff3" file="min_cov/snps.gff" />
198 </test>
199
200 <test> <!-- test 5 - gbk minfrac=0.7 -->
201 <param name="ref" value="wildtype.gbk" ftype="genbank" />
202 <param name="fastq_input_selector" value="paired" />
203 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" />
204 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" />
205 <param name="minfrac" value="0.7" />
206 <param name="outputs" value="outgff,outsum" />
207 <output name="snpsum" ftype="tabular" file="min_frac/snps.txt" lines_diff="6" />
208 <output name="snpgff" ftype="gff3" file="min_frac/snps.gff" />
209 </test>
210
211 <test> <!-- test 6 - fasta ref default paired_collection -->
212 <param name="ref" value="wildtype.fna" ftype="fasta" />
213 <param name="fastq_input_selector" value="paired_collection" /> 189 <param name="fastq_input_selector" value="paired_collection" />
214 <param name="fastq_input"> 190 <param name="fastq_input">
215 <collection type="paired"> 191 <collection type="paired">
216 <element name="forward" ftype="fastqsanger" value="mutant_R1.fastq" /> 192 <element name="forward" ftype="fastqsanger" value="b_1.fastq" />
217 <element name="reverse" ftype="fastqsanger" value="mutant_R2.fastq" /> 193 <element name="reverse" ftype="fastqsanger" value="b_2.fastq" />
218 </collection> 194 </collection>
219 </param> 195 </param>
196 <param name="mincov" value="2" />
197 <param name="minqual" value="60" />
220 <param name="outputs" value="outgff,outsum" /> 198 <param name="outputs" value="outgff,outsum" />
221 <output name="snpsum" ftype="tabular" file="fna_ref/snps.txt" lines_diff="6" /> 199 <output name="snpsum" ftype="tabular" file="b_fna_ref_mincov_2_minqual_60.snps.txt" lines_diff="6" />
222 <output name="snpgff" ftype="gff3" file="fna_ref/snps.gff" /> 200 <output name="snpgff" ftype="gff3" file="b_fna_ref_mincov_2_minqual_60.snps.gff" />
223 </test> 201 </test>
224 202
225 </tests> 203 </tests>
226 204
227 205
248 226
249 - minimum coverage - Integer - Minimum coverage of variant site (default '10') 227 - minimum coverage - Integer - Minimum coverage of variant site (default '10')
250 228
251 - minimum fraction - Float - Minumum proportion for variant evidence (default '0.9') 229 - minimum fraction - Float - Minumum proportion for variant evidence (default '0.9')
252 230
231 - minimum quality - Float - Minumum QUALITY in VCF column 6 (default '100.0')
232
253 - rgid - String - Use this @RG ID: in the BAM header (default '') 233 - rgid - String - Use this @RG ID: in the BAM header (default '')
254 234
255 - bwaopt - Extra BWA MEM options, eg. -x pacbio (default '') 235 - bwaopt - Extra BWA MEM options, eg. -x pacbio (default '')
256 236
257 **Further information** 237 **Further information**