comparison metaphlan.xml @ 11:b6897977d13e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metaphlan/ commit 3c1a0c4a94f78437c6df74b5348826e33e734a05
author iuc
date Mon, 29 Jul 2024 07:14:21 +0000
parents 289b3807e80c
children 1a037928504c
comparison
equal deleted inserted replaced
10:289b3807e80c 11:b6897977d13e
36 #if $inputs.in.selector == "raw" 36 #if $inputs.in.selector == "raw"
37 #if $inputs.in.raw_in.selector == "single" 37 #if $inputs.in.raw_in.selector == "single"
38 #set full_ext=$inputs.in.raw_in.in.datatype.file_ext 38 #set full_ext=$inputs.in.raw_in.in.datatype.file_ext
39 #if $full_ext.endswith("gz") 39 #if $full_ext.endswith("gz")
40 #set $file_path="in" 40 #set $file_path="in"
41 zcat '$inputs.in.raw_in.in' > '$file_path' 41 zcat '$inputs.in.raw_in.in' > '$file_path' &&
42 &&
43 #else if $full_ext.endswith("bz2") 42 #else if $full_ext.endswith("bz2")
44 #set $file_path="in" 43 #set $file_path="in"
45 bzcat '$inputs.in.raw_in.in' > '$file_path' 44 bzcat '$inputs.in.raw_in.in' > '$file_path' &&
46 &&
47 #else 45 #else
48 #set $file_path=$inputs.in.raw_in.in 46 #set $file_path="'%s'" % $inputs.in.raw_in.in
49 #end if 47 #end if
50 #else if $inputs.in.raw_in.selector == "multiple" 48 #else if $inputs.in.raw_in.selector == "multiple"
51 #set full_ext=$inputs.in.raw_in.in[0].datatype.file_ext 49 #set full_ext=$inputs.in.raw_in.in[0].datatype.file_ext
52 #set file_path="" 50 #set file_path=""
53 #set sep="" 51 #set sep=""
54 #for $i, $f in enumerate($inputs.in.raw_in.in) 52 #for $i, $f in enumerate($inputs.in.raw_in.in)
55 #if $f.datatype.file_ext != $full_ext 53 #if $f.datatype.file_ext != $full_ext
56 echo "Different datatypes for input files" 54 echo "Different datatypes for input files" &&
57 && 55 exit 1
58 exit 1
59 #end if 56 #end if
60 #if $full_ext.endswith("gz") 57 #if $full_ext.endswith("gz")
61 #set fp="input_%s" % ($i) 58 #set fp="input_%s" % ($i)
62 zcat '$f' > '$fp' 59 zcat '$f' > '$fp' &&
63 &&
64 #else if $full_ext.endswith("bz2") 60 #else if $full_ext.endswith("bz2")
65 #set fp="input_%s" % ($i) 61 #set fp="input_%s" % ($i)
66 bzcat '$f' > '$fp' 62 bzcat '$f' > '$fp' &&
67 &&
68 #else 63 #else
69 #set fp=$f 64 #set fp=$f
70 #end if 65 #end if
71 #set $file_path+="%s%s" % ($sep, $fp) 66 #set $file_path+="'%s%s'" % ($sep, $fp)
72 #set $sep="," 67 #set $sep=","
73 #end for 68 #end for
74 #else if $inputs.in.raw_in.selector == "paired" 69 #else if $inputs.in.raw_in.selector == "paired"
75 #set full_ext=$inputs.in.raw_in.in_f.datatype.file_ext 70 #set full_ext=$inputs.in.raw_in.in_f.datatype.file_ext
76 #if $full_ext != $inputs.in.raw_in.in_r.datatype.file_ext 71 #if $full_ext != $inputs.in.raw_in.in_r.datatype.file_ext
77 echo "Different datatypes for input paired-end files" 72 echo "Different datatypes for input paired-end files" &&
78 && 73 exit 1
79 exit 1
80 #end if 74 #end if
81 #if $full_ext.endswith("gz") 75 #if $full_ext.endswith("gz")
82 zcat '$inputs.in.raw_in.in_f' > 'in_f' 76 zcat '$inputs.in.raw_in.in_f' > 'in_f' &&
83 && 77 zcat '$inputs.in.raw_in.in_r' > 'in_r' &&
84 zcat '$inputs.in.raw_in.in_r' > 'in_r' 78 #set file_path="-1 in_f -2 in_r"
85 &&
86 #set file_path="in_f,in_r"
87 #else if $full_ext.endswith("bz2") 79 #else if $full_ext.endswith("bz2")
88 bzcat '$inputs.in.raw_in.in_f' > 'in_f' 80 bzcat '$inputs.in.raw_in.in_f' > 'in_f' &&
89 && 81 bzcat '$inputs.in.raw_in.in_r' > 'in_r' &&
90 bzcat '$inputs.in.raw_in.in_r' > 'in_r' 82 #set file_path="-1 in_f -2 in_r"
91 &&
92 #set file_path="in_f,in_r"
93 #else 83 #else
94 #set file_path="%s,%s" % ($inputs.in.raw_in.in_f,$inputs.in.raw_in.in_r) 84 #set file_path="-1 '%s' -2 '%s'" % ($inputs.in.raw_in.in_f,$inputs.in.raw_in.in_r)
85 #end if
86 #else if $inputs.in.raw_in.selector == "paired_collection"
87 #set full_ext=$inputs.in.raw_in.in.forward.ext
88 #if $full_ext != $inputs.in.raw_in.in.reverse.ext
89 echo "Different datatypes for input paired-end files" &&
90 exit 1
91 #end if
92 #if $full_ext.endswith("gz")
93 zcat '$inputs.in.raw_in.in.forward' > 'in_f' &&
94 zcat '$inputs.in.raw_in.in.reverse' > 'in_r' &&
95 #set file_path="-1 in_f -2 in_r"
96 #else if $full_ext.endswith("bz2")
97 bzcat '$inputs.in.raw_in.in.forward' > 'in_f' &&
98 bzcat '$inputs.in.raw_in.in.reverse' > 'in_r' &&
99 #set file_path="-1 in_f -2 in_r"
100 #else
101 #set file_path="-1 '%s' -2 '%s'" % ($inputs.in.raw_in.in_f,$inputs.in.raw_in.in_r)
95 #end if 102 #end if
96 #end if 103 #end if
97 104
98 #if $full_ext.startswith("fastq") 105 #if $full_ext.startswith("fastq")
99 #set ext='fastq' 106 #set ext='fastq'
103 #set ext=$full_ext 110 #set ext=$full_ext
104 #end if 111 #end if
105 #end if 112 #end if
106 113
107 #if $inputs.db.db_selector == "history" 114 #if $inputs.db.db_selector == "history"
108 mkdir 'ref_db' 115 mkdir 'ref_db' &&
109 && 116 bowtie2-build --large-index '$inputs.db.bowtie2db' 'ref_db/custom_db' &&
110 bowtie2-build --large-index '$inputs.db.bowtie2db' 'ref_db/custom_db' 117 python
111 && 118 '$__tool_directory__/customizemetadata.py'
112 python '$__tool_directory__/customizemetadata.py'
113 transform_json_to_pkl 119 transform_json_to_pkl
114 --json '$inputs.db.mpa_pkl' 120 --json '$inputs.db.mpa_pkl'
115 --pkl 'ref_db/custom_db.pkl' 121 --pkl 'ref_db/custom_db.pkl' &&
116 &&
117 #end if 122 #end if
118 123
119 metaphlan 124 metaphlan
120 #if $inputs.in.selector == "raw" 125 #if $inputs.in.selector == "raw"
121 '$file_path' 126 $file_path
122 --input_type '$ext' 127 --input_type '$ext'
123 --read_min_len $inputs.in.read_min_len 128 --read_min_len $inputs.in.read_min_len
124 --bt2_ps '$inputs.in.mapping.bt2_ps' 129 --bt2_ps '$inputs.in.mapping.bt2_ps'
125 --min_mapq_val $inputs.in.mapping.min_mapq_val 130 --min_mapq_val $inputs.in.mapping.min_mapq_val
126 #if $ext == "sam" 131 #if $ext == "sam"
184 -o '$output_file' 189 -o '$output_file'
185 --bowtie2out 'bowtie2out' 190 --bowtie2out 'bowtie2out'
186 -s '$sam_output_file' 191 -s '$sam_output_file'
187 --biom '$biom_output_file' 192 --biom '$biom_output_file'
188 --nproc \${GALAXY_SLOTS:-4} 193 --nproc \${GALAXY_SLOTS:-4}
194 #if $viral_analysis.profile_vsc
195 $viral_analysis.profile_vsc
196 --vsc_out '$vcs_breath_coverage'
197 --vsc_breadth $viral_analysis.vsc_breadth
198 #end if
199
200 #if $subsample.selector != "no"
201 #if $subsample.selector == "single"
202 --subsampling $subsample.subsampling
203 #else
204 --subsampling_paired $subsample.subsampling_paired
205 #end if
206 $subsample.mapping_subsampling
207 #if $subsample.subsampling_seed
208 --subsampling_seed $subsample.subsampling_seed
209 #end if
210 --subsampling_output subsampled.out
211 #end if
212
213 #if $test == "false"
214 --offline
215 #end if
189 216
190 #if $inputs.in.selector == "raw" 217 #if $inputs.in.selector == "raw"
191 && 218 &&
192 mv 'bowtie2out' '$bowtie2out' 219 mv 'bowtie2out' '$bowtie2out'
193 #end if 220 #end if
225 <when value="raw"> 252 <when value="raw">
226 <conditional name="raw_in"> 253 <conditional name="raw_in">
227 <param name="selector" type="select" label="Fasta/FastQ file(s) with microbiota reads"> 254 <param name="selector" type="select" label="Fasta/FastQ file(s) with microbiota reads">
228 <option value="single" selected="true">One single-end file</option> 255 <option value="single" selected="true">One single-end file</option>
229 <option value="multiple">Multiple single-end files</option> 256 <option value="multiple">Multiple single-end files</option>
257 <option value="paired_collection">Paired-end collection</option>
230 <option value="paired">Paired-end files</option> 258 <option value="paired">Paired-end files</option>
231 </param> 259 </param>
232 <when value="single"> 260 <when value="single">
233 <param name="in" type="data" format="@FILE_FORMATS@" label="Single-end Fasta/FastQ file with microbiota reads"/> 261 <param name="in" type="data" format="@FILE_FORMATS@" label="Single-end Fasta/FastQ file with microbiota reads"/>
234 </when> 262 </when>
235 <when value="multiple"> 263 <when value="multiple">
236 <param name="in" type="data" format="@FILE_FORMATS@" multiple="true" label="Single-end Fasta/FastQ files with microbiota reads"/> 264 <param name="in" type="data" format="@FILE_FORMATS@" multiple="true" label="Single-end Fasta/FastQ files with microbiota reads"/>
265 </when>
266 <when value="paired_collection">
267 <param name="in" type="data_collection" format="@FILE_FORMATS@" label="Paired-end Fasta/FastQ file with microbiota reads"/>
237 </when> 268 </when>
238 <when value="paired"> 269 <when value="paired">
239 <param name="in_f" type="data" format="@FILE_FORMATS@" label="Forward paired-end Fasta/FastQ file with microbiota reads"/> 270 <param name="in_f" type="data" format="@FILE_FORMATS@" label="Forward paired-end Fasta/FastQ file with microbiota reads"/>
240 <param name="in_r" type="data" format="@FILE_FORMATS@" label="Reverse paired-end Fasta/FastQ file with microbiota reads"/> 271 <param name="in_r" type="data" format="@FILE_FORMATS@" label="Reverse paired-end Fasta/FastQ file with microbiota reads"/>
241 </when> 272 </when>
336 <param argument="--ignore_markers" type="data" format="txt,tabular" optional="true" label="File containing a list of markers to ignore" help="One marker per line"/> 367 <param argument="--ignore_markers" type="data" format="txt,tabular" optional="true" label="File containing a list of markers to ignore" help="One marker per line"/>
337 <param argument="--avoid_disqm" type='boolean' checked="true" truevalue='--avoid_disqm' falsevalue='' 368 <param argument="--avoid_disqm" type='boolean' checked="true" truevalue='--avoid_disqm' falsevalue=''
338 label="Deactivate the procedure of disambiguating the quasi-markers based on the marker abundance pattern found in the sample?" 369 label="Deactivate the procedure of disambiguating the quasi-markers based on the marker abundance pattern found in the sample?"
339 help="It is generally recommended to keep the disambiguation procedure in order to minimize false positives"/> 370 help="It is generally recommended to keep the disambiguation procedure in order to minimize false positives"/>
340 </section> 371 </section>
372 <conditional name="subsample">
373 <param name="selector" type="select" label="Subsample" help="Subsampling only works for fastq input">
374 <option value="no">No</option>
375 <option value="single">Yes: specify number of reads</option>
376 <option value="paired">Yes: specify number of paired reads</option>
377 </param>
378 <when value="no"/>
379 <when value="single">
380 <param argument="--subsampling" type="integer" value="" min="1" label="Sumbsample reads" help="Specify the number of reads to be considered"/>
381 <expand macro="subsample_common"/>
382 </when>
383 <when value="paired">
384 <param argument="--subsampling_paired" type="integer" value="" min="1" label="Sumbsample reads" help="Specify the number of paired reads to be considered. For N there will be floor(N/2) reads selected from the forward and reverse reads each."/>
385 <expand macro="subsample_common"/>
386 </when>
387 </conditional>
388 <conditional name="viral_analysis">
389 <param argument="--profile_vsc" type="select" label="Profile Viruses with VSCs approach">
390 <option value="--profile_vsc">Yes (requires FASTQ input and reference data with VSG fasta)</option>
391 <option value="" selected="true">No</option>
392 </param>
393 <when value="--profile_vsc">
394 <param argument="--vsc_breadth" type="float" min="0" max="1" value="0.75" label="Minimum Breadth of Coverage" help="Minimum coverage (fraction) for a Viral Group to be reported."/>
395 </when>
396 <when value=""/>
397 </conditional>
341 <section name="out" title="Outputs" expanded="true"> 398 <section name="out" title="Outputs" expanded="true">
342 <param argument="--sample_id_key" type="text" value="SampleID" label="Sample ID key for this analysis"/> 399 <param argument="--sample_id_key" type="text" value="SampleID" label="Sample ID key for this analysis"/>
343 <param argument="--sample_id" type="text" value="Metaphlan_Analysis" label="Sample ID for this analysis"/> 400 <param argument="--sample_id" type="text" value="Metaphlan_Analysis" label="Sample ID for this analysis"/>
344 <param argument="--use_group_representative" type='boolean' checked="false" truevalue='--use_group_representative' falsevalue='' 401 <param argument="--use_group_representative" type='boolean' checked="false" truevalue='--use_group_representative' falsevalue=''
345 label="Use a species as representative for species groups?"/> 402 label="Use a species as representative for species groups?"/>
349 label="Report the profiling using the CAMI output format?"/> 406 label="Report the profiling using the CAMI output format?"/>
350 <param argument="--unclassified_estimation" type='boolean' checked="false" truevalue='--unclassified_estimation' falsevalue='' 407 <param argument="--unclassified_estimation" type='boolean' checked="false" truevalue='--unclassified_estimation' falsevalue=''
351 label="Scale relative abundances to the number of reads mapping to known clades in order to estimate unknowness?"/> 408 label="Scale relative abundances to the number of reads mapping to known clades in order to estimate unknowness?"/>
352 <param name="krona_output" type='boolean' checked="false" truevalue='true' falsevalue='false' label="Output for Krona?"/> 409 <param name="krona_output" type='boolean' checked="false" truevalue='true' falsevalue='false' label="Output for Krona?"/>
353 </section> 410 </section>
411 <!-- enabling this in tests will allow metaphlan to download reference data (we do this only with the smallish TOY DB) -->
412 <param name="test" type="hidden" value="false"/>
354 </inputs> 413 </inputs>
355 <outputs> 414 <outputs>
356 <data name="output_file" format="tabular" label="${tool.name} on ${on_string}: Predicted taxon relative abundances" /> 415 <data name="output_file" format="tabular" label="${tool.name} on ${on_string}: Predicted taxon relative abundances" />
357 <data name="bowtie2out" format="tabular" label="${tool.name} on ${on_string}: Bowtie2 output"> 416 <data name="bowtie2out" format="tabular" label="${tool.name} on ${on_string}: Bowtie2 output">
358 <filter>inputs['in']['selector'] == "raw"</filter> 417 <filter>inputs['in']['selector'] == "raw"</filter>
366 <filter>analysis['analysis_type']['t'] in ['rel_ab', 'rel_ab_w_read_stats'] and analysis['analysis_type']['tax_lev']['tax_lev'] == "a" and analysis['analysis_type']['tax_lev']['split_levels']</filter> 425 <filter>analysis['analysis_type']['t'] in ['rel_ab', 'rel_ab_w_read_stats'] and analysis['analysis_type']['tax_lev']['tax_lev'] == "a" and analysis['analysis_type']['tax_lev']['split_levels']</filter>
367 </collection> 426 </collection>
368 <data name="krona_output_file" format="tabular" label="${tool.name} on ${on_string}: Predicted taxon relative abundances for Krona"> 427 <data name="krona_output_file" format="tabular" label="${tool.name} on ${on_string}: Predicted taxon relative abundances for Krona">
369 <filter>out['krona_output']</filter> 428 <filter>out['krona_output']</filter>
370 </data> 429 </data>
430 <data name="vcs_breath_coverage" format="tabular" label="${tool.name} on ${on_string}: VSCs breadth-of-coverage">
431 <filter>viral_analysis['profile_vsc']</filter>
432 </data>
433 <data name="subsample_single" format="fastqsanger" from_work_dir="subsampled.out" label="${tool.name} on ${on_string}: Subsampled reads">
434 <filter>subsample['selector'] == 'single'</filter>
435 </data>
436 <collection name="subsample_paired" type="paired" label="${tool.name} on ${on_string}: Subsampled paired reads">
437 <data name="forward" format="fastqsanger" from_work_dir="subsampled.R1.out"/>
438 <data name="reverse" format="fastqsanger" from_work_dir="subsampled.R2.out"/>
439 <filter>subsample['selector'] == 'paired'</filter>
440 </collection>
371 </outputs> 441 </outputs>
372 <tests> 442 <tests>
443 <!-- Single GZ file, Cached db -->
373 <test expect_num_outputs="6"> 444 <test expect_num_outputs="6">
374 <section name="inputs"> 445 <section name="inputs">
375 <conditional name="in"> 446 <conditional name="in">
376 <param name="selector" value="raw"/> 447 <param name="selector" value="raw"/>
377 <conditional name="raw_in"> 448 <conditional name="raw_in">
378 <!-- Single GZ file -->
379 <param name="selector" value="single"/> 449 <param name="selector" value="single"/>
380 <param name="in" value="no_taxon_input.fasta"/> 450 <param name="in" value="no_taxon_input.fasta"/>
381 </conditional> 451 </conditional>
382 <param name="read_min_len" value="70"/> 452 <param name="read_min_len" value="70"/>
383 <section name="mapping"> 453 <section name="mapping">
384 <param name="bt2_ps" value="sensitive"/> 454 <param name="bt2_ps" value="sensitive"/>
385 <param name="min_mapq_val" value="5"/> 455 <param name="min_mapq_val" value="5"/>
386 </section> 456 </section>
387 </conditional> 457 </conditional>
388 <conditional name="db"> 458 <conditional name="db">
389 <!-- Cached db -->
390 <param name="db_selector" value="cached"/> 459 <param name="db_selector" value="cached"/>
391 <param name="cached_db" value="test-db-20210409"/> 460 <param name="cached_db" value="test-db-20210409"/>
392 </conditional> 461 </conditional>
393 </section> 462 </section>
394 <section name="analysis"> 463 <section name="analysis">
514 <not_has_text text="k__Bacteria"/> 583 <not_has_text text="k__Bacteria"/>
515 <has_n_lines n="1" delta="1"/> 584 <has_n_lines n="1" delta="1"/>
516 <has_size value="1" delta="1"/> 585 <has_size value="1" delta="1"/>
517 </assert_contents> 586 </assert_contents>
518 </output> 587 </output>
588 <assert_stderr>
589 <has_text text="Downloading" negate="true"/>
590 </assert_stderr>
519 </test> 591 </test>
592 <!-- Single GZ file, Cached db -->
520 <test expect_num_outputs="6"> 593 <test expect_num_outputs="6">
521 <section name="inputs"> 594 <section name="inputs">
522 <conditional name="in"> 595 <conditional name="in">
523 <param name="selector" value="raw"/> 596 <param name="selector" value="raw"/>
524 <conditional name="raw_in"> 597 <conditional name="raw_in">
525 <!-- Single GZ file -->
526 <param name="selector" value="single"/> 598 <param name="selector" value="single"/>
527 <param name="in" value="SRS014464-Anterior_nares.fasta.gz"/> 599 <param name="in" value="SRS014464-Anterior_nares.fasta.gz"/>
528 </conditional> 600 </conditional>
529 <param name="read_min_len" value="70"/> 601 <param name="read_min_len" value="70"/>
530 <section name="mapping"> 602 <section name="mapping">
531 <param name="bt2_ps" value="sensitive"/> 603 <param name="bt2_ps" value="sensitive"/>
532 <param name="min_mapq_val" value="5"/> 604 <param name="min_mapq_val" value="5"/>
533 </section> 605 </section>
534 </conditional> 606 </conditional>
535 <conditional name="db"> 607 <conditional name="db">
536 <!-- Cached db -->
537 <param name="db_selector" value="cached"/> 608 <param name="db_selector" value="cached"/>
538 <param name="cached_db" value="test-db-20210409"/> 609 <param name="cached_db" value="test-db-20210409"/>
539 </conditional> 610 </conditional>
540 </section> 611 </section>
541 <section name="analysis"> 612 <section name="analysis">
659 <not_has_text text="k__Bacteria"/> 730 <not_has_text text="k__Bacteria"/>
660 <has_text text="Corynebacterium accolens"/> 731 <has_text text="Corynebacterium accolens"/>
661 <has_n_columns n="9"/> 732 <has_n_columns n="9"/>
662 </assert_contents> 733 </assert_contents>
663 </output> 734 </output>
735 <assert_stderr>
736 <has_text text="Downloading" negate="true"/>
737 </assert_stderr>
664 </test> 738 </test>
739 <!-- Multiple GZ file, Local db-->
665 <test expect_num_outputs="4"> 740 <test expect_num_outputs="4">
666 <section name="inputs"> 741 <section name="inputs">
667 <conditional name="in"> 742 <conditional name="in">
668 <param name="selector" value="raw"/> 743 <param name="selector" value="raw"/>
669 <conditional name="raw_in"> 744 <conditional name="raw_in">
670 <!-- Multiple GZ file -->
671 <param name="selector" value="multiple"/> 745 <param name="selector" value="multiple"/>
672 <param name="in" value="SRS014464-Anterior_nares.fasta.gz,SRS014464-Anterior_nares.fasta.gz"/> 746 <param name="in" value="SRS014464-Anterior_nares.fasta.gz,SRS014464-Anterior_nares.fasta.gz"/>
673 </conditional> 747 </conditional>
674 <param name="read_min_len" value="70"/> 748 <param name="read_min_len" value="70"/>
675 <section name="mapping"> 749 <section name="mapping">
676 <param name="bt2_ps" value="sensitive"/> 750 <param name="bt2_ps" value="sensitive"/>
677 <param name="min_mapq_val" value="5"/> 751 <param name="min_mapq_val" value="5"/>
678 </section> 752 </section>
679 </conditional> 753 </conditional>
680 <conditional name="db"> 754 <conditional name="db">
681 <!-- Local db -->
682 <param name="db_selector" value="history"/> 755 <param name="db_selector" value="history"/>
683 <param name="bowtie2db" value="test-db.fasta"/> 756 <param name="bowtie2db" value="test-db.fasta"/>
684 <param name="mpa_pkl" value="test-db.json"/> 757 <param name="mpa_pkl" value="test-db.json"/>
685 </conditional> 758 </conditional>
686 </section> 759 </section>
730 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size"> 803 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size">
731 <assert_contents> 804 <assert_contents>
732 <has_text text="k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pseudomonadales|f__Moraxellaceae|g__Moraxella|s__Moraxella_lacunata"/> 805 <has_text text="k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pseudomonadales|f__Moraxellaceae|g__Moraxella|s__Moraxella_lacunata"/>
733 </assert_contents> 806 </assert_contents>
734 </output> 807 </output>
808 <assert_stderr>
809 <has_text text="Downloading" negate="true"/>
810 </assert_stderr>
735 </test> 811 </test>
736 <test expect_num_outputs="4"> 812 <!-- Paired GZ file, Cached db (note sumsample_paired and the included forward and reverse reads are counted separatelym because they are all statically defined) -->
813 <test expect_num_outputs="7">
737 <section name="inputs"> 814 <section name="inputs">
738 <conditional name="in"> 815 <conditional name="in">
739 <param name="selector" value="raw"/> 816 <param name="selector" value="raw"/>
740 <conditional name="raw_in"> 817 <conditional name="raw_in">
741 <!-- Paired GZ file -->
742 <param name="selector" value="paired"/> 818 <param name="selector" value="paired"/>
743 <param name="in_f" value="SRS014464-Anterior_nares.fasta.gz"/> 819 <param name="in_f" value="SRS014464-Anterior_nares.fastq.gz"/>
744 <param name="in_r" value="SRS014464-Anterior_nares.fasta.gz"/> 820 <param name="in_r" value="SRS014464-Anterior_nares.fastq.gz"/>
745 </conditional> 821 </conditional>
746 <param name="read_min_len" value="70"/> 822 <param name="read_min_len" value="70"/>
747 <section name="mapping"> 823 <section name="mapping">
748 <param name="bt2_ps" value="sensitive"/> 824 <param name="bt2_ps" value="sensitive"/>
749 <param name="min_mapq_val" value="5"/> 825 <param name="min_mapq_val" value="5"/>
750 </section> 826 </section>
751 </conditional> 827 </conditional>
752 <conditional name="db"> 828 <conditional name="db">
753 <!-- Cached db -->
754 <param name="db_selector" value="cached"/> 829 <param name="db_selector" value="cached"/>
755 <param name="cached_db" value="test-db-20210409"/> 830 <param name="cached_db" value="test-db-20210409"/>
756 </conditional> 831 </conditional>
757 </section> 832 </section>
758 <section name="analysis"> 833 <section name="analysis">
768 <param name="stat" value="avg_g"/> 843 <param name="stat" value="avg_g"/>
769 <param name="stat_q" value="0.2"/> 844 <param name="stat_q" value="0.2"/>
770 <param name="perc_nonzero" value="0.33"/> 845 <param name="perc_nonzero" value="0.33"/>
771 <param name="avoid_disqm" value="true"/> 846 <param name="avoid_disqm" value="true"/>
772 </section> 847 </section>
848 <conditional name="subsample">
849 <param name="selector" value="paired"/>
850 <param name="subsampling_paired" value="20257"/>
851 <param name="subsampling_seed" value="42"/>
852 </conditional>
773 <section name="out"> 853 <section name="out">
774 <param name="sample_id_key" value="SampleID"/> 854 <param name="sample_id_key" value="SampleID"/>
775 <param name="sample_id" value="Metaphlan_Analysis"/> 855 <param name="sample_id" value="Metaphlan_Analysis"/>
776 <param name="use_group_representative" value="false"/> 856 <param name="use_group_representative" value="false"/>
777 <param name="legacy_output" value="false"/> 857 <param name="legacy_output" value="false"/>
787 <has_text text="clade_name"/> 867 <has_text text="clade_name"/>
788 </assert_contents> 868 </assert_contents>
789 </output> 869 </output>
790 <output name="bowtie2out" ftype="tabular" file="SRS014464-Anterior_nares-two-inputs-bowtie2out.tabular" compare="sim_size"> 870 <output name="bowtie2out" ftype="tabular" file="SRS014464-Anterior_nares-two-inputs-bowtie2out.tabular" compare="sim_size">
791 <assert_contents> 871 <assert_contents>
792 <has_text text="HWI-EAS109_102883399:3:104:7342:14360/1"/> 872 <has_text text="HWI-EAS109_102883399:3:107:9938:7093/1"/>
793 <has_text text="37637__U2I1U8__N579_01580"/> 873 <has_text text="90240__A0A378QWM4__NCTC12877_00123"/>
794 </assert_contents> 874 </assert_contents>
795 </output> 875 </output>
796 <output name="sam_output_file" ftype="sam" file="SRS014464-Anterior_nares-two-inputs.sam" compare="sim_size"> 876 <output name="sam_output_file" ftype="sam">
797 <assert_contents> 877 <assert_contents>
878 <has_size min="52400" max="52600"/>
798 <has_text text="SN:13076__A0A2I1PE66__CYJ72_10760"/> 879 <has_text text="SN:13076__A0A2I1PE66__CYJ72_10760"/>
799 </assert_contents> 880 </assert_contents>
800 </output> 881 </output>
801 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size"> 882 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size">
802 <assert_contents> 883 <assert_contents>
803 <has_text text="k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pseudomonadales|f__Moraxellaceae|g__Moraxella|s__Moraxella_lacunata"/> 884 <has_text text="k__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Corynebacteriales|f__Corynebacteriaceae|g__Corynebacterium|s__Corynebacterium_accolens"/>
804 </assert_contents> 885 </assert_contents>
805 </output> 886 </output>
887 <output_collection name="subsample_paired" type="paired">
888 <element name="forward">
889 <assert_contents>
890 <has_line_matching expression="^@.*" n="10128"/>
891 </assert_contents>
892 </element>
893 <element name="reverse">
894 <assert_contents>
895 <has_line_matching expression="^@.*" n="10128"/>
896 </assert_contents>
897 </element>
898 </output_collection>
899
900 <assert_stderr>
901 <has_text text="Downloading" negate="true"/>
902 </assert_stderr>
806 </test> 903 </test>
807 <test expect_num_outputs="2"> 904 <!-- Paired GZ file as collection, Cached db (note sumsample_paired and the included forward and reverse reads are counted separatelym because they are all statically defined) -->
905 <test expect_num_outputs="7">
808 <section name="inputs"> 906 <section name="inputs">
809 <conditional name="in"> 907 <conditional name="in">
810 <!-- SAM --> 908 <param name="selector" value="raw"/>
811 <param name="selector" value="sam"/> 909 <conditional name="raw_in">
812 <param name="in" value="SRS014464-Anterior_nares.sam"/> 910 <param name="selector" value="paired_collection"/>
911 <param name="in">
912 <collection type="paired" name="pair">
913 <element name="forward" value="SRS014464-Anterior_nares.fastq.gz"/>
914 <element name="reverse" value="SRS014464-Anterior_nares.fastq.gz"/>
915 </collection>
916 </param>
917 </conditional>
918 <param name="read_min_len" value="70"/>
919 <section name="mapping">
920 <param name="bt2_ps" value="sensitive"/>
921 <param name="min_mapq_val" value="5"/>
922 </section>
813 </conditional> 923 </conditional>
814 <conditional name="db"> 924 <conditional name="db">
815 <!-- Cached db -->
816 <param name="db_selector" value="cached"/> 925 <param name="db_selector" value="cached"/>
817 <param name="cached_db" value="test-db-20210409"/> 926 <param name="cached_db" value="test-db-20210409"/>
818 </conditional> 927 </conditional>
819 </section> 928 </section>
820 <section name="analysis"> 929 <section name="analysis">
830 <param name="stat" value="avg_g"/> 939 <param name="stat" value="avg_g"/>
831 <param name="stat_q" value="0.2"/> 940 <param name="stat_q" value="0.2"/>
832 <param name="perc_nonzero" value="0.33"/> 941 <param name="perc_nonzero" value="0.33"/>
833 <param name="avoid_disqm" value="true"/> 942 <param name="avoid_disqm" value="true"/>
834 </section> 943 </section>
944 <conditional name="subsample">
945 <param name="selector" value="paired"/>
946 <param name="subsampling_paired" value="20257"/>
947 <param name="subsampling_seed" value="42"/>
948 </conditional>
835 <section name="out"> 949 <section name="out">
836 <param name="sample_id_key" value="SampleID"/> 950 <param name="sample_id_key" value="SampleID"/>
837 <param name="sample_id" value="Metaphlan_Analysis"/> 951 <param name="sample_id" value="Metaphlan_Analysis"/>
838 <param name="use_group_representative" value="false"/> 952 <param name="use_group_representative" value="false"/>
839 <param name="legacy_output" value="false"/> 953 <param name="legacy_output" value="false"/>
847 <has_text text="relative_abundance"/> 961 <has_text text="relative_abundance"/>
848 <has_text text="NCBI_tax_id"/> 962 <has_text text="NCBI_tax_id"/>
849 <has_text text="clade_name"/> 963 <has_text text="clade_name"/>
850 </assert_contents> 964 </assert_contents>
851 </output> 965 </output>
966 <output name="bowtie2out" ftype="tabular" file="SRS014464-Anterior_nares-two-inputs-bowtie2out.tabular" compare="sim_size">
967 <assert_contents>
968 <has_text text="HWI-EAS109_102883399:3:107:9938:7093/1"/>
969 <has_text text="90240__A0A378QWM4__NCTC12877_00123"/>
970 </assert_contents>
971 </output>
972 <output name="sam_output_file" ftype="sam">
973 <assert_contents>
974 <has_size min="52400" max="52600"/>
975 <has_text text="SN:13076__A0A2I1PE66__CYJ72_10760"/>
976 </assert_contents>
977 </output>
852 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size"> 978 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size">
853 <assert_contents> 979 <assert_contents>
854 <has_text text="k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pseudomonadales|f__Moraxellaceae|g__Moraxella|s__Moraxella_lacunata"/> 980 <has_text text="k__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Corynebacteriales|f__Corynebacteriaceae|g__Corynebacterium|s__Corynebacterium_accolens"/>
855 </assert_contents> 981 </assert_contents>
856 </output> 982 </output>
983 <output_collection name="subsample_paired" type="paired">
984 <element name="forward">
985 <assert_contents>
986 <has_line_matching expression="^@.*" n="10128"/>
987 </assert_contents>
988 </element>
989 <element name="reverse">
990 <assert_contents>
991 <has_line_matching expression="^@.*" n="10128"/>
992 </assert_contents>
993 </element>
994 </output_collection>
995
996 <assert_stderr>
997 <has_text text="Downloading" negate="true"/>
998 </assert_stderr>
857 </test> 999 </test>
1000 <!-- SAM, cached DB -->
858 <test expect_num_outputs="2"> 1001 <test expect_num_outputs="2">
859 <section name="inputs"> 1002 <section name="inputs">
860 <conditional name="in"> 1003 <conditional name="in">
861 <!-- bowtie2out --> 1004 <param name="selector" value="sam"/>
862 <param name="selector" value="bowtie2out"/> 1005 <param name="in" value="SRS014464-Anterior_nares.sam"/>
863 <param name="in" value="SRS014464-Anterior_nares-bowtie2out.tabular"/>
864 </conditional> 1006 </conditional>
865 <conditional name="db"> 1007 <conditional name="db">
866 <!-- Cached db -->
867 <param name="db_selector" value="cached"/> 1008 <param name="db_selector" value="cached"/>
868 <param name="cached_db" value="test-db-20210409"/> 1009 <param name="cached_db" value="test-db-20210409"/>
869 </conditional> 1010 </conditional>
870 </section>
871 <conditional name="in">
872 <param name="selector" value="bowtie2out"/>
873 <param name="in" value="SRS014464-Anterior_nares-bowtie2out.tabular"/>
874 </conditional>
875 <section name="mapping">
876 <param name="bt2_ps" value="sensite"/>
877 <param name="min_mapq_val" value="5"/>
878 </section> 1011 </section>
879 <section name="analysis"> 1012 <section name="analysis">
880 <conditional name="analysis_type"> 1013 <conditional name="analysis_type">
881 <param name="t" value="rel_ab"/> 1014 <param name="t" value="rel_ab"/>
882 <conditional name="tax_lev"> 1015 <conditional name="tax_lev">
911 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size"> 1044 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size">
912 <assert_contents> 1045 <assert_contents>
913 <has_text text="k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pseudomonadales|f__Moraxellaceae|g__Moraxella|s__Moraxella_lacunata"/> 1046 <has_text text="k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pseudomonadales|f__Moraxellaceae|g__Moraxella|s__Moraxella_lacunata"/>
914 </assert_contents> 1047 </assert_contents>
915 </output> 1048 </output>
1049 <assert_stderr>
1050 <has_text text="Downloading" negate="true"/>
1051 </assert_stderr>
916 </test> 1052 </test>
1053 <!-- bowtie2out, cached DB -->
1054 <test expect_num_outputs="2">
1055 <section name="inputs">
1056 <conditional name="in">
1057 <param name="selector" value="bowtie2out"/>
1058 <param name="in" value="SRS014464-Anterior_nares-bowtie2out.tabular"/>
1059 </conditional>
1060 <conditional name="db">
1061 <param name="db_selector" value="cached"/>
1062 <param name="cached_db" value="test-db-20210409"/>
1063 </conditional>
1064 </section>
1065 <conditional name="in">
1066 <param name="selector" value="bowtie2out"/>
1067 <param name="in" value="SRS014464-Anterior_nares-bowtie2out.tabular"/>
1068 </conditional>
1069 <section name="mapping">
1070 <param name="bt2_ps" value="sensite"/>
1071 <param name="min_mapq_val" value="5"/>
1072 </section>
1073 <section name="analysis">
1074 <conditional name="analysis_type">
1075 <param name="t" value="rel_ab"/>
1076 <conditional name="tax_lev">
1077 <param name="tax_lev" value="a"/>
1078 <param name="split_levels" value="false"/>
1079 </conditional>
1080 </conditional>
1081 <param name="min_cu_len" value="2000"/>
1082 <param name="organism_profiling" value="add_viruses"/>
1083 <param name="stat" value="avg_g"/>
1084 <param name="stat_q" value="0.2"/>
1085 <param name="perc_nonzero" value="0.33"/>
1086 <param name="avoid_disqm" value="true"/>
1087 </section>
1088 <section name="out">
1089 <param name="sample_id_key" value="SampleID"/>
1090 <param name="sample_id" value="Metaphlan_Analysis"/>
1091 <param name="use_group_representative" value="false"/>
1092 <param name="legacy_output" value="false"/>
1093 <param name="CAMI_format_output" value="false"/>
1094 <param name="unclassified_estimation" value="false"/>
1095 <param name="krona_output" value="false"/>
1096 </section>
1097 <output name="output_file" ftype="tabular" file="SRS014464-Anterior_nares-abundances.tabular" compare="sim_size">
1098 <assert_contents>
1099 <has_text text="k__Bacteria|p__Actinobacteria|c__Actinobacteria|o__Corynebacteriales|f__Corynebacteriaceae|g__Corynebacterium|s__Corynebacterium_accolens"/>
1100 <has_text text="relative_abundance"/>
1101 <has_text text="NCBI_tax_id"/>
1102 <has_text text="clade_name"/>
1103 </assert_contents>
1104 </output>
1105 <output name="biom_output_file" ftype="biom1" file="SRS014464-Anterior_nares.biom" compare="sim_size">
1106 <assert_contents>
1107 <has_text text="k__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Pseudomonadales|f__Moraxellaceae|g__Moraxella|s__Moraxella_lacunata"/>
1108 </assert_contents>
1109 </output>
1110 <assert_stderr>
1111 <has_text text="Downloading" negate="true"/>
1112 </assert_stderr>
1113 </test>
1114 <!-- Single FASTA file, Cached db -->
917 <test expect_num_outputs="6"> 1115 <test expect_num_outputs="6">
918 <section name="inputs"> 1116 <section name="inputs">
919 <conditional name="in"> 1117 <conditional name="in">
920 <param name="selector" value="raw"/> 1118 <param name="selector" value="raw"/>
921 <conditional name="raw_in"> 1119 <conditional name="raw_in">
922 <!-- Single FASTA file -->
923 <param name="selector" value="single"/> 1120 <param name="selector" value="single"/>
924 <param name="in" value="SRS014464-Anterior_nares.fasta"/> 1121 <param name="in" value="SRS014464-Anterior_nares.fasta"/>
925 </conditional> 1122 </conditional>
926 <param name="read_min_len" value="70"/> 1123 <param name="read_min_len" value="70"/>
927 <section name="mapping"> 1124 <section name="mapping">
928 <param name="bt2_ps" value="sensitive"/> 1125 <param name="bt2_ps" value="sensitive"/>
929 <param name="min_mapq_val" value="5"/> 1126 <param name="min_mapq_val" value="5"/>
930 </section> 1127 </section>
931 </conditional> 1128 </conditional>
932 <conditional name="db"> 1129 <conditional name="db">
933 <!-- Cached db -->
934 <param name="db_selector" value="cached"/> 1130 <param name="db_selector" value="cached"/>
935 <param name="cached_db" value="test-db-20210409"/> 1131 <param name="cached_db" value="test-db-20210409"/>
936 </conditional> 1132 </conditional>
937 </section> 1133 </section>
938 <section name="analysis"> 1134 <section name="analysis">
1052 <not_has_text text="k__Bacteria"/> 1248 <not_has_text text="k__Bacteria"/>
1053 <has_text text="Corynebacterium accolens"/> 1249 <has_text text="Corynebacterium accolens"/>
1054 <has_n_columns n="9"/> 1250 <has_n_columns n="9"/>
1055 </assert_contents> 1251 </assert_contents>
1056 </output> 1252 </output>
1253 <assert_stderr>
1254 <has_text text="Downloading" negate="true"/>
1255 </assert_stderr>
1057 </test> 1256 </test>
1058 <!-- Check a non-default analysis mode --> 1257 <!-- Check a non-default analysis mode
1059 <test expect_num_outputs="4"> 1258 and viral analysis -->
1259 <test expect_num_outputs="6">
1060 <section name="inputs"> 1260 <section name="inputs">
1061 <conditional name="in"> 1261 <conditional name="in">
1062 <param name="selector" value="raw"/> 1262 <param name="selector" value="raw"/>
1063 <conditional name="raw_in"> 1263 <conditional name="raw_in">
1064 <param name="selector" value="single"/> 1264 <param name="selector" value="single"/>
1065 <param name="in" value="SRS014464-Anterior_nares.fasta"/> 1265 <param name="in" value="SRS014464-Anterior_nares.fastq.gz"/>
1066 </conditional> 1266 </conditional>
1067 </conditional> 1267 </conditional>
1068 <conditional name="db"> 1268 <conditional name="db">
1069 <param name="db_selector" value="cached"/> 1269 <param name="db_selector" value="cached"/>
1070 <param name="cached_db" value="test-db-20210409"/> 1270 <param name="cached_db" value="mpa_vJan21_TOY_CHOCOPhlAnSGB"/>
1071 </conditional> 1271 </conditional>
1072 </section> 1272 </section>
1073 <section name="analysis"> 1273 <section name="analysis">
1074 <conditional name="analysis_type"> 1274 <conditional name="analysis_type">
1075 <param name="t" value="marker_ab_table"/> 1275 <param name="t" value="marker_ab_table"/>
1076 </conditional> 1276 </conditional>
1077 </section> 1277 </section>
1278 <conditional name="viral_analysis">
1279 <param name="profile_vsc" value="--profile_vsc"/>
1280 <param name="vsc_out" value="true"/>
1281 </conditional>
1282 <conditional name="subsample">
1283 <param name="selector" value="single"/>
1284 <param name="subsampling" value="10000"/>
1285 <param name="subsampling_seed" value="42"/>
1286 </conditional>
1287 <param name="test" value="true"/>
1078 <output name="output_file" ftype="tabular" file="SRS014464-Anterior_nares-legacy-abundances.tabular" compare="sim_size"> 1288 <output name="output_file" ftype="tabular" file="SRS014464-Anterior_nares-legacy-abundances.tabular" compare="sim_size">
1079 <assert_contents> 1289 <assert_contents>
1080 <has_text text="29394__H3NC06__B8A41_08715"/> 1290 <has_text text="SGB7017__MKDPKOFL_00679"/>
1081 <has_text text="SampleID"/> 1291 <has_text text="SampleID"/>
1082 <has_text text="Metaphlan_Analysis"/> 1292 <has_text text="Metaphlan_Analysis"/>
1083 </assert_contents> 1293 </assert_contents>
1084 </output> 1294 </output>
1295 <output name="subsample_single">
1296 <assert_contents>
1297 <has_text text="@" n="10000"/>
1298 </assert_contents>
1299 </output>
1300 <!-- reference data empty -> empty output -->
1301 <output name="vcs_breath_coverage" ftype="tabular">
1302 <assert_contents>
1303 <has_size size="0"/>
1304 </assert_contents>
1305 </output>
1306 <assert_command>
1307 <has_text text="--profile_vsc"/>
1308 <has_text text="--vsc_breadth 0.75"/>
1309 <has_text text="--vsc_out"/>
1310 </assert_command>
1311 <assert_stderr>
1312 <has_text text="Downloading"/> <!-- due to test=true and the absence of the TOY reference DB Metaphlan will download to ~10MB-->
1313 <has_text text="No reads aligning to VSC markers"/>
1314 </assert_stderr>
1085 </test> 1315 </test>
1086 </tests> 1316 </tests>
1087 <help><![CDATA[ 1317 <help><![CDATA[
1088 What it does 1318 What it does
1089 ============ 1319 ============