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