diff --git a/tools/meryl/meryl.xml b/deprecated/tools/meryl/meryl.xml similarity index 99% rename from tools/meryl/meryl.xml rename to deprecated/tools/meryl/meryl.xml index 1a9305d6065..83b5a8cf8a3 100644 --- a/tools/meryl/meryl.xml +++ b/deprecated/tools/meryl/meryl.xml @@ -3,10 +3,10 @@ macros.xml + meryl - meryl --version Build hap-mer dbs for trios - + @@ -446,7 +446,6 @@ - @@ -588,13 +587,13 @@ - + - + diff --git a/tools/meryl/.shed.yml b/tools/meryl/.shed.yml index 92ccb006234..87b8c9256fe 100644 --- a/tools/meryl/.shed.yml +++ b/tools/meryl/.shed.yml @@ -1,10 +1,18 @@ -categories: -- Assembly +name: meryl +owner: iuc description: Meryl a k-mer counter. long_description: | Meryl a k-mer counter. It is built into the Celera assembler and is also available as a stand-alone application. Meryl uses a sorting-based approach that sorts k-mers in lexicographical order. -name: meryl -owner: iuc remote_repository_url: https://github.com/galaxyproject/tools-iuc/tree/master/tools/meryl homepage_url: https://github.com/marbl/meryl type: unrestricted +categories: +- Assembly +auto_tool_repositories: + name_template: "{{ tool_id }}" + description_template: "Wrapper for Meryl function: {{ tool_name }}." +suite: + name: "suite_meryl" + description: "A suite of tools that brings the Meryl project into Galaxy." + long_description: | + Meryl a k-mer counter. It is built into the Celera assembler and is also available as a stand-alone application. Meryl uses a sorting-based approach that sorts k-mers in lexicographical order. diff --git a/tools/meryl/arithmetic-kmers.xml b/tools/meryl/arithmetic-kmers.xml new file mode 100644 index 00000000000..89381fe2819 --- /dev/null +++ b/tools/meryl/arithmetic-kmers.xml @@ -0,0 +1,123 @@ + + apply arithmetic operations to k-mer counts + + macros.xml + + + + meryl + + + meryl --version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +.. class:: infomark + +**Purpose** + +Meryl is the k-mer counter. This tool applies arithmetic operations on k-mer counts: + +- Increase: add x to the count of each k-mer +- Decrease: subsctract x from the count of each k-mer +- Multiply: multiply the count of each k-mer by x +- Divide: divide the count of each k-mer by x +- Divide-round: divide the count of each k-mer by x and round th results +- Modulo: set the count of each k-mer to the remainder of the count divided by x + + + diff --git a/tools/meryl/count-kmers.xml b/tools/meryl/count-kmers.xml new file mode 100644 index 00000000000..fc1c5d2940e --- /dev/null +++ b/tools/meryl/count-kmers.xml @@ -0,0 +1,122 @@ + + count k-mers + + macros.xml + + + + meryl + + + meryl --version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +.. class:: infomark + +**Purpose** + +Meryl is the k-mer counter. This tool can be used to count kmers. + +- Count: count the occurrences of canonical k-mers +- Count-forward: count the occurreces of forward k-mers +- Count-reverse: count the occurreces of reverse k-mers + + + diff --git a/tools/meryl/filter-kmers.xml b/tools/meryl/filter-kmers.xml new file mode 100644 index 00000000000..ec96677dd0d --- /dev/null +++ b/tools/meryl/filter-kmers.xml @@ -0,0 +1,134 @@ + + filter k-mers + + macros.xml + + + + meryl + + + meryl --version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +.. class:: infomark + +**Purpose** + +Meryl is the k-mer counter. This tool can be used to filter k-mers. + +- Less-than: return k-mers that occur fewer than N times in the input +- Greater-than: return k-mers that occur more than N times in the input +- Equal-to: return k-mers that occur exactly N times in the input +- Not-equal-to: return k-mers that do not occur exactly N times in the input + + + + diff --git a/tools/meryl/groups-kmers.xml b/tools/meryl/groups-kmers.xml new file mode 100644 index 00000000000..9306b36bfdf --- /dev/null +++ b/tools/meryl/groups-kmers.xml @@ -0,0 +1,174 @@ + + apply operations on k-mer databases + + macros.xml + + + + meryl + + + meryl --version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +.. class:: infomark + +**Purpose** + +Meryl is the k-mer counter. Apply operations on multiple k-mer databases. + +- Union-min: return k-mers that occur in any input, set the count to the minimum count +- Union-max: return k-mers that occur in any input, set the count to the maximum count +- Union-sum: return k-mers that occur in any input, set the count to the sum of the counts +- Intersect: return k-mers that occur in all inputs, set the count to the count in the first input +- Intersect-min: return k-mers that occur in all inputs, set the count to the minimum count +- Intersect-max: return k-mers that occur in all inputs, set the count to the maximum count +- Intersect-sum: return k-mers that occur in all inputs, set the count to the sum of the counts +- Subtract: return k-mers that occur in the first input, subtracting counts from the other inputs +- Difference: return k-mers that occur in the first input, but none of the other inputs +- Symmetric-difference: return k-mers that occur in exactly one input + + + + diff --git a/tools/meryl/histogram-kmers.xml b/tools/meryl/histogram-kmers.xml new file mode 100644 index 00000000000..3749c199a16 --- /dev/null +++ b/tools/meryl/histogram-kmers.xml @@ -0,0 +1,40 @@ + + get k-mer frequency histogram + + macros.xml + + + + meryl + + + meryl --version + read-db.hist + ]]> + + + + + + + + + + + + + + +.. class:: infomark + +**Purpose** + +Meryl is the k-mer counter. This tool determines a k-mer frequency histogram. + + + diff --git a/tools/meryl/macros.xml b/tools/meryl/macros.xml index 85d23f65a6c..77ce65b497c 100644 --- a/tools/meryl/macros.xml +++ b/tools/meryl/macros.xml @@ -2,6 +2,7 @@ 1.3 galaxy 6 + 22.01 topic_0196 @@ -17,6 +18,19 @@ tar + + + + + + + + + + + + + diff --git a/tools/meryl/print.xml b/tools/meryl/print.xml new file mode 100644 index 00000000000..e4156bad517 --- /dev/null +++ b/tools/meryl/print.xml @@ -0,0 +1,41 @@ + + get k-mer counts + + macros.xml + + + + meryl + + + meryl --version + read-db.tabular + ]]> + + + + + + + + + + + + + + +.. class:: infomark + +**Purpose** + +Meryl is the k-mer counter. This tool gets the k-mer counts as a table. + + + + diff --git a/tools/meryl/test-data/child.fastq.gz b/tools/meryl/test-data/child.fastq.gz new file mode 100644 index 00000000000..45d49c530e8 Binary files /dev/null and b/tools/meryl/test-data/child.fastq.gz differ diff --git a/tools/meryl/trio-mode.xml b/tools/meryl/trio-mode.xml new file mode 100644 index 00000000000..3cde73cb5b0 --- /dev/null +++ b/tools/meryl/trio-mode.xml @@ -0,0 +1,146 @@ + + build hap-mers databases for trios + + macros.xml + + + + meryl + + + meryl --version + read-db.hist && + tar -czf 'read-db.meryldb' child.meryl && + + ## mat specific kmers + meryl difference mat.meryl pat.meryl output mat.only.meryl && + meryl histogram mat.only.meryl > mat.only.hist && + java -jar -Xmx1g \$MERQURY/eval/kmerHistToPloidyDepth.jar mat.only.hist > mat.only.ploidy && + VAR=`sed -n 2p mat.only.ploidy | awk '{print \$NF}'` && + meryl greater-than \$VAR output mat.only.filt.meryl mat.only.meryl && + + ## pat specific kmers + meryl difference pat.meryl mat.meryl output pat.only.meryl && + meryl histogram pat.only.meryl > pat.only.hist && + java -jar -Xmx1g \$MERQURY/eval/kmerHistToPloidyDepth.jar pat.only.hist > pat.only.ploidy && + VAR=`sed -n 2p pat.only.ploidy | awk '{print \$NF}'` && + meryl greater-than \$VAR output pat.only.filt.meryl pat.only.meryl && + + ## shared kmers + meryl intersect output shared.meryl mat.meryl pat.meryl && + + ## mat hapmers + meryl intersect output mat.inherited.meryl child.meryl mat.only.filt.meryl && + meryl histogram mat.inherited.meryl > mat.inherited.hist && + java -jar -Xmx1g \$MERQURY/eval/kmerHistToPloidyDepth.jar mat.inherited.hist > mat.inherited.ploidy && + VAR=`sed -n 2p mat.inherited.ploidy | awk '{print \$NF}'` && + meryl greater-than \$VAR output mat.hapmer.meryl mat.inherited.meryl && + tar -czf 'mat.meryldb' mat.hapmer.meryl && + + ## pat hapmers + meryl intersect output pat.inherited.meryl child.meryl pat.only.filt.meryl && + meryl histogram pat.inherited.meryl > pat.inherited.hist && + java -jar -Xmx1g \$MERQURY/eval/kmerHistToPloidyDepth.jar pat.inherited.hist > pat.inherited.ploidy && + VAR=`sed -n 2p pat.inherited.ploidy | awk '{print \$NF}'` && + meryl greater-than \$VAR output pat.hapmer.meryl pat.inherited.meryl && + tar -czf 'pat.meryldb' pat.hapmer.meryl && + + echo 'K-mer size: ${size}' + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +.. class:: infomark + +**Purpose** + +Meryl is the k-mer counter. This tool builds hap-mer databases for trios, in accordance +with `merqury's recommended guidelines. <https://github.com/marbl/merqury/wiki/1.-Prepare-meryl-dbs#3-build-hap-mer-dbs-for-trios>`_ + + + +