Mercurial > repos > galaxy-australia > smudgeplot
comparison smudgeplot.xml @ 4:5e0825476fb7 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc commit 72ae2e05f35098c4cb6dd4f038bff07fd36917ed
author | iuc |
---|---|
date | Tue, 04 Apr 2023 17:23:19 +0000 |
parents | 24e471d13fe9 |
children | 5a0ddb4dc3a4 |
comparison
equal
deleted
inserted
replaced
3:24e471d13fe9 | 4:5e0825476fb7 |
---|---|
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 | 3 |
4 <macros> | 4 <macros> |
5 <token name="@TOOL_VERSION@">0.2.5</token> | 5 <token name="@TOOL_VERSION@">0.2.5</token> |
6 <token name="@VERSION_SUFFIX@">1</token> | 6 <token name="@VERSION_SUFFIX@">2</token> |
7 </macros> | 7 </macros> |
8 | 8 |
9 <xrefs> | 9 <xrefs> |
10 <xref type="bio.tools">smudgeplots</xref> | 10 <xref type="bio.tools">smudgeplots</xref> |
11 </xrefs> | 11 </xrefs> |
14 <requirement type="package" version="@TOOL_VERSION@">smudgeplot</requirement> | 14 <requirement type="package" version="@TOOL_VERSION@">smudgeplot</requirement> |
15 <requirement type="package" version="2.3.0">kmer-jellyfish</requirement> | 15 <requirement type="package" version="2.3.0">kmer-jellyfish</requirement> |
16 </requirements> | 16 </requirements> |
17 | 17 |
18 <command detect_errors="exit_code"><![CDATA[ | 18 <command detect_errors="exit_code"><![CDATA[ |
19 set -o pipefail; | |
19 | 20 |
20 #if $file.input.input_select == 'reads' | 21 #if $file.input.input_select == 'reads' |
21 | 22 |
22 ## ~~~~~~~~~~~~~~~ Generate kmer-dump with presets ~~~~~~~~~~~~~~~~~~~~~ | 23 ## ~~~~~~~~~~~~~~~ Generate kmer-dump with presets ~~~~~~~~~~~~~~~~~~~~~ |
23 | 24 |
24 ## Jellyfish kmer count | 25 ## Jellyfish kmer count |
25 ## --------------------------------------------------------------------- | 26 ## --------------------------------------------------------------------- |
26 | 27 |
27 #if $file.input.reads[0].is_of_type("fastqsanger.gz") or $file.input.reads[0].is_of_type("fasta.gz") | 28 mkdir -p './files/' && |
28 gunzip -c | 29 #if $file.input.reads[0].ext.endswith(".gz") |
30 zcat | |
29 #for $f in $file.input.reads | 31 #for $f in $file.input.reads |
30 #if $f | 32 '$f' |
31 '$f' | |
32 #end if | |
33 | jellyfish count -m 21 -t 4 -s 1M -o 1_counts.jf -C /dev/stdin | |
34 #end for | 33 #end for |
35 | 34 | jellyfish count -m $file.input.mer_len -t \${GALAXY_SLOTS:-8} -s 1M -o 1_counts.jf -C /dev/stdin |
36 #else | 35 #else |
37 jellyfish count -m 21 -t 4 -s 1M -o 1_counts.jf -C | 36 jellyfish count -m $file.input.mer_len -t \${GALAXY_SLOTS:-8} -s 1M -o 1_counts.jf -C |
38 #for $f in $file.input.reads | 37 #for $f in $file.input.reads |
39 #if $f | 38 '$f' |
40 '$f' | |
41 #end if | |
42 #end for | 39 #end for |
43 #end if | 40 #end if |
44 | 41 |
45 && jellyfish histo 1_counts.jf > 1_kmer_k21.hist | 42 && jellyfish histo 1_counts.jf > 1_kmer_k21.hist |
46 | 43 |
47 ## Calculate lower and upper kmer count cutoffs | 44 ## Calculate lower and upper kmer count cutoffs |
48 ## --------------------------------------------------------------------- | 45 ## --------------------------------------------------------------------- |
49 | 46 |
50 #if $file.input.lower_cutoff is not None: | 47 #if $file.input.lower_cutoff: |
51 && L=$file.input.lower_cutoff | 48 && L=$file.input.lower_cutoff |
52 #else | 49 #else |
53 && L=\$(smudgeplot.py cutoff 1_kmer_k21.hist L) | 50 && L=\$(smudgeplot.py cutoff 1_kmer_k21.hist L) |
54 #end if | 51 #end if |
55 | 52 |
56 #if $file.input.upper_cutoff is not None: | 53 #if $file.input.upper_cutoff: |
57 && U=$file.input.upper_cutoff | 54 && U=$file.input.upper_cutoff |
58 #else | 55 #else |
59 && U=\$(smudgeplot.py cutoff 1_kmer_k21.hist U) | 56 && U=\$(smudgeplot.py cutoff 1_kmer_k21.hist U) |
60 #end if | 57 #end if |
61 | 58 |
75 #end if | 72 #end if |
76 | 73 |
77 ## --------------------------------------------------------------------- | 74 ## --------------------------------------------------------------------- |
78 ## Plot | 75 ## Plot |
79 | 76 |
80 && smudgeplot.py plot 2_kmer_pairs_coverages.tsv -o my_genome | 77 && smudgeplot.py plot $homozygous 2_kmer_pairs_coverages.tsv -o my_genome |
81 | 78 |
82 ]]></command> | 79 ]]></command> |
83 | 80 |
84 <inputs> | 81 <inputs> |
85 <section name="file" title="File inputs" expanded="true"> | 82 <section name="file" title="File inputs" expanded="true"> |
99 label="Sequencing reads" multiple="true" | 96 label="Sequencing reads" multiple="true" |
100 help="Sequencing reads corresponding to your genome. | 97 help="Sequencing reads corresponding to your genome. |
101 Don't worry about read pairing as it is not used in Kmer-counting. | 98 Don't worry about read pairing as it is not used in Kmer-counting. |
102 If selecting multiple datasets, please do not mix datatypes!" | 99 If selecting multiple datasets, please do not mix datatypes!" |
103 /> | 100 /> |
101 | |
102 <param argument="--mer-len" | |
103 type="integer" | |
104 min="1" | |
105 value="21" | |
106 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" /> | |
108 | |
104 | 109 |
105 <param | 110 <param |
106 name="lower_cutoff" | 111 name="lower_cutoff" |
112 min="1" | |
107 label="Lower kmer cutoff" | 113 label="Lower kmer cutoff" |
108 type="integer" | 114 type="integer" |
109 optional="true" | 115 optional="true" |
110 help="Optionally set a manual lower limit for filtering kmers with | 116 help="Optionally set a manual lower limit for filtering kmers with |
111 smudgeplot hetkmers. If no value is set, a cutoff will be | 117 smudgeplot hetkmers. If no value is set, a cutoff will be |
113 visualize your kmer histogram when choosing cutoff values." | 119 visualize your kmer histogram when choosing cutoff values." |
114 /> | 120 /> |
115 | 121 |
116 <param | 122 <param |
117 name="upper_cutoff" | 123 name="upper_cutoff" |
124 min="1" | |
118 label="Upper kmer cutoff" | 125 label="Upper kmer cutoff" |
119 type="integer" | 126 type="integer" |
120 optional="true" | 127 optional="true" |
121 help="Optionally set a manual upper limit for filtering kmers with | 128 help="Optionally set a manual upper limit for filtering kmers with |
122 smudgeplot hetkmers. If no value is set, a cutoff will be | 129 smudgeplot hetkmers. If no value is set, a cutoff will be |
133 This enables control over kmer-counting parameters." | 140 This enables control over kmer-counting parameters." |
134 /> | 141 /> |
135 </when> | 142 </when> |
136 </conditional> | 143 </conditional> |
137 </section> | 144 </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." /> | |
138 | 146 |
139 <param name="table_output" type="boolean" label="Output summary table"></param> | 147 <param name="table_output" type="boolean" label="Output summary table"></param> |
140 <param name="verbose_output" type="boolean" label="Output verbose summary"></param> | 148 <param name="verbose_output" type="boolean" label="Output verbose summary"></param> |
141 <param name="warnings_output" type="boolean" label="Output genome warnings"></param> | 149 <param name="warnings_output" type="boolean" label="Output genome warnings"></param> |
142 </inputs> | 150 </inputs> |
222 <test expect_num_outputs="2"> | 230 <test expect_num_outputs="2"> |
223 <param name="input_select" value="dump"/> | 231 <param name="input_select" value="dump"/> |
224 <param name="dump" value="dump.jf" ftype="txt"/> | 232 <param name="dump" value="dump.jf" ftype="txt"/> |
225 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot.png" compare="sim_size"/> | 233 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot.png" compare="sim_size"/> |
226 </test> | 234 </test> |
235 <!-- Standard run without specifying cutoffs and compressed file --> | |
236 <test expect_num_outputs="2"> | |
237 <param name="input_select" value="reads"/> | |
238 <param name="reads" value="test_reads_4.fasta.gz,test_reads_5.fasta.gz"/> | |
239 <output name="smudgeplot" ftype="png" file="my_genome_smudgeplot_02.png" compare="sim_size"/> | |
240 <assert_stdout> | |
241 <has_text text="Dump with cutoffs L=10, U=70" /> | |
242 </assert_stdout> | |
243 </test> | |
227 </tests> | 244 </tests> |
228 | 245 |
229 <help><![CDATA[ | 246 <help><![CDATA[ |
230 | 247 |
231 .. class:: infomark | 248 .. class:: infomark |