comparison snippy.xml @ 0:c9a8ef2aa380 draft

planemo upload commit b288d4f48e58e291bda17c5945c281348ee072c7
author iuc
date Fri, 16 Feb 2018 13:40:16 -0500
parents
children 82f2b6f20fa2
comparison
equal deleted inserted replaced
-1:000000000000 0:c9a8ef2aa380
1 <tool id="snippy" name="snippy" version="@VERSION@">
2 <description>
3 Snippy finds SNPs between a haploid reference genome and your NGS sequence reads.
4 </description>
5 <macros>
6 <import>macros.xml</import>
7 </macros>
8 <expand macro="requirements" />
9 <expand macro="version_command" />
10
11 <command detect_errors="exit_code"><![CDATA[
12
13 #if $ref.is_of_type("fasta")
14 cp '$ref' 'foo.fna' &&
15 #end if
16 #if $ref.is_of_type("genbank")
17 cp '$ref' 'foo.gbk' &&
18 #end if
19 snippy
20 --outdir 'out'
21 --cpus "\${GALAXY_SLOTS:-1}"
22 #if $ref.is_of_type("fasta")
23 --ref 'foo.fna'
24 #end if
25 #if $ref.is_of_type("genbank")
26 --ref 'foo.gbk'
27 #end if
28 --mapqual $adv.mapqual
29 --mincov $adv.mincov
30 --minfrac $adv.minfrac
31 #if $adv.rgid
32 --rgid '$advanced.rgid'
33 #end if
34 #if $adv.bwaopt
35 --bwaopt '$advanced.bwaopt'
36 #end if
37
38 #if str( $fastq_input.fastq_input_selector ) == "paired"
39 --pe1 '$fastq_input.fastq_input1'
40 --pe2 '$fastq_input.fastq_input2'
41 #end if
42 #if str( $fastq_input.fastq_input_selector ) == "paired_collection"
43 --pe1 '$fastq_input.fastq_input1.forward'
44 --pe2 '$fastq_input.fastq_input1.reverse'
45 #end if
46 #if str( $fastq_input.fastq_input_selector ) == "single"
47 --se '$fastq_input.fastq_input1'
48 #end if
49 #if str( $fastq_input.fastq_input_selector ) == "paired_iv"
50 --peil '$fastq_input.fastq_input1'
51 #end if
52
53 &&
54
55 gunzip out/snps.depth.gz
56
57 &&
58
59 #import re
60 #set $dir_name = re.sub('[^\w_]', '_', $fastq_input.fastq_input1.element_identifier)
61 mkdir -p ${dir_name}/reference && cp out/snps.tab out/snps.aligned.fa ${dir_name}/ && cp out/reference/ref.fa ${dir_name}/reference/ &&
62
63 tar -czf out.tgz ${dir_name}
64
65
66 ]]></command>
67
68 <inputs>
69
70 <param name="ref" type="data" format="fasta,genbank" label="Reference File (either in fasta or genbank format)" help="Fasta or Genbank file to use as the reference" />
71
72 <conditional name="fastq_input">
73 <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single end data">
74 <option value="paired">Paired</option>
75 <option value="single">Single</option>
76 <option value="paired_collection">Paired Collection</option>
77 <option value="paired_iv">Paired Interleaved</option>
78 </param>
79 <when value="paired">
80 <param name="fastq_input1" type="data" format="fastqsanger,fasta" label="Select first set of reads" help="Specify dataset with forward reads"/>
81 <param name="fastq_input2" type="data" format="fastqsanger,fasta" label="Select second set of reads" help="Specify dataset with reverse reads"/>
82 </when>
83 <when value="single">
84 <param name="fastq_input1" type="data" format="fastqsanger,fasta" label="Select fastq dataset" help="Specify dataset with single reads"/>
85 </when>
86 <when value="paired_collection">
87 <param name="fastq_input1" format="fastqsanger,fasta" type="data_collection" collection_type="paired" label="Select a paired collection" help="See help section for an explanation of dataset collections"/>
88 </when>
89 <when value="paired_iv">
90 <param name="fastq_input1" type="data" format="fastqsanger" label="Select fastq dataset" help="Specify dataset with interleaved reads"/>
91 </when>
92 </conditional>
93
94 <section name="adv" title="Advanced parameters" expanded="false">
95 <param name="mapqual" type="integer" value="60" label="Minimum mapping quality" help="Minimum mapping quality to allow" />
96 <param name="mincov" type="integer" value="10" label="Minimum coverage" help="Minimum coverage to call a snp" />
97 <param name="minfrac" type="float" value="0.9" label="Minumum proportion for variant evidence" help="Minumum proportion for variant evidence" />
98 <param name="rgid" type="text" value="" label="Bam header @RG ID" help="Use this @RG ID: in the BAM header" />
99 <param name="bwaopt" type="text" value="" label="Extra BWA MEM options" help="Extra BWA MEM options, eg. -x pacbio" />
100 </section>
101
102 <param name="outputs" type="select" multiple="true" display="checkboxes" label="Output selection">
103 <option value="outvcf" selected="True">The final annotated variants in VCF format</option>
104 <option value="outgff" selected="False">The variants in GFF3 format</option>
105 <option value="outtab" selected="True">A simple tab-separated summary of all the variants</option>
106 <option value="outsum" selected="False">A summary of the samples and mapping</option>
107 <option value="outlog" selected="False">A log file with the commands run and their outputs</option>
108 <option value="outaln" selected="False">A version of the reference but with - at position with depth=0 and N for 0 to depth to --mincov (does not have variants)</option>
109 <option value="outcon" selected="False">A version of the reference genome with all variants instantiated</option>
110 <option value="outdep" selected="False">Output of samtools depth for the .bam file</option>
111 <option value="outbam" selected="False">The alignments in BAM format. Note that multi-mapping and unmapped reads are not present.</option>
112 <option value="outzip" selected="True">Zipped files needed for input into snippy-core</option>
113 </param>
114
115 </inputs>
116
117 <outputs>
118
119 <data format="vcf" name="snpvcf" label="${tool.name} on ${on_string} snps vcf file" from_work_dir="out/snps.vcf">
120 <filter>outputs and 'outvcf' in outputs</filter>
121 </data>
122 <data format="gff3" name="snpgff" label="${tool.name} on ${on_string} snps gff file" from_work_dir="out/snps.gff">
123 <filter>outputs and 'outgff' in outputs</filter>
124 </data>
125 <data format="tabular" name="snptab" label="${tool.name} on ${on_string} snps table" from_work_dir="out/snps.tab">
126 <filter>outputs and 'outtab' in outputs</filter>
127 </data>
128 <data format="tabular" name="snpsum" label="${tool.name} on ${on_string} snps summary" from_work_dir="out/snps.txt">
129 <filter>outputs and 'outsum' in outputs</filter>
130 </data>
131 <data format="txt" name="snplog" label="${tool.name} on ${on_string} log file" from_work_dir="out/snps.log">
132 <filter>outputs and 'outlog' in outputs</filter>
133 </data>
134 <data format="fasta" name="snpalign" label="${tool.name} on ${on_string} aligned fasta" from_work_dir="out/snps.aligned.fa">
135 <filter>outputs and 'outaln' in outputs</filter>
136 </data>
137 <data format="fasta" name="snpconsensus" label="${tool.name} on ${on_string} consensus fasta" from_work_dir="out/snps.consensus.fa">
138 <filter>outputs and 'outcon' in outputs</filter>
139 </data>
140 <data format="tabular" name="snpsdepth" label="${tool.name} on ${on_string} mapping depth" from_work_dir="out/snps.depth">
141 <filter>outputs and 'outdep' in outputs</filter>
142 </data>
143 <data format="bam" name="snpsbam" label="${tool.name} on ${on_string} mapped reads (bam)" from_work_dir="out/snps.bam">
144 <filter>outputs and 'outbam' in outputs</filter>
145 </data>
146 <data format="zip" name="outdir" label="${tool.name} on ${on_string} dir for snippy core" from_work_dir="out.tgz">
147 <filter>outputs and 'outzip' in outputs</filter>
148 </data>
149
150 </outputs>
151
152 <tests>
153
154 <test> <!-- test 1 - fasta ref default -->
155 <param name="ref" value="wildtype.fna" ftype="fasta" />
156 <param name="fastq_input_selector" value="paired" />
157 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" />
158 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" />
159 <param name="outputs" value="outgff,outsum" />
160 <output name="snpsum" ftype="tabular" file="fna_ref/snps.txt" lines_diff="6" />
161 <output name="snpgff" ftype="gff3" file="fna_ref/snps.gff" />
162 </test>
163
164 <test> <!-- test 2 - gbk ref default -->
165 <param name="ref" value="wildtype.gbk" ftype="genbank" />
166 <param name="fastq_input_selector" value="paired" />
167 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" />
168 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" />
169 <param name="outputs" value="outgff,outsum" />
170 <output name="snpsum" ftype="tabular" file="gbk_ref/snps.txt" lines_diff="6" />
171 <output name="snpgff" ftype="gff3" file="gbk_ref/snps.gff" />
172 </test>
173
174 <test> <!-- test 3 - gbk mapqual=40 -->
175 <param name="ref" value="wildtype.gbk" ftype="genbank" />
176 <param name="fastq_input_selector" value="paired" />
177 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" />
178 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" />
179 <param name="outputs" value="outgff,outsum" />
180 <param name="mapqual" value="40" />
181 <output name="snpsum" ftype="tabular" file="map_qual/snps.txt" lines_diff="6" />
182 <output name="snpgff" ftype="gff3" file="map_qual/snps.gff" />
183 </test>
184
185 <test> <!-- test 4 - gbk mincov=15 -->
186 <param name="ref" value="wildtype.gbk" ftype="genbank" />
187 <param name="fastq_input_selector" value="paired" />
188 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" />
189 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" />
190 <param name="mincov" value="15" />
191 <param name="outputs" value="outgff,outsum" />
192 <output name="snpsum" ftype="tabular" file="min_cov/snps.txt" lines_diff="6" />
193 <output name="snpgff" ftype="gff3" file="min_cov/snps.gff" />
194 </test>
195
196 <test> <!-- test 5 - gbk minfrac=0.7 -->
197 <param name="ref" value="wildtype.gbk" ftype="genbank" />
198 <param name="fastq_input_selector" value="paired" />
199 <param name="fastq_input1" ftype="fastqsanger" value="mutant_R1.fastq" />
200 <param name="fastq_input2" ftype="fastqsanger" value="mutant_R2.fastq" />
201 <param name="minfrac" value="0.7" />
202 <param name="outputs" value="outgff,outsum" />
203 <output name="snpsum" ftype="tabular" file="min_frac/snps.txt" lines_diff="6" />
204 <output name="snpgff" ftype="gff3" file="min_frac/snps.gff" />
205 </test>
206
207 </tests>
208
209
210 <help><![CDATA[
211
212 **Snippy @VERSION@**
213
214 Snippy finds SNPs between a haploid reference genome and your NGS sequence reads. It will find both substitutions (snps) and insertions/deletions (indels).
215
216 **Author**
217
218 Torsten Seemann
219
220 **Inputs**
221
222 - NGS Reads in fastq format (single or paired end)
223 - Reference file in either fasta or genbank format
224
225 If the reference file is supplied in genbank format, snpeff will be called to determine the effect of any snps found.
226
227 **Advanced options**
228
229 - mapping quality - Integer - Minimum mapping quality to allow (default '60')
230
231 - minimum coverage - Integer - Minimum coverage of variant site (default '10')
232
233 - minimum fraction - Float - Minumum proportion for variant evidence (default '0.9')
234
235 - rgid - String - Use this @RG ID: in the BAM header (default '')
236
237 - bwaopt - Extra BWA MEM options, eg. -x pacbio (default '')
238
239 **Further information**
240
241 For a much more in depth description of snippy and how it works, see https://github.com/tseemann/snippy
242
243 ]]></help>
244 <expand macro="citations"/>
245
246 </tool>