Mercurial > repos > iuc > srst2
comparison srst2.xml @ 0:36f105850c0d draft
planemo upload for repository https://github.com/katholt/srst2 commit 00fa01604956cb2e175fe9df199fc98956efad27
| author | iuc |
|---|---|
| date | Mon, 22 Aug 2022 19:12:11 +0000 |
| parents | |
| children | 4e0b819bf73e |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:36f105850c0d |
|---|---|
| 1 <tool id="srst2" name="SRST2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
| 2 <description>Short Read Sequence Typing for Bacterial Pathogens</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 <token name="@FAST_A_Q_FORMATS@">fasta,fasta.gz,fastq,fastq.gz,fastqsanger,fastqsanger.gz</token> | |
| 6 </macros> | |
| 7 <expand macro="requirements"/> | |
| 8 <version_command>srst2 --version</version_command> | |
| 9 <command detect_errors="exit_code"><![CDATA[ | |
| 10 #if $input.selector == "single" | |
| 11 #set ext=$input.single_input.datatype.file_ext | |
| 12 ln -s $input.single_input './input_read1.$ext' && | |
| 13 #else if $input.selector == "paired" | |
| 14 #set ext_1=$input.paired_input1.datatype.file_ext | |
| 15 #set ext_2=$input.paired_input2.datatype.file_ext | |
| 16 ln -s $input.paired_input1 './input_read1.$ext_1' && | |
| 17 ln -s $input.paired_input2 './input_read2.$ext_2' && | |
| 18 #end if | |
| 19 #for $i, $s in enumerate($prev_output) | |
| 20 #if $s | |
| 21 ln -s $s './$i-prev_output.txt' && | |
| 22 #end if | |
| 23 #end for | |
| 24 #for $i, $s in enumerate($use_gene_db.gene_db) | |
| 25 #if $s | |
| 26 ln -s $s './$i-gene_db.fasta' && | |
| 27 #end if | |
| 28 #end for | |
| 29 #if $use_mlst_db.selector == "yes" | |
| 30 #set ext_3=$use_mlst_db.mlst_definitions.datatype.file_ext | |
| 31 ln -s $use_mlst_db.mlst_db './mlst_db.fasta' && | |
| 32 ln -s $use_mlst_db.mlst_definitions './mlst_definitions.$ext_3' && | |
| 33 #end if | |
| 34 srst2 | |
| 35 #if $input.selector == "single" | |
| 36 --input_se './input_read1.$ext' | |
| 37 --read_type ${input.read_type} | |
| 38 #else if $input.selector == "paired" | |
| 39 --input_pe './input_read1.$ext_1' './input_read2.$ext_2' | |
| 40 $input.merge_paired | |
| 41 --forward _read1 | |
| 42 --reverse _read2 | |
| 43 --read_type ${input.read_type} | |
| 44 #end if | |
| 45 #if $use_mlst_db.selector == "yes" | |
| 46 --mlst_db './mlst_db.fasta' | |
| 47 --mlst_definitions './mlst_definitions.$ext_3' | |
| 48 --mlst_delimiter '$use_mlst_db.mlst_delimiter' | |
| 49 --mlst_max_mismatch $use_mlst_db.mlst_max_mismatch | |
| 50 --min_depth $use_mlst_db.min_depth | |
| 51 --min_edge_depth $use_mlst_db.min_edge_depth | |
| 52 #end if | |
| 53 #if $use_gene_db.selector == "yes" | |
| 54 --gene_db | |
| 55 #for $i, $s in enumerate($use_gene_db.gene_db) | |
| 56 #if $s | |
| 57 '$i-gene_db.fasta' | |
| 58 #end if | |
| 59 #end for | |
| 60 $use_gene_db.no_gene_details | |
| 61 --gene_max_mismatch $use_gene_db.gene_max_mismatch | |
| 62 --min_coverage $use_gene_db.min_coverage | |
| 63 --max_divergence $use_gene_db.max_divergence | |
| 64 #end if | |
| 65 --prob_err $prob_err | |
| 66 #if $truncation_score_tolerance | |
| 67 --truncation_score_tolerance $truncation_score_tolerance | |
| 68 #end if | |
| 69 #if $stop_after | |
| 70 --stop_after $stop_after | |
| 71 #end if | |
| 72 --max_unaligned_overlap $max_unaligned_overlap | |
| 73 --mapq $mapq | |
| 74 --baseq $baseq | |
| 75 --output 'output' | |
| 76 #if $prev_output | |
| 77 --prev_output | |
| 78 #for $i, $s in enumerate($prev_output) | |
| 79 #if $s | |
| 80 '$i-prev_output.txt' | |
| 81 #end if | |
| 82 #end for | |
| 83 #end if | |
| 84 #if 'log' in str($output_files_selector) | |
| 85 --log | |
| 86 #end if | |
| 87 #if 'save_scores' in str($output_files_selector) | |
| 88 --save_scores | |
| 89 #end if | |
| 90 #if 'report_new_consensus' in str($output_files_selector) | |
| 91 --report_new_consensus | |
| 92 #end if | |
| 93 #if 'report_all_consensus' in str($output_files_selector) | |
| 94 --report_all_consensus | |
| 95 #end if | |
| 96 #if 'keep_interim_alignment' in str($output_files_selector) | |
| 97 --keep_interim_alignment | |
| 98 #end if | |
| 99 #if 'report_new_consensus' in str($output_files_selector) and $use_gene_db.selector == "yes" and $use_mlst_db.selector == "yes" | |
| 100 && mkdir -p allelesOutput/ && cp *.output__input.*.pileup allelesOutput | |
| 101 #end if | |
| 102 #if $use_gene_db.selector == "yes" and $use_gene_db.no_gene_details | |
| 103 && mkdir -p geneTypingOutput/ && cp output__genes__*__results.txt geneTypingOutput && cp output__fullgenes__*__results.txt geneTypingOutput | |
| 104 #end if | |
| 105 #if 'save_scores' in str($output_files_selector) | |
| 106 && mkdir -p scoresOutput/ && cp *.scores scoresOutput | |
| 107 #end if | |
| 108 #if $input.selector == "single" or $input.selector == "paired" | |
| 109 && mkdir -p bowtie2Alignments/ && cp *.sorted.bam bowtie2Alignments | |
| 110 && mkdir -p samtoolsPileup/ && cp output__input.*.pileup samtoolsPileup | |
| 111 #end if | |
| 112 ]]></command> | |
| 113 <inputs> | |
| 114 <conditional name="input"> | |
| 115 <param name="selector" type="select" label="Reads files type for anaylsis"> | |
| 116 <option value="single">Single-end</option> | |
| 117 <option value="paired">Paired-end</option> | |
| 118 <option value="only_compiling_previous_results">Only Compiling Previous SRST2 Results</option> | |
| 119 </param> | |
| 120 <when value="single"> | |
| 121 <param name="single_input" type="data" format="@FAST_A_Q_FORMATS@" label="Single end read file(s) for analysing (may be gzipped)"/> | |
| 122 <expand macro="read_type_options" /> | |
| 123 </when> | |
| 124 <when value="paired"> | |
| 125 <param name="paired_input1" type="data" format="@FAST_A_Q_FORMATS@" label="Paired end read files for analysing (may be gzipped)"/> | |
| 126 <param name="paired_input2" type="data" format="@FAST_A_Q_FORMATS@" label="Paired end read files for analysing (may be gzipped)"/> | |
| 127 <param argument="--merge_paired" type="boolean" truevalue="--merge_paired" falsevalue="" checked="false" label="Do you want to merge the data to get a single result" help="Important only if all the input read sets belong to a single sample"/> | |
| 128 <expand macro="read_type_options" /> | |
| 129 </when> | |
| 130 <when value="only_compiling_previous_results"> | |
| 131 </when> | |
| 132 </conditional> | |
| 133 <conditional name="use_mlst_db"> | |
| 134 <param name="selector" type="select" label="Do you want to provide an MLST database of all allele sequences for the MLST scheme?"> | |
| 135 <option value="yes">Yes</option> | |
| 136 <option value="no">No</option> | |
| 137 </param> | |
| 138 <when value="yes"> | |
| 139 <param argument="--mlst_db" type="data" format="fasta" label="Fasta file of MLST alleles"/> | |
| 140 <param argument="--mlst_definitions" type="data" format="tabular" label="ST definitions for MLST scheme" help="This is the file that tells you the ST number that is assigned to known combinations of alleles. Column 1 is the ST, and subsequent columns are the loci that make up the scheme."/> | |
| 141 <param argument="--mlst_delimiter" type="text" value="-" label="Character(s) separating gene name from allele number in MLST database" help="E.g.'-', as in arcc-1"> | |
| 142 <sanitizer invalid_char=""> | |
| 143 <valid initial="string.letters,string.digits"> | |
| 144 <add value="\" /> | |
| 145 <add value="-" /> | |
| 146 <add value="/" /> | |
| 147 <add value="+" /> | |
| 148 <add value="=" /> | |
| 149 <add value=" " /> | |
| 150 <add value="_" /> | |
| 151 </valid> | |
| 152 </sanitizer> | |
| 153 <validator type="regex">[A-Za-z0-9 =-_/+]+</validator> | |
| 154 </param> | |
| 155 <param argument="--mlst_max_mismatch" type="integer" value="10" label="Maximum number of mismatches per read for MLST allele calling"/> | |
| 156 <param argument="--min_depth" type="integer" value="5" label="Minimum mean depth to flag as dubious allele call"/> | |
| 157 <param argument="--min_edge_depth" type="integer" value="2" label="Minimum edge depth to flag as dubious allele call"/> | |
| 158 </when> | |
| 159 <when value="no"> | |
| 160 </when> | |
| 161 </conditional> | |
| 162 <conditional name="use_gene_db"> | |
| 163 <param name="selector" type="select" label="Do you want to use a Gene database(s)?"> | |
| 164 <option value="yes">Yes</option> | |
| 165 <option value="no">No</option> | |
| 166 </param> | |
| 167 <when value="yes"> | |
| 168 <param argument="--gene_db" type="data" optional="true" multiple="true" format="fasta" label="Gene database(s)" help="Fasta file/s for gene databases"/> | |
| 169 <param argument="--no_gene_details" type="boolean" truevalue="" falsevalue="--no_gene_details" checked="false" label="Do you want reporting of gene typing?"/> | |
| 170 <param argument="--gene_max_mismatch" type="integer" value="10" label="Maximum number of mismatches per read for gene detection and allele calling"/> | |
| 171 <param argument="--min_coverage" type="integer" value="90" label="Minimum %coverage cutoff for gene reporting"/> | |
| 172 <param argument="--max_divergence" type="integer" value="10" label="Maximum %divergence cutoff for gene reporting"/> | |
| 173 </when> | |
| 174 <when value="no"> | |
| 175 </when> | |
| 176 </conditional> | |
| 177 <param name="output_files_selector" type="select" label="Select all outputs you need" multiple="true"> | |
| 178 <option value="log">Save the log</option> | |
| 179 <option value="save_scores">Report scores</option> | |
| 180 <option value="report_new_consensus">Report the consensus allele if a matching alleles is not found</option> | |
| 181 <option value="report_all_consensus">Report the consensus allele for the most likely allele</option> | |
| 182 <option value="keep_interim_alignment">Keep interim files (sam and unsorted bam)</option> | |
| 183 </param> | |
| 184 <param argument="--prob_err" type="float" min="0" max="1" value="0.01" label="Probability of sequencing error"/> | |
| 185 <param argument="--truncation_score_tolerance" optional="true" type="float" label="% increase in score allowed to choose non-truncated allele"/> | |
| 186 <param argument="--stop_after" type="integer" optional="true" label="Stop mapping after this number of reads have been mapped" help="Leave empty to map all"/> | |
| 187 <param argument="--max_unaligned_overlap" type="integer" value="10" label="Read discarded from alignment" help="if either of its ends has unaligned overlap with the reference that is longer than this value"/> | |
| 188 <param argument="--mapq" type="integer" value="1" label="Samtools -q parameter (Minimum mapping quality)"/> | |
| 189 <param argument="--baseq" type="integer" value="20" label="Samtools -Q parameter (Minimum base quality)"/> | |
| 190 <param argument="--prev_output" type="data" format="tabular" multiple="true" optional="true" label="SRST2 results files to compile" help="Any new results from this run will also be incorporated"/> | |
| 191 </inputs> | |
| 192 <outputs> | |
| 193 <data name="mlst_results" format="tabular" from_work_dir="output__mlst__mlst_db__results.txt" label="${tool.name} on ${on_string}: MLST Results"> | |
| 194 <filter>use_mlst_db['selector'] == "yes"</filter> | |
| 195 </data> | |
| 196 <collection name="gene_typing" type="list" label="${tool.name} on ${on_string}: Gene typing results files" > | |
| 197 <discover_datasets pattern="(?P<designation>.+)" directory="geneTypingOutput" format="txt,tabular"/> | |
| 198 <filter>use_gene_db['selector'] == "yes" and use_gene_db['no_gene_details'] is True</filter> | |
| 199 </collection> | |
| 200 <data name="Compiled_gene_and_mlst_output" format="tabular" from_work_dir="output__compiledResults.txt" label="${tool.name} on ${on_string}: Compiled MLST and Gene databases Results"> | |
| 201 </data> | |
| 202 <data name="all_consensus" format="fasta" from_work_dir="output.all_consensus_alleles.fasta" label="${tool.name} on ${on_string}: All consensus Results"> | |
| 203 <filter>"report_all_consensus" in output_files_selector</filter> | |
| 204 </data> | |
| 205 <collection name="new_consensus" type="list" label="${tool.name} on ${on_string}: New consensus Results" > | |
| 206 <discover_datasets pattern="(?P<designation>.+)" directory="allelesOutput" format="pileup"/> | |
| 207 <filter>"report_new_consensus" in output_files_selector</filter> | |
| 208 </collection> | |
| 209 <collection name="scores_ofEachAllele" type="list" label="${tool.name} on ${on_string}: Scores for each allele in the database(s)" > | |
| 210 <discover_datasets pattern="(?P<designation>.+)" directory="scoresOutput" format="tabular"/> | |
| 211 <filter>"save_scores" in output_files_selector</filter> | |
| 212 </collection> | |
| 213 <collection name="bowtie2_alignment_output" type="list" label="${tool.name} on ${on_string}: Bowtie2 alignment of reads to each input database" > | |
| 214 <discover_datasets pattern="(?P<designation>.+)" directory="bowtie2Alignments" format="bam"/> | |
| 215 <filter>input['selector'] == "single" or input['selector'] == "paired"</filter> | |
| 216 </collection> | |
| 217 <collection name="samtools_pileup_alignment" type="list" label="${tool.name} on ${on_string}: Samtools pileup of the alignment to each input database" > | |
| 218 <discover_datasets pattern="(?P<designation>.+)" directory="samtoolsPileup" format="pileup"/> | |
| 219 <filter>input['selector'] == "single" or input['selector'] == "paired"</filter> | |
| 220 </collection> | |
| 221 <data name="log_output" format="tabular" from_work_dir="output.log" label="${tool.name} on ${on_string}: Log file"> | |
| 222 <filter>"log" in output_files_selector</filter> | |
| 223 </data> | |
| 224 </outputs> | |
| 225 <tests> | |
| 226 <test expect_num_outputs="9"> | |
| 227 <param name="prob_err" value="0.01"/> | |
| 228 <param name="max_unaligned_overlap" value="10"/> | |
| 229 <param name="mapq" value="1"/> | |
| 230 <param name="baseq" value="20"/> | |
| 231 <param name="output_files_selector" value="log,save_scores,report_new_consensus,report_all_consensus"/> | |
| 232 <conditional name="input"> | |
| 233 <param name="selector" value="paired"/> | |
| 234 <param name="paired_input1" value="ERR024070_1_reduced_forward_reads.fastqsanger.gz"/> | |
| 235 <param name="paired_input2" value="ERR024070_2_reduced_reverse_reads.fastqsanger.gz"/> | |
| 236 <param name="merge_paired" value="false"/> | |
| 237 <param name="read_type" value="q"/> | |
| 238 </conditional> | |
| 239 <conditional name="use_mlst_db"> | |
| 240 <param name="selector" value="yes"/> | |
| 241 <param name="mlst_db" value="Escherichia_coli1R.fasta"/> | |
| 242 <param name="mlst_definitions" value="profiles_csv"/> | |
| 243 <param name="mlst_delimiter" value="_"/> | |
| 244 <param name="mlst_max_mismatch" value="10"/> | |
| 245 <param name="min_depth" value="5"/> | |
| 246 <param name="min_edge_depth" value="2"/> | |
| 247 </conditional> | |
| 248 <conditional name="use_gene_db"> | |
| 249 <param name="selector" value="yes"/> | |
| 250 <param name="gene_db" value="ARGannotR.fasta"/> | |
| 251 <param name="no_gene_details" value="true"/> | |
| 252 <param name="gene_max_mismatch" value="10"/> | |
| 253 <param name="min_coverage" value="90"/> | |
| 254 <param name="max_divergence" value="10"/> | |
| 255 </conditional> | |
| 256 <output name="mlst_results"> | |
| 257 <assert_contents> | |
| 258 <has_text text="fumC"/> | |
| 259 <has_n_lines n="2"/> | |
| 260 </assert_contents> | |
| 261 </output> | |
| 262 <output_collection name="gene_typing" type="list"> | |
| 263 <element name="output__fullgenes__0-gene_db__results.txt"> | |
| 264 <assert_contents> | |
| 265 <has_text text="AmpC1_Ecoli_Bla"/> | |
| 266 <has_n_lines n="2"/> | |
| 267 </assert_contents> | |
| 268 </element> | |
| 269 <element name="output__genes__0-gene_db__results.txt"> | |
| 270 <assert_contents> | |
| 271 <has_text text="AmpC1_Ecoli_Bla"/> | |
| 272 <has_n_lines n="2"/> | |
| 273 </assert_contents> | |
| 274 </element> | |
| 275 </output_collection> | |
| 276 <output name="Compiled_gene_and_mlst_output"> | |
| 277 <assert_contents> | |
| 278 <has_text text="fumC"/> | |
| 279 <has_n_lines n="2"/> | |
| 280 </assert_contents> | |
| 281 </output> | |
| 282 <output name="all_consensus"> | |
| 283 <assert_contents> | |
| 284 <has_text text="49__AmpC1_Ecoli_Bla__AmpC1__1670"/> | |
| 285 <has_n_lines n="2"/> | |
| 286 </assert_contents> | |
| 287 </output> | |
| 288 <output_collection name="new_consensus" type="list"> | |
| 289 <element name="49__AmpC1_Ecoli_Bla__AmpC1__1670.output__input.0-gene_db.pileup"> | |
| 290 <assert_contents> | |
| 291 <has_text text="49__AmpC1_Ecoli_Bla__AmpC1__1670"/> | |
| 292 <has_n_lines n="1196"/> | |
| 293 </assert_contents> | |
| 294 </element> | |
| 295 </output_collection> | |
| 296 <output_collection name="samtools_pileup_alignment" type="list"> | |
| 297 <element name="output__input.0-gene_db.pileup"> | |
| 298 <assert_contents> | |
| 299 <has_text text="49__AmpC1_Ecoli_Bla__AmpC1__1670"/> | |
| 300 <has_n_lines n="1196"/> | |
| 301 </assert_contents> | |
| 302 </element> | |
| 303 </output_collection> | |
| 304 <output_collection name="bowtie2_alignment_output" type="list"> | |
| 305 <element name="output__input.0-gene_db.sorted.bam"> | |
| 306 <assert_contents> | |
| 307 <has_size value="18500" delta="1000"/> | |
| 308 </assert_contents> | |
| 309 </element> | |
| 310 </output_collection> | |
| 311 <output name="log_output"> | |
| 312 <assert_contents> | |
| 313 <has_text text="Building"/> | |
| 314 <has_n_lines n="52"/> | |
| 315 </assert_contents> | |
| 316 </output> | |
| 317 </test> | |
| 318 </tests> | |
| 319 <help><![CDATA[ | |
| 320 SRST2 | |
| 321 ===== | |
| 322 Short Read Sequence Typing for Bacterial Pathogens | |
| 323 | |
| 324 This program is designed to take Illumina sequence data, a MLST (Multi Locus Sequence Types) database and/or a database of gene sequences (e.g. resistance genes, virulence genes, etc) and report the presence of STs (Serotypes) and/or reference genes | |
| 325 | |
| 326 Read more about the tool: https://holtlab.net/2014/12/27/behind-the-paper-srst2-for-short-read-sequence-typing-of-bacterial-pathogens/ | |
| 327 | |
| 328 Input | |
| 329 ===== | |
| 330 Learn more about all inputs and their formates: https://github.com/katholt/srst2#input-read-formats-and-options | |
| 331 | |
| 332 Output | |
| 333 ====== | |
| 334 Learn more about all outputs: https://github.com/katholt/srst2#output-files | |
| 335 ]]></help> | |
| 336 <citations> | |
| 337 <citation type="doi">10.1186/s13073-014-0090-6</citation> | |
| 338 </citations> | |
| 339 </tool> |
