comparison smudgeplot.xml @ 5:5a0ddb4dc3a4 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc commit 77e22c56f8da58853100ef1be59ba8d077ab1bf4
author iuc
date Thu, 04 May 2023 16:33:09 +0000
parents 5e0825476fb7
children
comparison
equal deleted inserted replaced
4:5e0825476fb7 5:5a0ddb4dc3a4
1 <tool id="smudgeplot" name="Smudgeplot" version="@TOOL_VERSION@+galaxy+@VERSION_SUFFIX@" profile="21.05"> 1 <tool id="smudgeplot" name="Smudgeplot" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
2 <description>inference of ploidy and heterozygosity structure using whole genome sequencing</description> 2 <description>inference of ploidy and heterozygosity structure using whole genome sequencing</description>
3
4 <macros> 3 <macros>
5 <token name="@TOOL_VERSION@">0.2.5</token> 4 <import>macros.xml</import>
6 <token name="@VERSION_SUFFIX@">2</token>
7 </macros> 5 </macros>
8 6 <expand macro="xrefs"/>
9 <xrefs> 7 <expand macro="requirements"/>
10 <xref type="bio.tools">smudgeplots</xref>
11 </xrefs>
12
13 <requirements>
14 <requirement type="package" version="@TOOL_VERSION@">smudgeplot</requirement>
15 <requirement type="package" version="2.3.0">kmer-jellyfish</requirement>
16 </requirements>
17 8
18 <command detect_errors="exit_code"><![CDATA[ 9 <command detect_errors="exit_code"><![CDATA[
19 set -o pipefail; 10 set -o pipefail;
20 11
21 #if $file.input.input_select == 'reads' 12 #if $file.input.input_select == 'reads'
61 52
62 && echo "Dump with cutoffs L=\$L, U=\$U" 53 && echo "Dump with cutoffs L=\$L, U=\$U"
63 && jellyfish dump -c -L \$L -U \$U 1_counts.jf > 2_dump.jf 54 && jellyfish dump -c -L \$L -U \$U 1_counts.jf > 2_dump.jf
64 && smudgeplot.py hetkmers -o 2_kmer_pairs 2_dump.jf 55 && smudgeplot.py hetkmers -o 2_kmer_pairs 2_dump.jf
65 56
57
66 #else 58 #else
67 59 #if $file.input.input_mode.selector == 'meryl'
68 ## ~~~~~~~~~~~~~~~~~~~ Use provided kmer dump ~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 tar -zxf '${file.input.input_mode.meryl_database}' -C ./ &&
69 61 #if $file.input.input_mode.lower_cutoff:
70 smudgeplot.py hetkmers -o 2_kmer_pairs '$file.input.dump' 62 L=$file.input.input_mode.lower_cutoff &&
63 #else
64 L=\$(smudgeplot.py cutoff '${file.input.input_mode.meryl_histogram}' L) &&
65 #end if
66
67 #if $file.input.input_mode.upper_cutoff:
68 U=$file.input.input_mode.upper_cutoff &&
69 #else
70 U=\$(smudgeplot.py cutoff '${file.input.input_mode.meryl_histogram}' U) &&
71 #end if
72
73 meryl print less-than \$U greater-than \$L threads=\${GALAXY_SLOTS:-8} memory=\$((\${GALAXY_MEMORY_MB:-8192}/1024)) read-db.meryl | sort > meryl.dump &&
74 smudgeplot.py hetkmers -o 2_kmer_pairs < meryl.dump
75
76 #else
77
78 smudgeplot.py hetkmers -o 2_kmer_pairs '$file.input.input_mode.dump'
79 #end if
71 80
72 #end if 81 #end if
73 82
74 ## --------------------------------------------------------------------- 83 ## ---------------------------------------------------------------------
75 ## Plot 84 ## Plot
104 min="1" 113 min="1"
105 value="21" 114 value="21"
106 label="K-mer size" 115 label="K-mer size"
107 help="The size of k-mers should be large enough allowing the k-mer to map uniquely to the genome" /> 116 help="The size of k-mers should be large enough allowing the k-mer to map uniquely to the genome" />
108 117
109 118 <expand macro="cutoff_macro"/>
110 <param 119
111 name="lower_cutoff"
112 min="1"
113 label="Lower kmer cutoff"
114 type="integer"
115 optional="true"
116 help="Optionally set a manual lower limit for filtering kmers with
117 smudgeplot hetkmers. If no value is set, a cutoff will be
118 estimated with smudgeplot cutoff. Use the GenomeScope tool to
119 visualize your kmer histogram when choosing cutoff values."
120 />
121
122 <param
123 name="upper_cutoff"
124 min="1"
125 label="Upper kmer cutoff"
126 type="integer"
127 optional="true"
128 help="Optionally set a manual upper limit for filtering kmers with
129 smudgeplot hetkmers. If no value is set, a cutoff will be
130 estimated with smudgeplot cutoff. Use the GenomeScope tool to
131 visualize your kmer histogram when choosing cutoff values."
132 />
133 </when> 120 </when>
134 121
135 <when value="dump"> 122 <when value="dump">
136 <param 123 <conditional name="input_mode">
137 name="dump" type="data" format="txt" 124 <param name="selector" type="select" label="Input mode">
138 label="Kmer dump" 125 <option value="default">Default k-mer dump dataset</option>
139 help="Upload your own Kmer dump file created with the Jellyfish or KMC tool. 126 <option value="meryl">Meryl database</option>
140 This enables control over kmer-counting parameters." 127 </param>
141 /> 128 <when value="default">
129 <param
130 name="dump" type="data" format="txt"
131 label="Kmer dump"
132 help="Upload your own Kmer dump file created with the Jellyfish or KMC tool.
133 This enables control over kmer-counting parameters."
134 />
135 </when>
136 <when value="meryl">
137 <param argument="meryl_histogram" type="data" format="tabular" label="Meryl histogram"/>
138 <param argument="meryl_database" type="data" format="meryldb" label="Meryl database"/>
139 <expand macro="cutoff_macro"/>
140 </when>
141 </conditional>
142
142 </when> 143 </when>
143 </conditional> 144 </conditional>
144 </section> 145 </section>
145 <param argument="--homozygous" type="boolean" truevalue="--homozygous" falsevalue="" checked="false" label="Homozygous" help="Assume no heterozygosity in the genome - plotting a paralog structure." /> 146 <param argument="--homozygous" type="boolean" truevalue="--homozygous" falsevalue="" checked="false" label="Homozygous" help="Assume no heterozygosity in the genome - plotting a paralog structure." />
146 147
227 <output name="genome_warnings" ftype="txt" file="my_genome_warnings.txt"/> 228 <output name="genome_warnings" ftype="txt" file="my_genome_warnings.txt"/>
228 </test> 229 </test>
229 <!-- K-mer dump input --> 230 <!-- K-mer dump input -->
230 <test expect_num_outputs="2"> 231 <test expect_num_outputs="2">
231 <param name="input_select" value="dump"/> 232 <param name="input_select" value="dump"/>
232 <param name="dump" value="dump.jf" ftype="txt"/> 233 <conditional name="input_mode">
234 <param name="selector" value="default"/>
235 <param name="dump" value="dump.jf" ftype="txt"/>
236 </conditional>
233 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot.png" compare="sim_size"/> 237 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot.png" compare="sim_size"/>
234 </test> 238 </test>
235 <!-- Standard run without specifying cutoffs and compressed file --> 239 <!-- Standard run without specifying cutoffs and compressed file -->
236 <test expect_num_outputs="2"> 240 <test expect_num_outputs="2">
237 <param name="input_select" value="reads"/> 241 <param name="input_select" value="reads"/>
239 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot_02.png" compare="sim_size"/> 243 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot_02.png" compare="sim_size"/>
240 <assert_stdout> 244 <assert_stdout>
241 <has_text text="Dump with cutoffs L=10, U=70" /> 245 <has_text text="Dump with cutoffs L=10, U=70" />
242 </assert_stdout> 246 </assert_stdout>
243 </test> 247 </test>
248 <!-- K-mer dump meryl input -->
249 <test expect_num_outputs="2">
250 <param name="input_select" value="dump"/>
251 <conditional name="input_mode">
252 <param name="selector" value="meryl"/>
253 <param name="meryl_histogram" value="histogram.tabular" ftype="tabular"/>
254 <param name="meryl_database" value="kmerdb.meryldb" ftype="meryldb"/>
255 </conditional>
256 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot_03.png" compare="sim_size"/>
257 </test>
258 <!-- K-mer dump meryl input with specific cutoff-->
259 <test expect_num_outputs="2">
260 <param name="input_select" value="dump"/>
261 <conditional name="input_mode">
262 <param name="selector" value="meryl"/>
263 <param name="meryl_histogram" value="histogram.tabular" ftype="tabular"/>
264 <param name="meryl_database" value="kmerdb.meryldb" ftype="meryldb"/>
265 <param name="lower_cutoff" value="2"/>
266 <param name="upper_cutoff" value="2500000"/>
267 </conditional>
268 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot_04.png" compare="sim_size"/>
269 </test>
244 </tests> 270 </tests>
245 271
246 <help><![CDATA[ 272 <help><![CDATA[
247 273
248 .. class:: infomark 274 .. class:: infomark
301 327
302 - ``smudgeplot.py hetkmers -o kmer_pairs dump.jf`` 328 - ``smudgeplot.py hetkmers -o kmer_pairs dump.jf``
303 - ``smudgeplot.py plot kmer_pairs_coverages.tsv -o my_genome`` 329 - ``smudgeplot.py plot kmer_pairs_coverages.tsv -o my_genome``
304 330
305 ]]></help> 331 ]]></help>
306 <citations> 332 <expand macro="citations"/>
307 <citation type="doi">10.1038/s41467-020-14998-3</citation>
308 </citations>
309 </tool> 333 </tool>