Mercurial > repos > iuc > metamdbg_asm
changeset 2:e7f72ab9dbdf draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/metamdbg commit ed282ed85937d45bd8f7bced576195ce9aad5fa4
| author | iuc |
|---|---|
| date | Thu, 05 Mar 2026 21:11:46 +0000 |
| parents | 6f4aafd03a59 |
| children | |
| files | macros.xml metamdbg_asm.xml test-data/hifi_reads_small_assembly_bundle.tar.gz test-data/hifi_reads_small_combined_assembly_bundle.tar.gz test-data/small_assembly_bundle_2.tar.gz |
| diffstat | 5 files changed, 122 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- a/macros.xml Mon Feb 02 09:07:13 2026 +0000 +++ b/macros.xml Thu Mar 05 21:11:46 2026 +0000 @@ -1,10 +1,11 @@ <macros> - <token name="@TOOL_VERSION@">1.3</token> + <token name="@TOOL_VERSION@">1.3.1</token> <token name="@VERSION_SUFFIX@">0</token> <token name="@PROFILE@">25.0</token> <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">metamdbg</requirement> + <requirement type="package" version="3.11">grep</requirement> </requirements> </xml> <xml name="edam">
--- a/metamdbg_asm.xml Mon Feb 02 09:07:13 2026 +0000 +++ b/metamdbg_asm.xml Thu Mar 05 21:11:46 2026 +0000 @@ -1,6 +1,5 @@ -<tool id="metamdbg_asm" name="metaMDBG assemble" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT"> +<tool id="metamdbg_asm" name="metaMDBG assemble (ASM)" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT"> <description>Assemble long-read metagenomes (HiFi / ONT)</description> - <macros> <import>macros.xml</import> </macros> @@ -8,81 +7,68 @@ <expand macro="biotools"/> <expand macro="requirements"/> <expand macro="version"/> - <command detect_errors="exit_code"><![CDATA[ - mkdir -p assemblyDir && + mkdir -p assemblyDir && - ## Collect reads from file(s) and/or list collection - #set reads_list = [] - #if $inputs.reads - #for $r in $inputs.reads - #set $x = $reads_list.append($r.file_name) - #end for - #end if - + metaMDBG asm + --out-dir "assemblyDir" + --threads "\${GALAXY_SLOTS:-4}" + --in-$inputs.read_type + #for $r in $inputs.reads + '$r' + #end for + --kmer-size $assembly.kmer_size + --density-assembly $assembly.density_assembly + --max-k $assembly.max_k + --min-abundance $assembly.min_abundance + $assembly.all_assembly_graph + --min-read-quality $correction.min_read_quality + --density-correction $correction.density_correction + --min-read-identity $correction.min_read_identity + --min-read-overlap $correction.min_read_overlap + $correction.skip_correction + && - metaMDBG asm - --out-dir "assemblyDir" - --threads "\${GALAXY_SLOTS:-4}" - --in-$read_type - #for $p in $reads_list - '$p' - #end for - --kmer-size $assembly.kmer_size - --density-assembly $assembly.density_assembly - --max-k $assembly.max_k - --min-abundance $assembly.min_abundance - $all_assembly_graph - --min-read-quality $correction.min_read_quality - --density-correction $correction.density_correction - --min-read-identity $correction.min_read_identity - --min-read-overlap $correction.min_read_overlap - --skip-correction - && - - ## Bundle for downstream graphing - tar -C assemblyDir -czf assemblyDir.tgz . ; - ]]></command> - + ## Bundle for downstream graphing + tar -C assemblyDir -czf assemblyDir.tgz . ; + ]]></command> <inputs> - <param name="read_type" type="select" label="Read type" help="maps to --in-*"> - <option value="hifi">PacBio HiFi (uses --in-hifi)</option> - <option value="ont">Nanopore R10.4+ (uses --in-ont)</option> - </param> - <section name="inputs" title="Input reads" expanded="true"> + <param name="read_type" type="select" label="Read type" help="maps to --in-*"> + <option value="hifi">PacBio HiFi (uses --in-hifi)</option> + <option value="ont">Nanopore R10.4+ (uses --in-ont)</option> + </param> + <param name="reads" type="data" format="fastqsanger,fastqsanger.gz" - multiple="true" optional="false" - label="FASTQ file(s)" - help="Multi-select one or more FASTQ files for (co-)assembly."/> + multiple="true" optional="false" + label="FASTQ file(s)" + help="Select one or more FASTQ files. Multiple files will be assembled together (co-assembly). For individual assemblies of each file in a collection, see https://gxy.io/GTN:F00462"/> </section> - <section name="assembly" title="Assembly options (advanced)" expanded="false"> - <param argument="--kmer_size" type="integer" value="15" + <param argument="--kmer-size" type="integer" value="15" min="1" max="51" label="k-mer size"/> - <param argument="--density_assembly" type="float" value="0.005" + <param argument="--density-assembly" type="float" value="0.005" min="0.001" max="1" label="Fraction of k-mers used for assembly"/> - <param argument="--max_k" type="integer" value="0" + <param argument="--max-k" type="integer" value="0" min="0" max="100" label="Stop assembly after k iterations"/> - <param argument="--min_abundance" type="integer" value="0" + <param argument="--min-abundance" type="integer" value="0" min="0" max="1000" label="Minimum k-min-mer abundance"/> - <param argument="--all_assembly_graph" type="boolean" checked="false" truevalue="--all-assembly-graph" falsevalue="" + <param name="all_assembly_graph" type="boolean" checked="false" truevalue="--all-assembly-graph" falsevalue="" label="Emit assembly graph at each multi-k iteration"/> </section> <section name="correction" title="Correction options (advanced)" expanded="false"> - <param argument="--min_read_quality" type="integer" value="0" + <param argument="--min-read-quality" type="integer" value="0" min="0" max="40" label="Minimum read average quality"/> - <param argument="--density_correction" type="float" value="0.025" + <param argument="--density-correction" type="float" value="0.025" min="0.0001" max="1" label="Fraction of k-mers used for correction"/> - <param argument="--min_read_identity" type="float" value="0.96" + <param argument="--min-read-identity" type="float" value="0.96" min="0" max="1" label="Minimum read identity"/> - <param argument="--min_read_overlap" type="integer" value="1000" + <param argument="--min-read-overlap" type="integer" value="1000" min="1" max="100000" label="Minimum read overlap length"/> - <param argument="--skip_correction" type="boolean" value="false" + <param name="skip_correction" type="boolean" checked="false" truevalue="--skip-correction" falsevalue="" label="Skip read correction"/> </section> - </inputs> <outputs> @@ -93,31 +79,26 @@ from_work_dir="assemblyDir.tgz" label="${tool.name} on ${on_string}: metaMDBG assembly bundle (tar)"/> </outputs> - <tests> - - <!-- 1) HiFi, single-file, defaults (no optional flags passed) --> + <!-- 1) HiFi, single file, defaults --> <test expect_num_outputs="2"> - <param name="read_type" value="hifi"/> <section name="inputs"> + <param name="read_type" value="hifi"/> <param name="reads" value="hifi_reads_small.fastq.gz"/> </section> - <!-- default flags appear --> <assert_command> <has_text text="--in-hifi"/> <has_text text="--kmer-size 15"/> <has_text text="--density-assembly 0.005"/> </assert_command> - <!-- contigs is gzipped; just sanity check size --> <output name="contigs"> <assert_contents> <has_size min="1"/> </assert_contents> </output> - <!-- check tarball contains key members --> <output name="assembly_bundle" ftype="tar.gz"> <assert_contents> <has_archive_member path="^(\.\/)?contigs\.fasta\.gz$"/> @@ -126,10 +107,10 @@ </output> </test> - <!-- 2) ONT, single-file, exercise correction toggles --> + <!-- 2) ONT, single file, correction parameters --> <test expect_num_outputs="2"> - <param name="read_type" value="ont"/> <section name="inputs"> + <param name="read_type" value="ont"/> <param name="reads" value="ont_reads_small.fastq.gz"/> </section> <section name="correction"> @@ -161,10 +142,10 @@ </output> </test> - <!-- 3) HiFi, set assembly knobs (incl. all-assembly-graph) --> + <!-- 3) HiFi, single file, custom assembly parameters --> <test expect_num_outputs="2"> - <param name="read_type" value="hifi"/> <section name="inputs"> + <param name="read_type" value="hifi"/> <param name="reads" value="hifi_reads_small.fastq.gz"/> </section> <section name="assembly"> @@ -190,27 +171,30 @@ </output> <output name="assembly_bundle" ftype="tar.gz"> <assert_contents> - <has_archive_member path="^(\.\/)?contigs\.fasta\.gz$"/> - <has_archive_member path="^(\.\/)?tmp\/"/> + <has_archive_member path="^(\.\/)?contigs\.fasta\.gz$"/> + <has_archive_member path="^(\.\/)?tmp\/"/> </assert_contents> </output> </test> - <!-- 4) HiFi, multi-file, defaults--> + <!-- 4) HiFi, multi-file co-assembly --> <test expect_num_outputs="2"> - <param name="read_type" value="hifi"/> <section name="inputs"> + <param name="read_type" value="hifi"/> <param name="reads" value="hifi_reads_small.fastq.gz,hifi_reads_small_2.fastq.gz,hifi_reads_small_3.fastq.gz"/> </section> - <!-- contigs is gzipped; just sanity check size --> + <assert_command> + <has_text text="--in-hifi"/> + <has_text text=".dat' '"/> + </assert_command> + <output name="contigs"> <assert_contents> <has_size min="1"/> </assert_contents> </output> - <!-- check tarball contains key members --> <output name="assembly_bundle" ftype="tar.gz"> <assert_contents> <has_archive_member path="^(\.\/)?contigs\.fasta\.gz$"/> @@ -219,6 +203,60 @@ </output> </test> + <!-- 5) HiFi, single file baseline --> + <test expect_num_outputs="2"> + <section name="inputs"> + <param name="read_type" value="hifi"/> + <param name="reads" value="hifi_reads_small.fastq.gz"/> + </section> + + <assert_command> + <has_text text="--in-hifi"/> + </assert_command> + + <output name="contigs"> + <assert_contents> + <has_size min="1"/> + </assert_contents> + </output> + + <output name="assembly_bundle" ftype="tar.gz"> + <assert_contents> + <has_archive_member path="^(\.\/)?contigs\.fasta\.gz$"/> + <has_archive_member path="^(\.\/)?tmp\/"/> + </assert_contents> + </output> + </test> + + <!-- 6) Both boolean flags enabled --> + <test expect_num_outputs="2"> + <section name="inputs"> + <param name="read_type" value="hifi"/> + <param name="reads" value="hifi_reads_small.fastq.gz"/> + </section> + <section name="assembly"> + <param name="all_assembly_graph" value="true"/> + </section> + <section name="correction"> + <param name="skip_correction" value="true"/> + </section> + + <assert_command> + <has_text text="--all-assembly-graph"/> + <has_text text="--skip-correction"/> + </assert_command> + + <output name="contigs"> + <assert_contents> + <has_size min="1"/> + </assert_contents> + </output> + <output name="assembly_bundle" ftype="tar.gz"> + <assert_contents> + <has_size min="1"/> + </assert_contents> + </output> + </test> </tests> <help><![CDATA[ **What this tool does and why** @@ -227,7 +265,7 @@ **How to use this tool effectively** -1. **Provide input reads.** Select one or more FASTQ files or supply a list collection. +1. **Provide input reads.** Select one or more FASTQ files. If multiple files are selected, they will be assembled together (co-assembly). 2. **Choose the read type.** Select PacBio HiFi (sets `--in-hifi`) or Nanopore R10.4+ (sets `--in-ont`). @@ -235,7 +273,11 @@ 4. **(Optional) Tune correction options.** Set minimum read quality/identity/overlap or `--skip-correction`. -5. **Review outputs.** You’ll get the contigs and a tarball of the entire `assemblyDir/` for later use with the GFA tool or auditing. +**Individual vs. Co-assembly** + +- **Co-assembly (default):** Select multiple files and they will be assembled together into a single metagenome. Use this when you have multiple samples from the same environment or want to increase coverage. + +- **Individual assemblies:** To assemble each file separately, use Galaxy's collection mapping feature. See the `Galaxy training FAQ on mapping over collections <https://training.galaxyproject.org/training-material/faqs/galaxy/collections_force_mapping_over.html>`_ for instructions. **Outputs** @@ -252,6 +294,10 @@ Packaging `assemblyDir/` as `assemblyDir.tgz` preserves all artifacts and makes it easy to pass the exact assembly into the **metaMDBG graph (GFA)** tool. +**More information** + +For more details about metaMDBG, see the `GitHub repository <https://github.com/GaetanBenoitDev/metaMDBG>`_. + ]]></help> <expand macro="citations"/>
