comparison bio_hansel.xml @ 0:9407a9eaad22 draft

planemo upload for repository https://github.com/phac-nml/bio_hansel commit c35a4502f95471e22dea2d77f36b92c47424cecc
author nml
date Wed, 27 Sep 2017 11:50:41 -0400
parents
children ba271365095e
comparison
equal deleted inserted replaced
-1:000000000000 0:9407a9eaad22
1 <tool id="bio_hansel" name="Hansel - Salmonella Subtyping" version="0.1.0">
2 <requirements>
3 <requirement type="package" version="0.1.0">bio_hansel</requirement>
4 <requirement type="package" version="17.2.0">attrs</requirement>
5 </requirements>
6 <command detect_errors="exit_code"><![CDATA[
7 ## Variables to be set.
8 #set outputResultsName = 'results.tab'
9 #set outputMatchResultsName = 'match_results.tab'
10 #set verboseDebuggingLevel = '-vvv'
11
12 ## Preparing file input.
13 #if $single_or_paired.type == "paired":
14
15 ln -s '$single_or_paired.fastq_input1' fast_q_paired_1.fastq &&
16 ln -s '$single_or_paired.fastq_input2' fast_q_paired_2.fastq &&
17
18 #elif $single_or_paired.type == "collection":
19
20 ln -s '$single_or_paired.fastq_input1.forward' fast_q_paired_1.fastq &&
21 ln -s '$single_or_paired.fastq_input1.reverse' fast_q_paired_2.fastq &&
22
23 #elif $single_or_paired.type == "single":
24
25 #if $single_or_paired.fastq_input1.is_of_type('fastqsanger') or $single_or_paired.fastq_input1.is_of_type('fastq'):
26 ln -s '$single_or_paired.fastq_input1' fast_q_single.fastq &&
27 #end if
28
29 #if $single_or_paired.fastq_input1.is_of_type('fasta'):
30 ln -s '$single_or_paired.fastq_input1' fast_a_single.fasta &&
31 #end if
32
33 #end if
34
35
36 ## Checking for custom scheme.
37 #if $type_of_scheme.scheme_type == "custom":
38 #if $type_of_scheme.scheme_input.is_of_type('fasta'):
39 ln -s '$type_of_scheme.scheme_input' custom_scheme.fasta &&
40 #end if
41 #end if
42
43
44 ## Start the actual command here
45 hansel
46
47
48 ## Select the scheme
49 -s
50
51 #if $type_of_scheme.scheme_type == "heidelberg":
52 heidelberg
53 #elif $type_of_scheme.scheme_type == "enteritidis":
54 enteritidis
55 #elif $type_of_scheme.scheme_type == "custom":
56 custom_scheme.fasta
57 #end if
58
59
60 #if $kmer_min
61 --min-kmer-freq $kmer_min
62 #end if
63
64 #if $kmer_max
65 --max-kmer-freq $kmer_max
66 #end if
67
68 ## Adding more parameters to the command.
69 $verboseDebuggingLevel -t "\${GALAXY_SLOTS:-1}" -o $outputResultsName -O $outputMatchResultsName
70
71
72 ## Entering the file inputs.
73 #if $single_or_paired.type == "single":
74
75 #if $single_or_paired.fastq_input1.is_of_type('fastqsanger') or $single_or_paired.fastq_input1.is_of_type('fastq'):
76 fast_q_single.fastq
77 #end if
78
79 #if $single_or_paired.fastq_input1.is_of_type('fasta'):
80 fast_a_single.fasta
81 #end if
82
83 #else
84
85 ##use -p to declare using two files.
86 -p fast_q_paired_1.fastq fast_q_paired_2.fastq
87
88 #end if
89 ]]></command>
90 <inputs>
91 <conditional name="single_or_paired">
92 <param name="type" type="select" label="Specify the read type.">
93 <option value="single">Single-end Data</option>
94 <option value="paired">Paired-end Data</option>
95 <option value="collection">Collection Paired-end Data</option>
96 </param>
97 <when value="single">
98 <param name="fastq_input1" type="data" format="fastqsanger, fastq, fasta" label="Single end read file(s)"/>
99 </when>
100 <when value="paired">
101 <param name="fastq_input1" type="data" format="fastqsanger, fastq" label="Forward paired-end read file"/>
102 <param name="fastq_input2" type="data" format="fastqsanger, fastq" label="Reverse paired-end read file"/>
103 </when>
104 <when value="collection">
105 <param name="fastq_input1" type="data_collection" label="Paired-end reads collection" optional="false" format="fastqsanger, fastq" collection_type="paired" />
106 </when>
107 </conditional>
108 <conditional name="type_of_scheme">
109 <param name="scheme_type" type="select" label="Specify scheme to use. (Heidelberg is default)">
110 <option value="heidelberg">Heidelberg scheme</option>
111 <option value="enteritidis">Enteritidis scheme</option>
112 <option value="custom">Specify your own custom scheme</option>
113 </param>
114 <when value="heidelberg"/>
115 <when value="enteritidis"/>
116 <when value="custom">
117 <param name="scheme_input" type="data" format="fasta" label="Scheme Input"/>
118 </when>
119 </conditional>
120 <param name="kmer_min" argument="--min-kmer-freq" optional="True" type="integer" min="0" label="Min k-mer freq/coverage" value="10" help="default = 10"/>
121 <param name="kmer_max" argument="--max-kmer-freq" optional="True" type="integer" min="1" label="Max k-mer freq/coverage" value="200" help="default = 200"/>
122 </inputs>
123 <outputs>
124 <data format="tabular" name="results.tab" from_work_dir="results.tab" label="results.tab"/>
125 <data format="tabular" name="match_results.tab" from_work_dir="match_results.tab" label="match_results.tab"/>
126 </outputs>
127 <tests>
128 <test>
129 <param name="single_or_paired" value="single"/>
130 <param name="type_of_scheme" value="heidelberg"/>
131 <param name="fastq_input1" value="SRR1002850_SMALL.fasta"/>
132 <output name="results.tab">
133 <assert_contents>
134 <!-- Verifying that the columns are as expected. -->
135 <has_text_matching expression="sample\s+scheme\s+subtype\s+all_subtypes\s+tiles_matching_subtype\s+are_subtypes_consistent\s+inconsistent_subtypes\s+n_tiles_matching_all\s+n_tiles_matching_all_total\s+n_tiles_matching_positive\s+n_tiles_matching_positive_total\s+n_tiles_matching_subtype\s+n_tiles_matching_subtype_total\s+file_path"/>
136 <!-- Verifying that the output of running the test file is expected. This is done via REGEX because the name and path of the file outputted to results.tab changes each test. -->
137 <has_text_matching expression="(heidelberg)\s+(2.2.2.2.1.4)\s+(2;)\s+(2.2;)\s+(2.2.2;)\s+(2.2.2.2;)\s+(2.2.2.2.1;)\s+(2.2.2.2.1.4)\s+(1037658-2.2.2.2.1.4;)\s+(2154958-2.2.2.2.1.4;)\s+(3785187-2.2.2.2.1.4)\s+(True)\s+(202)\s+(202)\s+(17)\s+(17)\s+(3)\s+(3)"/>
138 </assert_contents>
139 </output>
140 <output name="match_results.tab">
141 <assert_contents>
142 <!-- This is the last line in the file, this assertion is to make sure that we have the correct number of items. -->
143 <has_text_matching expression="negative4738855-1.1"/>
144 </assert_contents>
145 </output>
146 </test>
147 </tests>
148 <help><![CDATA[
149 ***********************************************************
150 bio_hansel - Heidelberg And eNteritidis Snp ELucidation
151 ***********************************************************
152
153 Subtype *Salmonella enterica* subsp. enterica serovar Heidelberg and Enteritidis genomes using *in-silico* 33 bp k-mer SNP subtyping schemes developed by Genevieve Labbe et al.
154 Subtype *Salmonella* genome assemblies (FASTA files) and/or whole-genome sequencing reads (FASTQ files)!
155
156 Github
157 ========
158 https://github.com/phac-nml/bio_hansel
159
160 Citation
161 ========
162
163 If you find this tool useful, please cite as:
164
165 .. epigraph::
166
167 A robust genotyping scheme for *Salmonella enterica* serovar Heidelberg clones circulating in North America.
168 Geneviève Labbé, James Robertson, Peter Kruczkiewicz, Chad R. Laing, Kim Ziebell, Aleisha R. Reimer, Lorelee Tschetter, Gary Van Domselaar, Sadjia Bekal, Kimberley A. MacDonald, Linda Hoang, Linda Chui, Danielle Daignault, Durda Slavic, Frank Pollari, E. Jane Parmley, Philip Mabon, Elissa Giang, Lok Kan Lee, Jonathan Moffat, Marisa Rankin, Joanne MacKinnon, Roger Johnson, John H.E. Nash.
169 [Manuscript in preparation]
170
171 Usage
172 =====
173 Enter your FASTQ/FASTA read files, select which scheme you would like to use (e.g. heidelberg, enteritidis, etc...) or specify your own. Finally, click execute.
174
175
176 Example Usage
177 =============
178
179 Analysis of a single FASTA file
180 -------------------------------
181
182
183 Contents of ``results.tab``:
184
185 sample scheme subtype all_subtypes tiles_matching_subtype are_subtypes_consistent inconsistent_subtypes n_tiles_matching_all n_tiles_matching_all_total n_tiles_matching_positive n_tiles_matching_positive_total n_tiles_matching_subtype n_tiles_matching_subtype_total file_path
186
187 SRR1002850 heidelberg 2.2.2.2.1.4 2; 2.2; 2.2.2; 2.2.2.2; 2.2.2.2.1; 2.2.2.2.1.4 1037658-2.2.2.2.1.4; 2154958-2.2.2.2.1.4; 3785187-2.2.2.2.1.4 True 202 202 17 17 3 3 SRR1002850.fasta
188
189
190 Contents of ``match_results.tab``:
191
192 tilename stitle pident length mismatch gapopen qstart qend sstart send evalue bitscore qlen slen seq coverage is_trunc refposition subtype is_pos_tile sample file_path scheme
193
194 775920-2.2.2.2 NODE_2_length_512016_cov_46.4737_ID_3 100.0 33 0 0 1 33 474875 474907 2.0000000000000002e-11 62.1 33 512016 GTTCAGGTGCTACCGAGGATCGTTTTTGGTGCG 1.0 False 775920 2.2.2.2
195
196 True SRR1002850 SRR1002850.fasta heidelberg
197
198 negative3305400-2.1.1.1 NODE_3_length_427905_cov_48.1477_ID_5 100.0 33 0 0 1 33 276235 276267 2.0000000000000002e-11 62.1 33 427905 CATCGTGAAGCAGAACAGACGCGCATTCTTGCT 1.0 False
199
200 negative3305400 2.1.1.1 False SRR1002850 SRR1002850.fasta heidelberg
201
202 negative3200083-2.1 NODE_3_length_427905_cov_48.1477_ID_5 100.0 33 0 0 1 33 170918 170950 2.0000000000000002e-11 62.1 33 427905 ACCCGGTCTACCGCAAAATGGAAAGCGATATGC 1.0 False
203
204 negative3200083 2.1 False SRR1002850 SRR1002850.fasta heidelberg
205
206 negative3204925-2.2.3.1.5 NODE_3_length_427905_cov_48.1477_ID_5 100.0 33 0 0 1 33 175760 175792 2.0000000000000002e-11 62.1 33 427905 CTCGCTGGCAAGCAGTGCGGGTACTATCGGCGG 1.0 False
207
208 negative3204925 2.2.3.1.5 False SRR1002850 SRR1002850.fasta heidelberg
209
210 negative3230678-2.2.2.1.1.1 NODE_3_length_427905_cov_48.1477_ID_5 100.0 33 0 0 1 33 201513 201545 2.0000000000000002e-11 62.1 33 427905 AGCGGTGCGCCAAACCACCCGGAATGATGAGTG 1.0 False
211
212 negative3230678 2.2.2.1.1.1 False SRR1002850 SRR1002850.fasta heidelberg
213
214 negative3233869-2.1.1.1.1 NODE_3_length_427905_cov_48.1477_ID_5 100.0 33 0 0 1 33 204704 204736 2.0000000000000002e-11 62.1 33 427905 CAGCGCTGGTATGTGGCTGCACCATCGTCATTA 1.0 False
215
216 [Next 196 lines omitted.]
217
218
219 Analysis of a single FASTQ readset
220 ----------------------------------
221
222 Contents of ``results.tab``:
223
224 sample scheme subtype all_subtypes tiles_matching_subtype are_subtypes_consistent inconsistent_subtypes n_tiles_matching_all n_tiles_matching_all_total n_tiles_matching_positive n_tiles_matching_positive_total n_tiles_matching_subtype n_tiles_matching_subtype_total file_path
225
226 SRR5646583 heidelberg 2.2.1.1.1.1 2; 2.2; 2.2.1; 2.2.1.1; 2.2.1.1.1; 2.2.1.1.1.1 1983064-2.2.1.1.1.1; 4211912-2.2.1.1.1.1 True 202 202 20 20 2 2 SRR5646583_forward.fastqsanger; SRR5646583_reverse.fastqsanger
227
228
229 Contents of ``match_results.tab``:
230
231 seq freq sample file_path tilename is_pos_tile subtype refposition is_kmer_freq_okay scheme
232
233 ACGGTAAAAGAGGACTTGACTGGCGCGATTTGC 68 SRR5646583 SRR5646583_forward.fastqsanger; SRR5646583_reverse.fastqsanger 21097-2.2.1.1.1 True 2.2.1.1.1 21097 True heidelberg
234
235 AACCGGCGGTATTGGCTGCGGTAAAAGTACCGT 77 SRR5646583 SRR5646583_forward.fastqsanger; SRR5646583_reverse.fastqsanger 157792-2.2.1.1.1 True 2.2.1.1.1 157792 True heidelberg
236
237 CCGCTGCTTTCTGAAATCGCGCGTCGTTTCAAC 67 SRR5646583 SRR5646583_forward.fastqsanger; SRR5646583_reverse.fastqsanger 293728-2.2.1.1 True 2.2.1.1 293728 True heidelberg
238
239 GAATAACAGCAAAGTGATCATGATGCCGCTGGA 91 SRR5646583 SRR5646583_forward.fastqsanger; SRR5646583_reverse.fastqsanger 607438-2.2.1 True 2.2.1 607438 True heidelberg
240
241 CAGTTTTACATCCTGCGAAATGCGCAGCGTCAA 87 SRR5646583 SRR5646583_forward.fastqsanger; SRR5646583_reverse.fastqsanger 691203-2.2.1.1 True 2.2.1.1 691203 True heidelberg
242
243 CAGGAGAAAGGATGCCAGGGTCAACACGTAAAC 33 SRR5646583 SRR5646583_forward.fastqsanger; SRR5646583_reverse.fastqsanger 944885-2.2.1.1.1 True 2.2.1.1.1 944885 True heidelberg
244
245 [Next 200 lines omitted.]
246
247
248 Wrapper written by Matthew Gopez at the Public Health Agency of Canada, National Microbiology Laboratory.
249 ]]></help>
250 <citations>
251 </citations>
252 </tool>