comparison tb_profiler_profile.xml @ 1:5182e1a99313 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tools/tb-profiler commit 761cc6083b4db7e69ddf03033bc8659b08e16f74
author iuc
date Thu, 04 Apr 2019 13:52:45 -0400
parents 8529c9fd63ad
children 49b819f88c2b
comparison
equal deleted inserted replaced
0:8529c9fd63ad 1:5182e1a99313
2 <description>Infer strain types and drug resistance markers from sequences</description> 2 <description>Infer strain types and drug resistance markers from sequences</description>
3 <requirements> 3 <requirements>
4 <requirement type="package" version="2.1.0">tb-profiler</requirement> 4 <requirement type="package" version="2.1.0">tb-profiler</requirement>
5 </requirements> 5 </requirements>
6 <command detect_errors="exit_code"><![CDATA[ 6 <command detect_errors="exit_code"><![CDATA[
7 #if str($fastq_or_bam.input_select.value) in ("paired_fastq", "paired_collection_fastq", "single_fastq")
8 #if str($fastq_or_bam.input_select.value) == "paired_fastq"
9 #set r1_ext = $fastq_or_bam.read1.extension
10 #set r2_ext = $fastq_or_bam.read2.extension
11 ln -s '$fastq_or_bam.read1' fastq_r1.'$r1_ext' &&
12 ln -s '$fastq_or_bam.read2' fastq_r2.'$r2_ext' &&
13 #else if str($fastq_or_bam.input_select.value) == "single_fastq"
14 #set r1_ext = $fastq_or_bam.fastq.extension
15 ln -s '$fastq_or_bam.fastq' fastq_r1.'$r1_ext' &&
16 #else if str($fastq_or_bam.input_select.value) == "paired_collection_fastq"
17 #set r1_ext = $fastq_or_bam.fastq_collection.forward.extension
18 #set r2_ext = $fastq_or_bam.fastq_collection.reverse.extension
19 ln -s '$fastq_or_bam.fastq_collection.forward' fastq_r1.'$r1_ext' &&
20 ln -s '$fastq_or_bam.fastq_collection.reverse' fastq_r2.'$r2_ext' &&
21 #end if
22 #else if str($fastq_or_bam.input_select.value) == "bam"
23 ln -s '$fastq_or_bam.bam_input' input.bam &&
24 #end if
25
7 tb-profiler profile 26 tb-profiler profile
8 27
9 --platform '${platform.value}' 28 --platform '${platform.value}'
10 29
11 #if $fastq_or_bam.input_select.value == "fastq": 30 #if str($fastq_or_bam.input_select.value) in ("paired_fastq", "paired_collection_fastq", "single_fastq")
12 --read1 '${read1}' 31 -1 fastq_r1.'$r1_ext'
32 #end if
33 #if str($fastq_or_bam.input_select.value) in ("paired_fastq", "paired_collection_fastq")
34 -2 fastq_r2.'$r1_ext'
35 #else if str($fastq_or_bam.input_select.value) == "bam"
36 --bam input.bam
37 #end if
13 38
14 #if $read2: 39 --threads "\${GALAXY_SLOTS:-1}"
15 --read2 '${read2}' 40 #if $advanced.options == 'yes'
16 #end if 41 --call_method '${advanced.call_method}'
42 --min_gene_frac '${advanced.min_gene_frac}'
43 --mapper '${advanced.mapper}'
44 --min_depth '${advanced.min_depth}'
45 #end if
17 46
18 #else if $fastq_or_bam.input_select.value == "bam": 47 #if $output_format == "pdf"
19 --bam '${bam_input}' 48 --pdf
20 #end if 49 #else if $output_format == "txt"
21 50 --txt
22 --call_method '${call_method}' 51 #end if
23 --min_depth '${min_depth}' 52 && mv results/tbprofiler.results.json $results_json
24 --threads "\${GALAXY_SLOTS:-1}" 53 #if str($fastq_or_bam.input_select) != "bam"
25 --mapper '${mapper}' 54 && mv bam/tbprofiler.bam '${output_bam}'
26 --min_gene_frac '${min_gene_frac}' 55 #end if
27 56 && bcftools view -Ov -o'${output_vcf}' vcf/tbprofiler.targets.csq.bcf
28 #if $txt: 57 #if $output_format == "pdf"
29 --txt 58 && mv results/tbprofiler.results.pdf '${output_pdf}'
30 #end if 59 #else if $output_format == "txt"
60 && mv results/tbprofiler.results.txt '${output_txt}'
61 #end if
31 62
32 ]]></command> 63 ]]></command>
33 <inputs> 64 <inputs>
34 <param name="platform" type="select" label="Platform"> 65 <param name="platform" type="select" label="Platform">
35 <option value="Illumina" selected="true">Illumina</option> 66 <option value="Illumina" selected="true">Illumina</option>
36 <option value="minION">minION</option> 67 <option value="minION">MinION</option>
37 </param> 68 </param>
38 <conditional name="fastq_or_bam"> 69 <conditional name="fastq_or_bam">
39 <param name="input_select" type="select" label="Input File Type"> 70 <param name="input_select" type="select" label="Input File Type">
40 <option value="fastq">fastq</option> 71 <option value="paired_fastq">Paired Fastq</option>
41 <option value="bam">bam</option> 72 <option value="paired_collection_fastq">Paired Collection Fastq</option>
73 <option value="single_fastq">Single Fastq</option>
74 <option value="bam">BAM</option>
42 </param> 75 </param>
43 <when value="fastq"> 76 <when value="paired_fastq">
44 <param name="read1" type="data" format="fastq" label="Read1" help="First read file (default: None)"/> 77 <param name="read1" type="data" format="fastq" label="Read1" help="First read file (default: None)"/>
45 <param name="read2" type="data" format="fastq" optional="true" label="Read2" help="Second read file (default: None)"/> 78 <param name="read2" type="data" format="fastq" optional="true" label="Read2" help="Second read file (default: None)"/>
46 </when> 79 </when>
80 <when value="paired_collection_fastq">
81 <param label="Reads (collection)" name="fastq_collection" type="data_collection" collection_type="paired" format="fastq,fastq.gz,fastqsanger,fastqsanger.gz" />
82 </when>
83 <when value="single_fastq">
84 <param label="Reads" name="fastq" type="data" format="fastq,fastq.gz,fastqsanger,fastqsanger.gz" />
85 </when>
47 <when value="bam"> 86 <when value="bam">
48 <param name="bam_input" type="data" format="bam" label="Bam" help="Warning!!!: The BAM files must have been created using the ensembl version of the genome."/> 87 <param name="bam_input" type="data" format="bam" label="Bam" help="Warning!!!: The BAM files must have been created using the ensembl version of the genome."/>
49 </when> 88 </when>
50 </conditional> 89 </conditional>
51 <param name="call_method" type="select" label="Call Method" help="Level of quality stringency required. (default: low)"> 90 <param name="output_format" label="Output format" type="select">
52 <option value="low" selected="true">low</option> 91 <option value="txt">Text</option>
53 <option value="high">high</option> 92 <option value="pdf">PDF</option>
54 <option value="optimise">optimise</option>
55 </param> 93 </param>
56 <param name="min_depth" label="Min Depth" type="integer" value="10" help="Minimum depth required to call variant. Bases with depth below this cutoff will be marked as missing (default: 10)"/> 94 <conditional name="advanced">
57 <param name="mapper" label="Mapper" type="select" help="Mapping tools to use (default: bwa)"> 95 <param label="Select advanced options" type="select" name="options">
58 <option value="bwa" selected="true">bwa</option> 96 <option value="yes">Yes</option>
59 <option value="minimap2">minimap2</option> 97 <option value="no" selected="true">No</option>
60 <option value="bowtie2">bowtie2</option> 98 </param>
61 </param> 99 <when value="no">
62 <param name="min_gene_frac" label="Minimum Gene Fraction" type="float" value="0.9" help="Used to infer a deletion if the fraction of a gene covered falls below this value. Also used to see if sample is high quality to continue by checking the fraction for rpoB (where deletion should not occur). (default: 0.9)"/> 100 </when>
63 <param name="txt" label="Generate text file ouput" type="boolean" value="false" help="Create reader-friendly text output in addition to standard JSON output (default: False)"/> 101 <when value="yes">
102 <param label="Quality required for calls to be accepted" type="select" argument="--call_method">
103 <option value="low" selected="true">Low</option>
104 <option value="high">High</option>
105 <option value="optimise">Optimise</option>
106 </param>
107 <param label="Minimum coverage fraction to infer deletion" type="float"
108 help="Used to infer a deletion if the fraction of a gene covered falls below this value."
109 argument="--min_gene_frac" value="0.9" />
110
111 <param name="min_depth" label="Min Depth" type="integer" value="10" help="Minimum depth required to call variant. Bases with depth below this cutoff will be marked as missing (default: 10)"/>
112 <param name="mapper" label="Mapper" type="select" help="Mapping tools to use (default: bwa)">
113 <option value="bwa" selected="true">bwa</option>
114 <option value="minimap2">minimap2</option>
115 <option value="bowtie2">bowtie2</option>
116 </param>
117 <param name="min_gene_frac" label="Minimum Gene Fraction" type="float" value="0.9" help="Used to infer a deletion if the fraction of a gene covered falls below this value. Also used to see if sample is high quality to continue by checking the fraction for rpoB (where deletion should not occur). (default: 0.9)" />
118 </when>
119 </conditional>
64 </inputs> 120 </inputs>
65 <outputs> 121 <outputs>
66 <data name="results_json" format="json" from_work_dir="results/tbprofiler.results.json" label="${tool.name} on ${on_string}: Results.json"/> 122 <data name="results_json" format="json" from_work_dir="results/tbprofiler.results.json" label="${tool.name} on ${on_string}: Results.json"/>
67 <data name="results_txt" format="txt" from_work_dir="results/tbprofiler.results.txt" label="${tool.name} on ${on_string}: Results.txt"> 123 <data format="vcf" name="output_vcf" label="${tool.name} VCF on ${on_string}" />
68 <filter>txt</filter> 124 <data format="bam" name="output_bam" label="${tool.name} BAM on ${on_string}">
125 <filter>fastq_or_bam['input_select'] != 'bam'</filter>
69 </data> 126 </data>
127 <data format="pdf" name="output_pdf" label="${tool.name} PDF report on ${on_string}">
128 <filter>output_format == 'pdf'</filter>
129 </data>
130 <data format="txt" name="output_txt" label="${tool.name} report on ${on_string}">
131 <filter>output_format == 'txt'</filter>
132 </data>
133
70 </outputs> 134 </outputs>
71 <tests> 135 <tests>
72 <test expect_num_outputs="1"> 136 <test>
73 <param name="read1" value="rif_resistant.fastq.gz"/> 137 <param name="input_select" value="single_fastq"/>
74 <output name="results_json" value="results_1.json"/> 138 <param name="fastq" ftype="fastq.gz" value="rif_resistant.fastq.gz" />
139 <param name="output_format" value="txt" />
140 <param name="platform" value="Illumina" />
141 <param name="options" value="no" />
142 <output name="output_txt">
143 <assert_contents>
144 <has_line line="Drug-resistance: Drug-resistant" />
145 <has_line line="lineage2.2.2&#009;1.000&#009;East-Asian (Beijing)&#009;Beijing-RD105/RD207&#009;RD105;RD207" />
146 <has_line line="rifampicin&#009;R&#009;rpoB p.Asp435Val (1.00)" />
147 <has_line line="763031&#009;Rv0667&#009;c.3225T>C&#009;1.000" />
148 </assert_contents>
149 </output>
75 </test> 150 </test>
76 <test expect_num_outputs="2"> 151 <test>
77 <param name="read1" value="rif_resistant.fastq.gz"/> 152 <param name="input_select" value="bam"/>
78 <param name="txt" value="true"/> 153 <param name="bam_input" ftype="bam" value="rif_resistant.bam" />
79 <param name="call_method" value="high"/> 154 <param name="output_format" value="txt" />
80 <param name="min_depth" value="11"/> 155 <param name="platform" value="Illumina" />
81 <output name="results_json" value="results_2.json"/> 156 <param name="options" value="no" />
82 <output name="results_txt" value="results_2.txt"/> 157 <output name="output_txt">
158 <assert_contents>
159 <has_line line="Drug-resistance: Drug-resistant" />
160 <has_line line="lineage2.2.2&#009;1.000&#009;East-Asian (Beijing)&#009;Beijing-RD105/RD207&#009;RD105;RD207" />
161 <has_line line="rifampicin&#009;R&#009;rpoB p.Asp435Val (1.00)" />
162 <has_line line="763031&#009;Rv0667&#009;c.3225T>C&#009;1.000" />
163 </assert_contents>
164 </output>
83 </test> 165 </test>
84 </tests> 166 </tests>
85 <help><![CDATA[ 167 <help><![CDATA[
86 Summary 168 Summary
87 ======= 169 =======