Mercurial > repos > iuc > meryl
comparison meryl.xml @ 2:35ac9de60bec draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meryl commit 9c098f0bdeca38de2f282a85a20e9e6fb3fd4929"
author | iuc |
---|---|
date | Fri, 09 Apr 2021 13:21:51 +0000 |
parents | e5b18909f73d |
children | 9f7a227436d6 |
comparison
equal
deleted
inserted
replaced
1:e5b18909f73d | 2:35ac9de60bec |
---|---|
6 <expand macro='edam_ontology' /> | 6 <expand macro='edam_ontology' /> |
7 <expand macro='requirements' /> | 7 <expand macro='requirements' /> |
8 <version_command>meryl --version</version_command> | 8 <version_command>meryl --version</version_command> |
9 <command detect_errors='exit_code'><![CDATA[ | 9 <command detect_errors='exit_code'><![CDATA[ |
10 #if $operation_type.command_type == 'count-kmers' | 10 #if $operation_type.command_type == 'count-kmers' |
11 meryl | |
12 #if $operation_type.options_kmer_size.kmer_size == 'estimate' | 11 #if $operation_type.options_kmer_size.kmer_size == 'estimate' |
13 #from math import log | 12 #from math import log |
14 $operation_type.options_kmer_size.input_kmer_size = int(log(int($operation_type.options_kmer_size.genome_size)*(1-float($operation_type.options_kmer_size.collision_rate))/float($operation_type.options_kmer_size.collision_rate))/log(4)) | 13 #set size=int(log(int($operation_type.options_kmer_size.genome_size)*(1-float($operation_type.options_kmer_size.collision_rate))/float($operation_type.options_kmer_size.collision_rate))/log(4)) |
14 #elif $operation_type.options_kmer_size.kmer_size == 'provide' | |
15 #set size=$operation_type.options_kmer_size.input_kmer_size | |
15 #end if | 16 #end if |
17 meryl | |
16 $operation_type.count_operations | 18 $operation_type.count_operations |
17 k=$operation_type.options_kmer_size.input_kmer_size | 19 k=$size |
20 memory=\${GALAXY_MEMORY_GB:-1} | |
21 threads=\${GALAXY_SLOTS:-1} | |
18 $operation_type.input_reads | 22 $operation_type.input_reads |
19 output read-db.meryl && | 23 output read-db.meryl && |
20 echo 'K-mer size: ${$operation_type.options_kmer_size.input_kmer_size}' && | 24 echo 'K-mer size: ${size}' && |
21 tar -zcf read-db.meryldb read-db.meryl | 25 tar -zcf read-db.meryldb read-db.meryl |
22 #elif $operation_type.command_type == 'filter-kmers' | 26 #elif $operation_type.command_type == 'filter-kmers' |
23 mkdir -p ./temp_db/ && | 27 mkdir -p ./temp_db/ && |
24 tar -zxf $operation_type.input_meryldb_02 -C ./temp_db/ && | 28 tar -zxf $operation_type.input_meryldb_02 -C ./temp_db/ && |
25 mv ./temp_db/* tmp.meryl && | 29 mv ./temp_db/* tmp.meryl && |
56 tar -zxf $operation_type.input_meryldb_02 -C ./temp_db/ && | 60 tar -zxf $operation_type.input_meryldb_02 -C ./temp_db/ && |
57 mv ./temp_db/* tmp.meryl && | 61 mv ./temp_db/* tmp.meryl && |
58 meryl histogram tmp.meryl > read-db.hist | 62 meryl histogram tmp.meryl > read-db.hist |
59 #elif $operation_type.command_type == 'trio-mode' | 63 #elif $operation_type.command_type == 'trio-mode' |
60 export MERQURY=\$(dirname \$(command -v merqury.sh))/../share/merqury/ && | 64 export MERQURY=\$(dirname \$(command -v merqury.sh))/../share/merqury/ && |
65 #if $operation_type.options_kmer_size.kmer_size == 'estimate' | |
66 #from math import log | |
67 #set size=int(log(int($operation_type.options_kmer_size.genome_size)*(1-float($operation_type.options_kmer_size.collision_rate))/float($operation_type.options_kmer_size.collision_rate))/log(4)) | |
68 #elif $operation_type.options_kmer_size.kmer_size == 'provide' | |
69 #set size=$operation_type.options_kmer_size.input_kmer_size | |
70 #end if | |
61 #for $i, $read in enumerate($paternal_reads): | 71 #for $i, $read in enumerate($paternal_reads): |
62 mkdir 'paternal{$i}.meryl' && | 72 mkdir 'paternal{$i}.meryl' && |
63 meryl count k=$operation_type.options_kmer_size.input_kmer_size '${read}' output 'paternal{$i}.meryl' && | 73 meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'paternal{$i}.meryl' && |
64 #end for | 74 #end for |
65 meryl union-sum paternal*.meryl output pat.meryl && | 75 meryl union-sum paternal*.meryl output pat.meryl && |
66 #for $i, $read in enumerate($maternal_reads): | 76 #for $i, $read in enumerate($maternal_reads): |
67 mkdir 'maternal{$i}.meryl' && | 77 mkdir 'maternal{$i}.meryl' && |
68 meryl count k=$operation_type.options_kmer_size.input_kmer_size '${read}' output 'maternal{$i}.meryl' && | 78 meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'maternal{$i}.meryl' && |
69 #end for | 79 #end for |
70 meryl union-sum maternal*.meryl output mat.meryl && | 80 meryl union-sum maternal*.meryl output mat.meryl && |
71 #for $i, $read in enumerate($child_reads): | 81 #for $i, $read in enumerate($child_reads): |
72 mkdir 'child{$i}.meryl' && | 82 mkdir 'child{$i}.meryl' && |
73 meryl count k=$operation_type.options_kmer_size.input_kmer_size '${read}' output 'child{$i}.meryl' && | 83 meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'child{$i}.meryl' && |
74 #end for | 84 #end for |
75 meryl union-sum child*.meryl output child.meryl && | 85 meryl union-sum child*.meryl output child.meryl && |
76 ## mat specific kmers | 86 ## mat specific kmers |
77 meryl difference mat.meryl pat.meryl output mat.only.meryl && | 87 meryl difference mat.meryl pat.meryl output mat.only.meryl && |
78 meryl histogram mat.only.meryl > mat.only.hist && | 88 meryl histogram mat.only.meryl > mat.only.hist && |
115 | 125 |
116 ## child hapmers | 126 ## child hapmers |
117 meryl union-sum output child.inherited.meryl mat.inherited.meryl pat.inherited.meryl shared.inherited.meryl && | 127 meryl union-sum output child.inherited.meryl mat.inherited.meryl pat.inherited.meryl shared.inherited.meryl && |
118 meryl difference output read.only.meryl child.meryl child.inherited.meryl && | 128 meryl difference output read.only.meryl child.meryl child.inherited.meryl && |
119 tar -czf 'read-db.meryldb' read.only.meryl && | 129 tar -czf 'read-db.meryldb' read.only.meryl && |
120 echo 'K-mer size: ${$operation_type.options_kmer_size.input_kmer_size}' | 130 echo 'K-mer size: ${size}' |
121 #end if | 131 #end if |
122 ]]> </command> | 132 ]]> </command> |
123 <inputs> | 133 <inputs> |
124 <conditional name="operation_type"> | 134 <conditional name="operation_type"> |
125 <param name="command_type" type="select" label="Operation type selector" help="Select a type of operation"> | 135 <param name="command_type" type="select" label="Operation type selector" help="Select a type of operation"> |
141 <param name="kmer_size" type="select" label="K-mer size selector"> | 151 <param name="kmer_size" type="select" label="K-mer size selector"> |
142 <option value="provide">Set a k-mer size</option> | 152 <option value="provide">Set a k-mer size</option> |
143 <option value="estimate">Estimate the best k-mer size</option> | 153 <option value="estimate">Estimate the best k-mer size</option> |
144 </param> | 154 </param> |
145 <when value="provide"> | 155 <when value="provide"> |
146 <param name="input_kmer_size" type="integer" min="1" max="50" value="" label="K-mer size" help="Haploid genome size or diploid genome size, depending on what we evaluate. In bp. Only required if the k-mer size is not provided." /> | 156 <param name="input_kmer_size" type="integer" min="1" max="50" value="" label="K-mer size" help="For a human genome, the best k-mer size is k=21 for both haploid (3.1G) or diploid (6.2G).." /> |
147 </when> | 157 </when> |
148 <when value="estimate"> | 158 <when value="estimate"> |
149 <param name="genome_size" type="integer" min="1000" max="70000000000" value="1000" label="Genome size" help="Haploid genome size or diploid genome size, depending on what we evaluate. In bp. Only required if the k-mer size is not provided." /> | 159 <param name="genome_size" type="integer" min="1000" max="70000000000" value="1000" label="Genome size" help="Haploid genome size or diploid genome size, depending on what we evaluate. In bp. Only required if the k-mer size is not provided." /> |
150 <param name="collision_rate" type="float" min="0.0001" max="0.01" value="0.001" label="Tolerable collision rate" help="Tolerable collision rate. By default is 0.001." /> | 160 <param name="collision_rate" type="float" min="0.0001" max="0.01" value="0.001" label="Tolerable collision rate" help="Tolerable collision rate. By default is 0.001." /> |
151 </when> | 161 </when> |
201 <param name="kmer_size" type="select" label="K-mer size selector"> | 211 <param name="kmer_size" type="select" label="K-mer size selector"> |
202 <option value="provide">Set a k-mer size</option> | 212 <option value="provide">Set a k-mer size</option> |
203 <option value="estimate">Estimate the best k-mer size</option> | 213 <option value="estimate">Estimate the best k-mer size</option> |
204 </param> | 214 </param> |
205 <when value="provide"> | 215 <when value="provide"> |
206 <param name="input_kmer_size" type="integer" min="1" max="50" value="" label="K-mer size" help="Haploid genome size or diploid genome size, depending on what we evaluate. In bp. Only required if the k-mer size is not provided." /> | 216 <param name="input_kmer_size" type="integer" min="1" max="50" value="" label="K-mer size" help="For a human genome, the best k-mer size is k=21 for both haploid (3.1G) or diploid (6.2G)." /> |
207 </when> | 217 </when> |
208 <when value="estimate"> | 218 <when value="estimate"> |
209 <param name="genome_size" type="integer" min="1000" max="70000000000" value="1000" label="Genome size" help="Haploid genome size or diploid genome size, depending on what we evaluate. In bp. Only required if the k-mer size is not provided." /> | 219 <param name="genome_size" type="integer" min="1000" max="70000000000" value="1000" label="Genome size" help="Haploid genome size or diploid genome size, depending on what we evaluate. In bp. Only required if the k-mer size is not provided." /> |
210 <param name="collision_rate" type="float" min="0.0001" max="0.01" value="0.001" label="Tolerable collision rate" help="Tolerable collision rate. By default is 0.001." /> | 220 <param name="collision_rate" type="float" min="0.0001" max="0.01" value="0.001" label="Tolerable collision rate" help="Tolerable collision rate. By default is 0.001." /> |
211 </when> | 221 </when> |