Repository 'meryl'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/meryl

Changeset 2:35ac9de60bec (2021-04-09)
Previous changeset 1:e5b18909f73d (2021-04-08) Next changeset 3:9f7a227436d6 (2021-04-15)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meryl commit 9c098f0bdeca38de2f282a85a20e9e6fb3fd4929"
modified:
macros.xml
meryl.xml
b
diff -r e5b18909f73d -r 35ac9de60bec macros.xml
--- a/macros.xml Thu Apr 08 19:22:17 2021 +0000
+++ b/macros.xml Fri Apr 09 13:21:51 2021 +0000
b
@@ -1,6 +1,6 @@
 <macros>
     <token name="@TOOL_VERSION@">1.2</token>
-    <token name="@GALAXY_TOOL_VERSION@">galaxy0</token>
+    <token name="@GALAXY_TOOL_VERSION@">galaxy1</token>
     <xml name="edam_ontology">
         <edam_topics>                                                                                  
             <edam_topic>topic_0196</edam_topic>
b
diff -r e5b18909f73d -r 35ac9de60bec meryl.xml
--- a/meryl.xml Thu Apr 08 19:22:17 2021 +0000
+++ b/meryl.xml Fri Apr 09 13:21:51 2021 +0000
[
@@ -8,16 +8,20 @@
     <version_command>meryl --version</version_command>
     <command detect_errors='exit_code'><![CDATA[
         #if $operation_type.command_type == 'count-kmers'
-            meryl
             #if $operation_type.options_kmer_size.kmer_size == 'estimate'
                 #from math import log
-                $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))
+                #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))
+            #elif $operation_type.options_kmer_size.kmer_size == 'provide'
+                #set size=$operation_type.options_kmer_size.input_kmer_size
             #end if
+            meryl
             $operation_type.count_operations
-            k=$operation_type.options_kmer_size.input_kmer_size
+            k=$size
+            memory=\${GALAXY_MEMORY_GB:-1}
+            threads=\${GALAXY_SLOTS:-1}
             $operation_type.input_reads
             output read-db.meryl &&
-            echo 'K-mer size: ${$operation_type.options_kmer_size.input_kmer_size}' &&
+            echo 'K-mer size: ${size}' &&
             tar -zcf read-db.meryldb read-db.meryl
         #elif $operation_type.command_type == 'filter-kmers'
             mkdir  -p ./temp_db/ &&
@@ -58,19 +62,25 @@
             meryl histogram tmp.meryl > read-db.hist
         #elif $operation_type.command_type == 'trio-mode'
             export MERQURY=\$(dirname \$(command -v merqury.sh))/../share/merqury/ &&
+            #if $operation_type.options_kmer_size.kmer_size == 'estimate'
+                #from math import log
+                #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))
+            #elif $operation_type.options_kmer_size.kmer_size == 'provide'
+                #set size=$operation_type.options_kmer_size.input_kmer_size
+            #end if
             #for $i, $read in enumerate($paternal_reads):
                 mkdir 'paternal{$i}.meryl' &&
-                meryl count k=$operation_type.options_kmer_size.input_kmer_size '${read}' output 'paternal{$i}.meryl' &&
+                meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'paternal{$i}.meryl' &&
             #end for
             meryl union-sum paternal*.meryl output pat.meryl &&
             #for $i, $read in enumerate($maternal_reads):
                 mkdir 'maternal{$i}.meryl' &&
-                meryl count k=$operation_type.options_kmer_size.input_kmer_size '${read}' output 'maternal{$i}.meryl' &&
+                meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'maternal{$i}.meryl' &&
             #end for
             meryl union-sum maternal*.meryl output mat.meryl &&
             #for $i, $read in enumerate($child_reads):
                 mkdir 'child{$i}.meryl' &&
-                meryl count k=$operation_type.options_kmer_size.input_kmer_size '${read}' output 'child{$i}.meryl' &&
+                meryl count k=$size memory=\${GALAXY_MEMORY_GB:-1} threads=\${GALAXY_SLOTS:-1} '${read}' output 'child{$i}.meryl' &&
             #end for
             meryl union-sum child*.meryl output child.meryl &&
             ## mat specific kmers
@@ -117,7 +127,7 @@
             meryl union-sum output child.inherited.meryl mat.inherited.meryl pat.inherited.meryl shared.inherited.meryl &&
             meryl difference output read.only.meryl child.meryl child.inherited.meryl &&
             tar -czf 'read-db.meryldb' read.only.meryl &&
-            echo 'K-mer size: ${$operation_type.options_kmer_size.input_kmer_size}'
+            echo 'K-mer size: ${size}'
         #end if
     ]]>    </command>
     <inputs>
@@ -143,7 +153,7 @@
                         <option value="estimate">Estimate the best k-mer size</option>
                     </param>
                     <when value="provide">
-                        <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." />
+                        <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).." />
                     </when>
                     <when value="estimate">
                         <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." />
@@ -203,7 +213,7 @@
                         <option value="estimate">Estimate the best k-mer size</option>
                     </param>
                     <when value="provide">
-                        <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." />
+                        <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)." />
                     </when>
                     <when value="estimate">
                         <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." />