Mercurial > repos > galaxy-australia > kmc
comparison kmc.xml @ 1:c7fda6e88567 draft
planemo upload for repository https://github.com/usegalaxy-au/tools-au/tree/master/tools/kmc commit 3be367228b531c346c10700f07d57ae44394be36-dirty
author | galaxy-australia |
---|---|
date | Tue, 01 Oct 2024 04:06:26 +0000 |
parents | ca2743037241 |
children | c97f8a687258 |
comparison
equal
deleted
inserted
replaced
0:ca2743037241 | 1:c7fda6e88567 |
---|---|
1 <tool id="kmc" name="KMC Counter" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" > | 1 <tool id="kmc" name="KMC Counter" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
2 <description>K-mer counting and filtering of reads</description> | 2 <description>K-mer counting and filtering of reads</description> |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
3 <xrefs> | 6 <xrefs> |
4 <xref type='bio.tools'>kmc</xref> | 7 <xref type='bio.tools'>kmc</xref> |
5 </xrefs> | 8 </xrefs> |
6 <macros> | |
7 <import>macros.xml</import> | |
8 </macros> | |
9 <expand macro="requirements" /> | 9 <expand macro="requirements" /> |
10 <expand macro="stdio" /> | 10 <expand macro="stdio" /> |
11 <expand macro="version_command" /> | 11 <expand macro="version_command" /> |
12 <command><![CDATA[ | 12 <command><![CDATA[ |
13 kmc | 13 mkdir output && |
14 #if $data_type.select == 'individual' | |
15 #for $input_file in $data_type.individual_file | |
16 #if $input_file.is_of_type("fastq","fastq.gz","fastqsanger.gz"): | |
17 #if $input_file.ext.endswith(".gz") | |
18 #set $ext='.fastq.gz' | |
19 #else | |
20 #set $ext='.fastq' | |
21 #end if | |
22 ln -s '$input_file' 'in$ext' && | |
23 #elif $input_file.is_of_type("fasta","fasta.gz"): | |
24 #if $input_file.ext.endswith(".gz") | |
25 #set $ext='.fasta.gz' | |
26 #else | |
27 #set $ext='.fasta' | |
28 #end if | |
29 ln -s '$input_file' 'in$ext' && | |
30 #elif $input_file.is_of_type("bam"): | |
31 ln -s '$input_file' in.bam && | |
32 #elif $input_file.is_of_type("kmc_suf"): | |
33 #if $input_file.ext.endswith(".kmc_suf") | |
34 #set $suf_ext='.kmc_suf' | |
35 #end if | |
36 #if $input_file.ext.endswith(".kmc_pre") | |
37 #set $pre_ext='.kmc_pre' | |
38 #end if | |
39 ln -s '$input_file' 'in$suf_ext' && | |
40 ln -s '$input_file' 'in$pre_ext' && | |
41 #end if | |
42 #end for | |
43 #else | |
44 mkdir input_dir && | |
45 #import re | |
46 #for $input_file in $data_type.collection_file | |
47 #if $input_file.is_of_type("fastq","fastq.gz","fastqsanger.gz"): | |
48 #if $input_file.ext.endswith(".gz") | |
49 #set $ext='.fastq.gz' | |
50 #else | |
51 #set $ext='.fastq' | |
52 #end if | |
53 #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($input_file.element_identifier)) | |
54 ln -s '$input_file' 'input_dir/${identifier}' && | |
55 #elif $input_file.is_of_type("fasta","fasta.gz"): | |
56 #if $input_file.ext.endswith(".gz") | |
57 #set $ext='.fasta.gz' | |
58 #else | |
59 #set $ext='.fasta' | |
60 #end if | |
61 #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($input_file.element_identifier)) | |
62 ln -s '$input_file' 'input_dir/${identifier}' && | |
63 #elif $input_file.is_of_type("bam"): | |
64 #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($input_file.element_identifier)) | |
65 ln -s '$input_file' 'input_dir/${identifier}' && | |
66 #elif $input_file.is_of_type("kmc_suf"): | |
67 #if $input_file.ext.endswith(".kmc_suf") | |
68 #set $suf_ext='.kmc_suf' | |
69 #end if | |
70 #if $input_file.ext.endswith(".kmc_pre") | |
71 #set $pre_ext='.kmc_pre' | |
72 #end if | |
73 #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($input_file.element_identifier)) | |
74 ln -s '$input_file' 'input_dir/${identifier}' && | |
75 ln -s '$input_file' 'input_dir/${identifier}' && | |
76 #end if | |
77 #end for | |
78 ls -ld input_dir/* | awk '{print $9}' >> files.list && | |
79 #end if | |
80 | |
81 kmc | |
14 -t\${GALAXY_SLOTS:-4} | 82 -t\${GALAXY_SLOTS:-4} |
15 #if $params.k: | 83 #if $params.k: |
16 -k'$params.k' | 84 -k'$params.k' |
17 #end if | 85 #end if |
18 #if $params.m: | 86 -m\${GALAXY_MEMORY_GB:-4} |
19 -m'$params.m' | |
20 #end if | |
21 #if $params.j: | 87 #if $params.j: |
22 -j'$statistic' | 88 -j'$statistic' |
23 #end if | 89 #end if |
24 #if $params.exclude_length: | 90 #if $params.p: |
25 -ci'$params.exclude_length' | 91 -p'$params.p' |
26 #end if | 92 #end if |
27 #if $params.max_counter_value: | 93 #if $params.ci: |
28 -cs'$params.max_counter_value' | 94 -ci'$params.ci' |
29 #end if | 95 #end if |
30 #if $input_file.is_of_type("fastq"): | 96 #if $params.cs: |
31 -fq | 97 -cs'$params.cs' |
32 #elif $input_file.is_of_type("fasta"): | 98 #end if |
33 -fm | 99 #if $params.cx: |
100 -cx'$params.cx' | |
101 #end if | |
102 #if $input_file.is_of_type("fastq","fastq.gz","fastqsanger.gz"): | |
103 -fq | |
104 #elif $input_file.is_of_type("fasta","fasta.gz"): | |
105 #if $data_type.select == "individual": | |
106 -fa | |
107 #else | |
108 -fm | |
109 #end if | |
34 #elif $input_file.is_of_type("bam"): | 110 #elif $input_file.is_of_type("bam"): |
35 -fbam | 111 -fbam |
36 #elif $input_file.is_of_type("kmc_suf"): | 112 #elif $input_file.is_of_type("kmc_suf"): |
37 -fkmc | 113 -fkmc |
114 #end if | |
115 | |
116 #if $input_file.is_of_type('fastq.gz','fasta.gz','fastqsanger.gz'): | |
117 -f | |
38 #end if | 118 #end if |
39 $input_file | 119 |
40 db | 120 #if $data_type.select == 'individual' |
41 . | 121 #if $input_file.is_of_type("fastq","fastq.gz","fastqsanger.gz"): |
122 #if $input_file.ext.endswith(".gz") | |
123 in.fastq.gz | |
124 #else | |
125 in.fastq | |
126 #end if | |
127 #elif $input_file.is_of_type("fasta","fasta.gz"): | |
128 #if $input_file.ext.endswith(".gz") | |
129 in.fasta.gz | |
130 #else | |
131 in.fasta | |
132 #end if | |
133 #elif $input_file.is_of_type("bam"): | |
134 in.bam | |
135 #end if | |
136 #else | |
137 @files.list | |
138 #end if | |
139 output/kmer_"$params.k" | |
140 . | |
42 | 141 |
43 ]]></command> | 142 ]]></command> |
44 <inputs> | 143 <inputs> |
45 <expand macro="macro_input" /> | 144 <expand macro="macro_input" /> |
46 <section name="params" title="parameter" expanded="false"> | 145 <section name="params" title="parameter" expanded="false"> |
47 <param argument="-k" type="integer" value="25" label="k-mer length (k from 1 to 256; default: 25)" /> | 146 <param argument="-k" type="integer" value="25" label="k-mer length (k from 1 to 256; default: 25)" /> |
48 <param argument="-m" type="integer" value="12" label="max amount of RAM in GB (from 1 to 1024); default: 12" /> | 147 <param argument="-p" type="integer" value="9" label="signature length (5, 6, 7, 8, 9, 10, 11); default: 9"/> |
49 <param name="signature_length" arguments="-p" type="integer" value="9" label="signature length (5, 6, 7, 8, 9, 10, 11); default: 9"/> | 148 <param argument="-ci" type="integer" value="2" label="exclude k-mers occurring less than [value] times (default: 2)"/> |
50 <param name="exclude_length" arguments="-ci" type="integer" value="2" label="exclude k-mers occurring less than [value] times (default: 2)"/> | 149 <param argument="-cs" type="integer" value="255" label="maximal value of a counter (default: 255)"/> |
51 <param name="max_counter_value" arguments="-cs" type="integer" value="255" label="maximal value of a counter (default: 255)"/> | 150 <param argument="-cx" type="integer" value="1000000000" label="xclude k-mers occurring more of than [value] times (default: 1e9)"/> |
52 <param name="exclude_kmer_occurence" arguments="-cx" type="integer" value="1000000000" label="xclude k-mers occurring more of than [value] times (default: 1e9)"/> | |
53 <param argument="-j" type="boolean" truevalue="-j" falsevalue="" checked="True" label="file name with execution summary in JSON format"/> | 151 <param argument="-j" type="boolean" truevalue="-j" falsevalue="" checked="True" label="file name with execution summary in JSON format"/> |
54 </section> | 152 </section> |
55 </inputs> | 153 </inputs> |
56 <outputs> | 154 <outputs> |
57 <data format="json" name="statistic" label="${tool.name} on ${on_string}"> | 155 <data name="statistic" format="json" label="${tool.name} on ${on_string}"> |
58 <filter>params['j']</filter> | 156 <filter>params['j']</filter> |
59 </data> | 157 </data> |
60 <collection name="kmc_db" type="list" label="${tool.name} on ${on_string}: kmc db"> | 158 <collection name="kmc_db" type="list" label="${tool.name} on ${on_string}: kmc db"> |
61 <data format="binary" name="db.kmc_suf" label="${tool.name} on ${on_string}" from_work_dir="db.kmc_suf" /> | 159 <discover_datasets pattern="(?P<designation>.+)" directory="output" format="binary" /> |
62 <data format="binary" name="db.kmc_pre" label="${tool.name} on ${on_string}" from_work_dir="db.kmc_pre" /> | |
63 </collection> | 160 </collection> |
64 </outputs> | 161 </outputs> |
65 | |
66 <tests> | 162 <tests> |
67 <test> | 163 <test expect_num_outputs="2"> |
68 <!-- #1 test fastq with common parameters --> | 164 <!-- #1 test individual fasta file --> |
69 <param name="input_file" value="F3D0_R1.fastq" ftype="fastq"/> | 165 <param name="individual_file" value="test.fasta.gz" ftype="fasta.gz"/> |
166 <param name="k" value="27" /> | |
167 <param name="ci" value="2" /> | |
168 <param name="cs" value="255" /> | |
169 <output_collection name="kmc_db" type="list"> | |
170 <element name="kmer_27.kmc_pre" file="kmer_27.kmc_pre" ftype="binary" /> | |
171 <element name="kmer_27.kmc_suf" file="kmer_27.kmc_suf" ftype="binary" /> | |
172 </output_collection> | |
173 <output name="statistic" ftype="json"> | |
174 <assert_contents> | |
175 <has_text text="1st_stage"/> | |
176 <has_text text="2nd_stage"/> | |
177 <has_text text="Stats"/> | |
178 </assert_contents> | |
179 </output> | |
180 </test> | |
181 <!-- output file is too large for testing; comment out to test on local machine with update_test_data option --> | |
182 <!-- <test expect_num_outputs="2"> --> | |
183 <!-- #2 test individual fastq file --> | |
184 <!-- <param name="individual_file" value="filtered_1.fastq" ftype="fastq"/> | |
70 <param name="k" value="25" /> | 185 <param name="k" value="25" /> |
71 <param name="m" value="12" /> | |
72 <param name="p" value="9" /> | 186 <param name="p" value="9" /> |
73 <param name="ci" value="2" /> | 187 <param name="ci" value="2" /> |
74 <param name="cs" value="255" /> | 188 <param name="cs" value="255" /> |
75 <output name="db.kmc_suf" file="db.kmc_suf" ftype="binary" /> | 189 <output_collection name="kmc_db" type="list"> |
76 <output name="db.kmc_pre" file="db.kmc_pre" ftype="binary" /> | 190 <element name="kmer_25.kmc_pre" file="kmer_25.kmc_pre" ftype="binary" /> |
77 </test> | 191 <element name="kmer_25.kmc_suf" file="kmer_25.kmc_suf" ftype="binary" /> |
78 <test> | 192 </output_collection> |
79 <!-- #2 test fasta with common parameters --> | 193 <output name="statistic" ftype="json"> |
80 <param name="input_file" value="contigs.fa" ftype="fasta"/> | 194 <assert_contents> |
81 <param name="k" value="27" /> | 195 <has_text text="1st_stage"/> |
82 <param name="m" value="24" /> | 196 <has_text text="2nd_stage"/> |
197 <has_text text="Stats"/> | |
198 </assert_contents> | |
199 </output> | |
200 </test> --> | |
201 <!-- output file is too large for testing; comment out to test on local machine --> | |
202 <!-- <test expect_num_outputs="2"> --> | |
203 <!-- #3 test collection fastq with common parameters --> | |
204 <!-- <param name="k" value="29" /> | |
205 <param name="m" value="12" /> | |
206 <param name="p" value="9" /> | |
83 <param name="ci" value="2" /> | 207 <param name="ci" value="2" /> |
84 <param name="cs" value="255" /> | 208 <param name="cs" value="255" /> |
85 <param name="fm" value="-fm" /> | 209 <conditional name="data_type"> |
86 <output name="contig_kmer27.kmc_suf" file="contig_kmer27.kmc_suf" ftype="binary" /> | 210 <param name="select" value="collection"/> |
87 <output name="contig_kmer27.kmc_pre" file="contig_kmer27.kmc_pre" ftype="binary" /> | 211 <param name="collection_file"> |
88 </test> | 212 <collection type="list"> |
213 <element name="filtered_1.fastq" value="filtered_1.fastq" ftype="fastq"/> | |
214 <element name="filtered_2.fastq" value="filtered_2.fastq" ftype="fastq"/> | |
215 </collection> | |
216 </param> | |
217 </conditional> | |
218 <output_collection name="kmc_db"> | |
219 <element name="kmer_29.kmc_suf" file="kmer_29.kmc_suf" ftype="binary" /> | |
220 <element name="kmer_29.kmc_pre" file="kmer_29.kmc_pre" ftype="binary" /> | |
221 </output_collection> | |
222 <output name="statistic" ftype="json"> | |
223 <assert_contents> | |
224 <has_text text="1st_stage"/> | |
225 <has_text text="2nd_stage"/> | |
226 <has_text text="Stats"/> | |
227 </assert_contents> | |
228 </output> | |
229 </test> | |
230 --> | |
89 </tests> | 231 </tests> |
90 <help><![CDATA[ | 232 <help><![CDATA[ |
91 | 233 |
92 .. class:: infomark | 234 .. class:: infomark |
93 | 235 |