2
|
1 <tool id="srst2" name="SRST2 - Short Read Sequence Typer (v2)" version="0.2.0">
|
0
|
2 <requirements>
|
2
|
3 <requirement type="package" version="0.2.0">srst2</requirement>
|
0
|
4 </requirements>
|
|
5 <command detect_errors="exit_code"><![CDATA[
|
3
|
6
|
0
|
7 #if $paired_conditional.sPaired == "paired"
|
3
|
8 #if $paired_conditional.fastq1.is_of_type("fastq.gz")
|
|
9 zcat $paired_conditional.fastq1 > sample_1.fastq;
|
|
10 zcat $paired_conditional.fastq2 > sample_2.fastq;
|
|
11 #else if $paired_conditional.fastq1.is_of_type("fastqsanger.gz")
|
|
12 zcat $paired_conditional.fastq1 > sample_1.fastq;
|
|
13 zcat $paired_conditional.fastq2 > sample_2.fastq;
|
|
14 #else
|
|
15 ln -s $paired_conditional.fastq1 sample_1.fastq;
|
|
16 ln -s $paired_conditional.fastq2 sample_2.fastq;
|
|
17 #end if
|
2
|
18 #else if $paired_conditional.sPaired == "paired_coll"
|
3
|
19 #if $paired_conditional.coll.forward.is_of_type("fastq.gz")
|
|
20 zcat $paired_conditional.coll.forward > sample_1.fastq;
|
|
21 zcat $paired_conditional.coll.reverse > sample_2.fastq;
|
|
22 #else if $paired_conditional.coll.forward.is_of_type("fastqsanger.gz")
|
|
23 zcat $paired_conditional.coll.forward > sample_1.fastq;
|
|
24 zcat $paired_conditional.coll.reverse > sample_2.fastq;
|
|
25 #else
|
|
26 ln -s $paired_conditional.coll.forward sample_1.fastq;
|
|
27 ln -s $paired_conditional.coll.reverse sample_2.fastq;
|
|
28 #end if
|
|
29 #else if $paired_conditional.sPaired == "single"
|
|
30 #if $paired_conditional.fastq1.is_of_type("fastq.gz")
|
|
31 zcat $paired_conditional.fastq1 > sample_1.fastq;
|
|
32 #else if $paired_conditional.fastq1.is_of_type("fastqsanger.gz")
|
|
33 zcat $paired_conditional.fastq1 > sample_1.fastq;
|
|
34 #else
|
|
35 ln -s $paired_conditional.fastq1 sample_1.fastq;
|
|
36 #end if
|
0
|
37 #end if
|
|
38
|
|
39 srst2
|
|
40
|
|
41 #if $paired_conditional.sPaired == "single"
|
3
|
42 --input_se sample_1.fastq1
|
|
43 #else
|
2
|
44 --input_pe sample_1.fastq sample_2.fastq
|
0
|
45 #end if
|
|
46
|
|
47 --output srst2out
|
|
48 --save_scores
|
|
49
|
|
50 #if $job_type.job == "mlst"
|
|
51 --mlst_definitions $job_type.mlst_definitions
|
|
52 --mlst_db $job_type.mlst_db
|
|
53 --mlst_delimiter $job_type.mlstdelim
|
|
54 --mlst_max_mismatch $job_type.mlst_max_mismatch
|
|
55 #else if $job_type.job == "gene"
|
|
56 --gene_db $job_type.genedb
|
|
57 --gene_max_mismatch $job_type.gene_max_mismatch
|
2
|
58 #else if $job_type.job == "nost"
|
|
59 --mlst_db $job_type.mlst_db
|
|
60 --mlst_delimiter $job_type.mlstdelim
|
|
61 --mlst_max_mismatch $job_type.mlst_max_mismatch
|
0
|
62 #end if
|
|
63
|
|
64 #if $options.select == "advanced"
|
|
65 #if $options.min_coverage
|
|
66 --min_coverage $options.min_coverage
|
|
67 #end if
|
|
68 #if $options.max_divergence
|
|
69 --max_divergence $options.max_divergence
|
|
70 #end if
|
|
71 #if $options.min_depth
|
|
72 --min_depth $options.min_depth
|
|
73 #end if
|
|
74 #if $options.min_edge_depth
|
|
75 --min_edge_depth $options.min_edge_depth
|
|
76 #end if
|
|
77 #if $options.prob_err
|
|
78 --prob_err $options.prob_err
|
|
79 #end if
|
|
80 #if $options.stop_after
|
|
81 --stop_after $options.stop_after
|
|
82 #end if
|
|
83 --other "'-p \${GALAXY_SLOTS:-1}
|
|
84 #if $options.maxins
|
|
85 --maxins $options.maxins
|
|
86 --minins $options.minins
|
|
87 #end if
|
|
88 '"
|
|
89 #if $options.mapq
|
|
90 --mapq $options.mapq
|
|
91 #end if
|
|
92 #if $options.baseq
|
|
93 --baseq $options.baseq
|
|
94 #end if
|
|
95 #else
|
|
96 --other "'-p \${GALAXY_SLOTS:-1}'"
|
|
97 #end if
|
|
98
|
|
99 #if $job_type.job == "mlst"
|
|
100 ; python $__tool_directory__/scoreProfiles.py --mlst_definitions $job_type.mlst_definitions --profile_cov $job_type.profile_cov --profile_max_mismatch $job_type.profile_max_mismatch --output srst2.pscores
|
|
101 #end if
|
|
102
|
|
103 ]]></command>
|
|
104 <inputs>
|
|
105 <conditional name="paired_conditional">
|
|
106 <param name="sPaired" type="select" label="Single-End or Paired-End FASTQ?">
|
2
|
107 <option value="single">Single FASTQ</option>
|
|
108 <option value="paired">Forward and Reverse FASTQ</option>
|
|
109 <option value="paired_coll">Paired FASTQ Collection</option>
|
0
|
110 </param>
|
|
111 <when value="single">
|
4
|
112 <param name="fastq1" type="data" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" label="FASTQ file" help="FASTQ" />
|
0
|
113 </when>
|
|
114 <when value="paired">
|
4
|
115 <param name="fastq1" type="data" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" label="Forward FASTQ file" help="FASTQ" />
|
|
116 <param name="fastq2" type="data" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" label="Reverse FASTQ file" help="FASTQ" />
|
0
|
117 </when>
|
2
|
118 <when value="paired_coll">
|
4
|
119 <param name="coll" label="Paired FASTQ" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" collection_type="paired" />
|
2
|
120 </when>
|
0
|
121 </conditional>
|
|
122
|
|
123 <conditional name="job_type">
|
2
|
124 <param name="job" type="select" label="MLST, MLST with ST, or Gene Presence/Absence?">
|
|
125 <option value="nost">MLST</option>
|
|
126 <option value="mlst">MLST with ST Definitions</option>
|
0
|
127 <option value="gene">Gene</option>
|
|
128 </param>
|
2
|
129 <when value="nost">
|
|
130 <param type="data" name="mlst_db" label="Fasta file of MLST alleles" format="fasta" />
|
|
131 <param type="text" name="mlstdelim" value="_" format="txt" label="Character(s) separating gene name from allele number in MLST database (default '_')" />
|
|
132 <param type="integer" name="mlst_max_mismatch" value="10" format="txt" label="Maximum number of mismatches per read" />
|
|
133 </when>
|
0
|
134 <when value="mlst">
|
|
135 <param type="data" name="mlst_db" label="Fasta file of MLST alleles" format="fasta" />
|
|
136 <param type="data" name="mlst_definitions" label="ST definitions for MLST scheme" format="tabular" />
|
|
137 <param type="text" name="mlstdelim" value="_" format="txt" label="Character(s) separating gene name from allele number in MLST database (default '_')" />
|
|
138 <param type="integer" name="mlst_max_mismatch" value="10" format="txt" label="Maximum number of mismatches per read" />
|
|
139 <param type="float" name="profile_max_mismatch" value="1" format="txt" label="Maximum number of mismatches for reporting ST profile" />
|
|
140 <param type="float" name="profile_cov" value="98" format="txt" label="Minimum mean % coverage for reporting ST profile" />
|
|
141
|
|
142 </when>
|
|
143 <when value="gene">
|
|
144 <param name="genedb" type="data" format="fasta" label="Fasta file for gene database" />
|
|
145 <param name="gene_max_mismatch" type="integer" value="10" format="txt" label="Maximum number of mistaches per read (default 10)" />
|
|
146 </when>
|
|
147 </conditional>
|
|
148
|
|
149 <conditional name="options">
|
|
150 <param name="select" type="select" label="Options Type">
|
|
151 <option value="basic">Basic</option>
|
|
152 <option value="advanced">Advanced</option>
|
|
153 </param>
|
|
154 <when value="advanced">
|
|
155 <param name="min_coverage" type="integer" label="Minimum %coverage cutoff for gene reporting" value="90"/>
|
|
156 <param name="max_divergence" type="integer" label="Maximum %divergence cutoff for gene reporting" value="10"/>
|
|
157 <param name="min_depth" type="integer" label="Minimum mean depth to flag as dubious allele call" value="5"/>
|
|
158 <param name="min_edge_depth" type="integer" label="Minimum edge depth to flag as dubious allele call" value="2"/>
|
|
159 <param name="prob_err" type="float" label="Probability of sequencing error" value="0.01"/>
|
|
160 <param name="stop_after" type="integer" label="Stop mapping after this number of reads have been mapped (otherwise map all)" optional="true"/>
|
|
161 <param name="mapq" type="integer" label="Samtools -q parameter" value="1"/>
|
|
162 <param name="baseq" type="integer" label="Samtools -Q parameter" value="20"/>
|
|
163 <param name="minins" type="integer" label="Bowtie 2 -I parameter. The minimum fragment length for valid paired-end alignments." value="0" >
|
|
164 <validator type="in_range" message="Must be less than -X parameter." min="0"/>
|
|
165 </param>
|
|
166 <param name="maxins" type="integer" label="Bowtie 2 -X parameter. The maximum fragment length for valid paired-end alignments." value="1000" >
|
|
167 <validator type="in_range" message="Must be greater than -I parameter." min="0"/>
|
|
168 </param>
|
|
169 </when>
|
|
170 <when value="basic"/>
|
|
171 </conditional>
|
|
172
|
|
173 </inputs>
|
|
174
|
|
175 <outputs>
|
|
176 <data format="tabular" label="SRST2 Results" name="results" from_work_dir="*.txt"/>
|
|
177 <data format="tabular" label="SRST2 Allele Scores" name="scores" from_work_dir="*.scores">
|
|
178 <filter>job_type['job'] == "mlst"</filter>
|
|
179 </data>
|
|
180 <data format="tabular" label="SRST2 Profile Scores" name="pscores" from_work_dir="*.pscores">
|
|
181 <filter> job_type['job'] == "mlst"</filter>
|
|
182 </data>
|
|
183 <data format="tabular" label="SRST2 Predicted Alleles" name="alleles" from_work_dir="*results.txt">
|
|
184 <filter> job_type['job'] == "mlst"</filter>
|
|
185 </data>
|
|
186 <data format="tabular" label="SRST2 Gene Scores" name="gscores" from_work_dir="*.scores">
|
|
187 <filter>job_type['job'] == "gene"</filter>
|
|
188 </data>
|
|
189 </outputs>
|
|
190
|
|
191 <help><![CDATA[
|
|
192
|
|
193 SRST2 - Short Read Sequence Typer (v2)
|
|
194
|
|
195 This program is designed to take Illumina sequence data, a MLST database and/or a database of gene sequences (e.g. resistance genes, virulence genes, etc) and report the presence of STs and/or reference genes.
|
|
196
|
|
197 ]]></help>
|
|
198
|
|
199
|
|
200 <citations>
|
|
201 <citation type="bibtex">
|
|
202 @misc{pope_dashnow_zobel_holt_raven_schultz_inouye_tomita_2014,
|
|
203 title={SRST2: Rapid genomic surveillance for public health and hospital microbiology labs},
|
|
204 url={https://genomemedicine.biomedcentral.com/articles/10.1186/s13073-014-0090-6},
|
|
205 journal={Genome Medicine}, publisher={BioMed Central},
|
|
206 author={Pope, Bernard J and Dashnow, Harriet and Zobel, Justin and Holt, Kathryn E and Raven, Lesley-Ann and Schultz, Mark B and Inouye, Michael and Tomita, Takehiro},
|
|
207 year={2014}, month={Nov}} ,
|
|
208 }</citation>
|
|
209 </citations>
|
|
210 </tool>
|