Mercurial > repos > iuc > metabat2_jgi_summarize_bam_contig_depths
comparison jgi_summarize_bam_contig_depths.xml @ 1:1592150e38d2 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metabat2/ commit f239f2bb562330c955c19c328935793d6f1f2aa7
author | iuc |
---|---|
date | Fri, 29 Jul 2022 12:37:53 +0000 |
parents | d27a4ed006ee |
children | a4441f35f17b |
comparison
equal
deleted
inserted
replaced
0:d27a4ed006ee | 1:1592150e38d2 |
---|---|
1 <tool id="metabat2_jgi_summarize_bam_contig_depths" name="Calculate contig depths" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | 1 <tool id="metabat2_jgi_summarize_bam_contig_depths" name="Calculate contig depths" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
2 <description>for MetaBAT2</description> | 2 <description>for MetaBAT2</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 <xml name="use_reference"> | |
6 <param name="use_reference" type="select" label="Select a reference genome?"> | |
7 <option value="no" selected="true">No</option> | |
8 <option value="yes">Yes</option> | |
9 </param> | |
10 </xml> | |
11 <xml name="reference_source"> | |
12 <param name="reference_source" type="select" label="Choose the source for the reference genome"> | |
13 <option value="cached" selected="true">locally cached</option> | |
14 <option value="history">from history</option> | |
15 </param> | |
16 </xml> | |
17 <xml name="referenceFasta"> | |
18 <param argument="--referenceFasta" type="data" format="fasta,fasta.gz" label="Using reference genome" help="Must be the reference used to map the input bam files"/> | |
19 </xml> | |
20 <xml name="gcWindow"> | |
21 <param argument="--gcWindow" type="integer" value ="100" label="Sliding window size for GC calculations"/> | |
22 </xml> | |
5 </macros> | 23 </macros> |
6 <expand macro="requirements"/> | 24 <expand macro="requirements"/> |
7 <command detect_errors="exit_code"><![CDATA[ | 25 <command detect_errors="exit_code"><![CDATA[ |
8 jgi_summarize_bam_contig_depths | 26 jgi_summarize_bam_contig_depths |
9 --outputDepth '$outputDepth' | 27 --outputDepth '$outputDepth' |
10 --percentIdentity $advanced.percentIdentity | 28 --percentIdentity $advanced.percentIdentity |
11 #if str($advanced.output_paired_contigs) == 'yes': | 29 #if $advanced.output_paired_contigs |
12 --pairedContigs '$outputPairedContigs' | 30 --pairedContigs '$outputPairedContigs' |
13 #end if | 31 #end if |
14 $advanced.noIntraDepthVariance | 32 $advanced.noIntraDepthVariance |
15 $advanced.showDepth | 33 $advanced.showDepth |
16 --minMapQual $advanced.minMapQual | 34 --minMapQual $advanced.minMapQual |
17 --weightMapQual $advanced.weightMapQual | 35 --weightMapQual $advanced.weightMapQual |
18 $advanced.includeEdgeBases | 36 $advanced.includeEdgeBases |
19 --maxEdgeBases $advanced.maxEdgeBases | 37 --maxEdgeBases $advanced.maxEdgeBases |
20 #if str($advanced.use_reference_cond.use_reference) == 'yes': | 38 #if str($mode.use_reference_cond.use_reference) == 'yes' |
21 #if str($advanced.use_reference_cond.reference_cond.reference_source) == 'cached' | 39 #if str($mode.use_reference_cond.reference_cond.reference_source) == 'cached' |
22 --referenceFasta '$advanced.use_reference_cond.reference_cond.referenceFasta.fields.path' | 40 --referenceFasta '$mode.use_reference_cond.reference_cond.referenceFasta.fields.path' |
23 #else: | 41 #else |
24 --referenceFasta '$advanced.use_reference_cond.reference_cond.referenceFasta' | 42 --referenceFasta '$mode.use_reference_cond.reference_cond.referenceFasta' |
25 #end if | 43 #end if |
26 --outputGC '$outputGC' | 44 --outputGC '$outputGC' |
27 --gcWindow $advanced.use_reference_cond.gcWindow | 45 --gcWindow $mode.use_reference_cond.gcWindow |
28 --outputReadStats '$outputReadStats' | 46 --outputReadStats '$outputReadStats' |
29 --outputKmers '$outputKmers' | 47 --outputKmers '$outputKmers' |
30 #end if | 48 #end if |
31 --shredLength $shredding.shredLength | 49 --shredLength $shredding.shredLength |
32 --shredDepth $shredding.shredDepth | 50 --shredDepth $shredding.shredDepth |
33 --minContigLength $shredding.minContigLength | 51 --minContigLength $shredding.minContigLength |
34 --minContigDepth $shredding.minContigDepth | 52 --minContigDepth $shredding.minContigDepth |
35 #for bam_input in $bam_inputs: | 53 #if $mode.type == 'individual' |
54 '$mode.bam_indiv_input' | |
55 #else | |
56 #for $bam_input in $mode.bam_co_inputs | |
36 '$bam_input' | 57 '$bam_input' |
37 #end for | 58 #end for |
59 #end if | |
38 ]]></command> | 60 ]]></command> |
39 <inputs> | 61 <inputs> |
40 <param name="bam_inputs" type="data" format="bam" multiple="true" label="Sorted bam files"/> | 62 <conditional name="mode"> |
63 <param name="type" type="select" label="Mode to process BAM files"> | |
64 <option value="individual">One by one</option> | |
65 <option value="co">Together</option> | |
66 </param> | |
67 <when value="individual"> | |
68 <param name="bam_indiv_input" type="data" format="bam" label="Sorted bam files"/> | |
69 <conditional name="use_reference_cond"> | |
70 <expand macro="use_reference"/> | |
71 <when value="no"/> | |
72 <when value="yes"> | |
73 <conditional name="reference_cond"> | |
74 <expand macro="reference_source"/> | |
75 <when value="cached"> | |
76 <param argument="--referenceFasta" type="select" label="Using reference genome"> | |
77 <options from_data_table="fasta_indexes"> | |
78 <filter type="data_meta" column="1" key="dbkey" ref="bam_indiv_input"/> | |
79 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected BAM file(s)"/> | |
80 </options> | |
81 </param> | |
82 </when> | |
83 <when value="history"> | |
84 <expand macro="referenceFasta"/> | |
85 </when> | |
86 </conditional> | |
87 <expand macro="gcWindow"/> | |
88 </when> | |
89 </conditional> | |
90 </when> | |
91 <when value="co"> | |
92 <param name="bam_co_inputs" type="data" format="bam" multiple="true" label="Sorted bam files"/> | |
93 <conditional name="use_reference_cond"> | |
94 <expand macro="use_reference"/> | |
95 <when value="no"/> | |
96 <when value="yes"> | |
97 <conditional name="reference_cond"> | |
98 <expand macro="reference_source"/> | |
99 <when value="cached"> | |
100 <param argument="--referenceFasta" type="select" label="Using reference genome"> | |
101 <options from_data_table="fasta_indexes"> | |
102 <filter type="data_meta" column="1" key="dbkey" ref="bam_co_inputs"/> | |
103 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected BAM file(s)"/> | |
104 </options> | |
105 </param> | |
106 </when> | |
107 <when value="history"> | |
108 <expand macro="referenceFasta"/> | |
109 </when> | |
110 </conditional> | |
111 <expand macro="gcWindow"/> | |
112 </when> | |
113 </conditional> | |
114 </when> | |
115 </conditional> | |
41 <section name="advanced" title="Advanced options"> | 116 <section name="advanced" title="Advanced options"> |
42 <param argument="--percentIdentity" type="integer" value="97" label="Minimum end-to-end percent identity of qualifying reads"/> | 117 <param argument="--percentIdentity" type="integer" value="97" label="Minimum end-to-end percent identity of qualifying reads"/> |
43 <param name="output_paired_contigs" type="select" display="radio" label="Output the sparse matrix of contigs which paired reads span?"> | 118 <param name="output_paired_contigs" type="boolean" checked="false" label="Output the sparse matrix of contigs which paired reads span?"/> |
44 <option value="no" selected="true">No</option> | |
45 <option value="yes">Yes</option> | |
46 </param> | |
47 <param argument="--noIntraDepthVariance" type="boolean" truevalue="--noIntraDepthVariance" falsevalue="" checked="false" label="Remove variance from mean depth along the contig?"/> | 119 <param argument="--noIntraDepthVariance" type="boolean" truevalue="--noIntraDepthVariance" falsevalue="" checked="false" label="Remove variance from mean depth along the contig?"/> |
48 <param argument="--showDepth" type="boolean" truevalue="--showDepth" falsevalue="" checked="false" label="Output a depth file per bam for each contig base?"/> | 120 <param argument="--showDepth" type="boolean" truevalue="--showDepth" falsevalue="" checked="false" label="Output a depth file per bam for each contig base?"/> |
49 <param argument="--minMapQual" type="integer" value="0" label="Minimum mapping quality necessary to count a read as mapped"/> | 121 <param argument="--minMapQual" type="integer" value="0" label="Minimum mapping quality necessary to count a read as mapped"/> |
50 <param argument="--weightMapQual" type="float" value="0.0" label="Weight per-base depth based on the MQ of the read" help="Zero value disables"/> | 122 <param argument="--weightMapQual" type="float" value="0.0" label="Weight per-base depth based on the MQ of the read" help="Zero value disables"/> |
51 <param argument="--includeEdgeBases" type="boolean" truevalue="--includeEdgeBases" falsevalue="" checked="false" label="Include 1-readlength edges when calculating depth and variance?"/> | 123 <param argument="--includeEdgeBases" type="boolean" truevalue="--includeEdgeBases" falsevalue="" checked="false" label="Include 1-readlength edges when calculating depth and variance?"/> |
52 <param argument="--maxEdgeBases" type="integer" value="75" label="Maximum length when calculating depth and variance" help="Ignored when including 1-readlength edges when calculating depth and variance"/> | 124 <param argument="--maxEdgeBases" type="integer" value="75" label="Maximum length when calculating depth and variance" help="Ignored when including 1-readlength edges when calculating depth and variance"/> |
53 <conditional name="use_reference_cond"> | 125 |
54 <param name="use_reference" type="select" label="Select a reference genome?"> | |
55 <option value="no" selected="true">No</option> | |
56 <option value="yes">Yes</option> | |
57 </param> | |
58 <when value="no"/> | |
59 <when value="yes"> | |
60 <conditional name="reference_cond"> | |
61 <param name="reference_source" type="select" label="Choose the source for the reference genome"> | |
62 <option value="cached" selected="true">locally cached</option> | |
63 <option value="history">from history</option> | |
64 </param> | |
65 <when value="cached"> | |
66 <param argument="--referenceFasta" type="select" label="Using reference genome"> | |
67 <options from_data_table="fasta_indexes"> | |
68 <filter type="data_meta" column="1" key="dbkey" ref="bam_inputs"/> | |
69 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected BAM file(s)"/> | |
70 </options> | |
71 </param> | |
72 </when> | |
73 <when value="history"> | |
74 <param argument="--referenceFasta" type="data" format="fasta,fasta.gz" label="Using reference genome" help="Must be the reference used to map the input bam files"/> | |
75 </when> | |
76 </conditional> | |
77 <param argument="--gcWindow" type="integer" value ="100" label="Sliding window size for GC calculations"/> | |
78 </when> | |
79 </conditional> | |
80 </section> | 126 </section> |
81 <section name="shredding" title="Options to control shredding contigs that are under-represented by the reads"> | 127 <section name="shredding" title="Options to control shredding contigs that are under-represented by the reads"> |
82 <param argument="--shredLength" type="integer" value="16000" label="Maximum length of the shreds"/> | 128 <param argument="--shredLength" type="integer" value="16000" label="Maximum length of the shreds"/> |
83 <param argument="--shredDepth" type="integer" value="5" label="Depth to generate overlapping shreds"/> | 129 <param argument="--shredDepth" type="integer" value="5" label="Depth to generate overlapping shreds"/> |
84 <param argument="--minContigLength" type="integer" value="1" label="Mimimum length of contig to include for mapping and shredding"/> | 130 <param argument="--minContigLength" type="integer" value="1" label="Mimimum length of contig to include for mapping and shredding"/> |
85 <param argument="--minContigDepth" type="float" value="0.0" label="Minimum depth along the contig at which to break the contig"/> | 131 <param argument="--minContigDepth" type="float" value="0.0" label="Minimum depth along the contig at which to break the contig"/> |
86 </section> | 132 </section> |
87 </inputs> | 133 </inputs> |
88 <outputs> | 134 <outputs> |
89 <data name="outputDepth" format="tabular" label="${tool.name} on ${on_string} (depth matrix)"/> | 135 <data name="outputDepth" format="tabular" label="${tool.name} on ${on_string}: Depth matrix"/> |
90 <data name="outputPairedContigs" format="fasta" label="${tool.name} on ${on_string} (paired contigs)"> | 136 <data name="outputPairedContigs" format="fasta" label="${tool.name} on ${on_string}: Paired contigs"> |
91 <filter>advanced["output_paired_contigs"] == "yes"</filter> | 137 <filter>advanced["output_paired_contigs"]</filter> |
92 </data> | 138 </data> |
93 <data name="outputGC" format="tabular" label="${tool.name} on ${on_string} (gc coverage histogram)"> | 139 <data name="outputGC" format="tabular" label="${tool.name} on ${on_string}: GC coverage histogram"> |
94 <filter>advanced["use_reference_cond"]["use_reference"] == "yes"</filter> | 140 <filter>mode["use_reference_cond"]["use_reference"] == 'yes'</filter> |
95 </data> | 141 </data> |
96 <data name="outputReadStats" format="tabular" label="${tool.name} on ${on_string} (read statistics)"> | 142 <data name="outputReadStats" format="tabular" label="${tool.name} on ${on_string}: Read statistics"> |
97 <filter>advanced["use_reference_cond"]["use_reference"] == "yes"</filter> | 143 <filter>mode["use_reference_cond"]["use_reference"] == 'yes'</filter> |
98 </data> | 144 </data> |
99 <data name="outputKmers" format="tabular" label="${tool.name} on ${on_string} (perfect kmer counts)"> | 145 <data name="outputKmers" format="tabular" label="${tool.name} on ${on_string}: Perfect kmer counts"> |
100 <filter>advanced["use_reference_cond"]["use_reference"] == "yes"</filter> | 146 <filter>mode["use_reference_cond"]["use_reference"] == 'yes'</filter> |
101 </data> | 147 </data> |
102 </outputs> | 148 </outputs> |
103 <tests> | 149 <tests> |
104 <!-- Single input, default settings --> | 150 <!-- Single input, default settings --> |
105 <test expect_num_outputs="1"> | 151 <test expect_num_outputs="1"> |
106 <param name="bam_inputs" value="input1.bam" ftype="bam"/> | 152 <conditional name="mode"> |
153 <param name="type" value="individual"/> | |
154 <param name="bam_indiv_input" value="input1.bam" ftype="bam"/> | |
155 </conditional> | |
107 <output name="outputDepth" file="jgi_output1.tabular" ftype="tabular" compare="contains"/> | 156 <output name="outputDepth" file="jgi_output1.tabular" ftype="tabular" compare="contains"/> |
108 </test> | 157 </test> |
109 <!-- Multiple inputs, default settings --> | 158 <!-- Multiple inputs, default settings --> |
110 <test expect_num_outputs="1"> | 159 <test expect_num_outputs="1"> |
111 <param name="bam_inputs" value="input1.bam,input1.bam" ftype="bam"/> | 160 <conditional name="mode"> |
161 <param name="type" value="co"/> | |
162 <param name="bam_co_inputs" value="input1.bam,input1.bam" ftype="bam"/> | |
163 </conditional> | |
112 <output name="outputDepth" file="jgi_output2.tabular" ftype="tabular" compare="contains"/> | 164 <output name="outputDepth" file="jgi_output2.tabular" ftype="tabular" compare="contains"/> |
113 </test> | 165 </test> |
114 <!-- Single input, output paired contigs, reference from history --> | 166 <!-- Single input, output paired contigs, reference from history --> |
115 <test expect_num_outputs="5"> | 167 <test expect_num_outputs="5"> |
116 <param name="bam_inputs" value="input2.bam" ftype="bam" dbkey="89"/> | 168 <conditional name="mode"> |
117 <param name="output_paired_contigs" value="yes"/> | 169 <param name="type" value="individual"/> |
118 <param name="use_reference" value="yes"/> | 170 <param name="bam_indiv_input" value="input2.bam" ftype="bam" dbkey="89"/> |
119 <param name="reference_source" value="history"/> | 171 <conditional name="use_reference_cond"> |
120 <param name="referenceFasta" value="NC_002945v4.fasta" ftype="fasta"/> | 172 <param name="use_reference" value="yes"/> |
173 <conditional name="reference_cond"> | |
174 <param name="reference_source" value="history"/> | |
175 <param name="referenceFasta" value="NC_002945v4.fasta" ftype="fasta"/> | |
176 </conditional> | |
177 </conditional> | |
178 </conditional> | |
179 <section name="advanced"> | |
180 <param name="output_paired_contigs" value="true"/> | |
181 </section> | |
121 <output name="outputDepth" file="jgi_output_depth1.tabular" ftype="tabular" compare="contains"/> | 182 <output name="outputDepth" file="jgi_output_depth1.tabular" ftype="tabular" compare="contains"/> |
122 <output name="outputPairedContigs" file="jgi_output_paired_contigs1.fasta" ftype="fasta"/> | 183 <output name="outputPairedContigs" file="jgi_output_paired_contigs1.fasta" ftype="fasta"/> |
123 <output name="outputGC" file="jgi_output_gc1.tabular" ftype="tabular"/> | 184 <output name="outputGC" file="jgi_output_gc1.tabular" ftype="tabular"/> |
124 <output name="outputReadStats" file="jgi_output_read_stats1.tabular" ftype="tabular"/> | 185 <output name="outputReadStats" file="jgi_output_read_stats1.tabular" ftype="tabular"/> |
125 <output name="outputKmers" file="jgi_output_kmers1.tabular" ftype="tabular"/> | 186 <output name="outputKmers" file="jgi_output_kmers1.tabular" ftype="tabular"/> |
126 </test> | 187 </test> |
127 <!-- Single input, output paired contigs, cached reference --> | 188 <!-- Single input, output paired contigs, cached reference --> |
128 <test expect_num_outputs="5"> | 189 <test expect_num_outputs="5"> |
129 <param name="bam_inputs" value="input2.bam" ftype="bam" dbkey="89"/> | 190 <conditional name="mode"> |
130 <param name="output_paired_contigs" value="yes"/> | 191 <param name="type" value="individual"/> |
131 <param name="use_reference" value="yes"/> | 192 <param name="bam_indiv_input" value="input2.bam" ftype="bam" dbkey="89"/> |
132 <param name="reference_source" value="cached"/> | 193 <conditional name="use_reference_cond"> |
194 <param name="use_reference" value="yes"/> | |
195 <conditional name="reference_cond"> | |
196 <param name="reference_source" value="cached"/> | |
197 </conditional> | |
198 </conditional> | |
199 </conditional> | |
200 <section name="advanced"> | |
201 <param name="output_paired_contigs" value="true"/> | |
202 </section> | |
133 <output name="outputDepth" file="jgi_output_depth1.tabular" ftype="tabular" compare="contains"/> | 203 <output name="outputDepth" file="jgi_output_depth1.tabular" ftype="tabular" compare="contains"/> |
134 <output name="outputPairedContigs" file="jgi_output_paired_contigs1.fasta" ftype="fasta"/> | 204 <output name="outputPairedContigs" file="jgi_output_paired_contigs1.fasta" ftype="fasta"/> |
135 <output name="outputGC" file="jgi_output_gc1.tabular" ftype="tabular"/> | 205 <output name="outputGC" file="jgi_output_gc1.tabular" ftype="tabular"/> |
136 <output name="outputReadStats" file="jgi_output_read_stats1.tabular" ftype="tabular"/> | 206 <output name="outputReadStats" file="jgi_output_read_stats1.tabular" ftype="tabular"/> |
137 <output name="outputKmers" file="jgi_output_kmers1.tabular" ftype="tabular"/> | 207 <output name="outputKmers" file="jgi_output_kmers1.tabular" ftype="tabular"/> |
138 </test> | 208 </test> |
139 </tests> | 209 </tests> |
140 <help> | 210 <help><![CDATA[ |
141 **What it does** | 211 **What it does** |
142 | 212 |
143 Calculates coverage depth for each sequence in one or more selected BAM files, producing a tabular file (for each input) | 213 Calculates coverage depth for each sequence in one or more selected BAM files, producing a tabular file (for each input) |
144 having mean and variance of base coverage depth that can be used as one of the inputs for the MetaBAT2 metagenome binning | 214 having mean and variance of base coverage depth that can be used as one of the inputs for the MetaBAT2 metagenome binning |
145 tool. | 215 tool. |
170 | 240 |
171 **Options** | 241 **Options** |
172 | 242 |
173 * **Select a reference genome** - optionally select the reference genome that was used to map the input bam file(s) and 3 additional outputs will be produced; gc coverage histogram, read statistics and perfect kmer counts. | 243 * **Select a reference genome** - optionally select the reference genome that was used to map the input bam file(s) and 3 additional outputs will be produced; gc coverage histogram, read statistics and perfect kmer counts. |
174 | 244 |
175 </help> | 245 ]]></help> |
176 <expand macro="citations"/> | 246 <expand macro="citations"/> |
177 </tool> | 247 </tool> |
178 | 248 |