view hifiasm_meta.xml @ 3:213df31ba341 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hifiasm_meta commit 9265007c6e82ccbcfcb1a43c6813fa2b6b6421a7
author iuc
date Fri, 09 Feb 2024 21:25:37 +0000
parents fa35f1106d3e
children
line wrap: on
line source

<tool id="hifiasm_meta" name="Hifiasm_meta" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
    <description>for metagenome assembly using Hifi reads</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <xrefs>
        <xref type="bio.tools">hifiasm-meta</xref>
    </xrefs>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        ##################
        ## SET UP FILES ##
        ##################

        #set reads_fn = 'reads.' + $reads.ext
        ln -s '$reads' '$reads_fn' &&

        #################
        ## RUN HIFIASM ##
        #################

        hifiasm_meta 

        ## bloom filter parameter
        #if $f:
            -f '$f'
        #end if

        ## read selection parameters
        #if $read_selection.forced_read_selection.force_rs == "yes":
            --force-rs
            --lowq-10 '$read_selection.forced_read_selection.lowq_10'
            --lowq-3 '$read_selection.forced_read_selection.lowq_3'
            --lowq-5 '$read_selection.forced_read_selection.lowq_5'
        #else
            $read_selection.forced_read_selection.S
        #end if
    
        -a '$assembly.a'
        -k '$overlap_correction.k'
        -o asm
        -r '$overlap_correction.r'
        -t \${GALAXY_SLOTS:-4}
        '$reads_fn'

    ]]></command>
    <inputs>
        <param name="reads" format="fastqsanger,fastqsanger.gz" type="data" label="HiFi reads" help="Input reads for assembly" />
        <!-- This hidden parameter is only used to save RAM for planemo test. -->
        <!-- See https://github.com/galaxyproject/tools-iuc/pull/5033#issuecomment-1382915060 -->
        <param type="hidden" optional="true" argument="-f" />
        <section name="read_selection" title="Read selection" expanded="false">
            <conditional name="forced_read_selection">
                <param argument="--force-rs" type="select" label="Force read selection" help="Drop reads according to configurable runtime kmer frequency thresholds">
                    <option value="no" selected="true">No</option>
                    <option value="yes">Yes</option>                    
                </param>
                <when value="yes">
                    <param argument='--lowq-10' type="integer" value='50' label="Lower 10% runtime kmer frequency threshold" />
                    <param argument='--lowq-5' type="integer" value='50' label="Lower 5% runtime kmer frequency threshold" />
                    <param argument='--lowq-3' type="integer" value='10' label="Lower 3% runtime kmer frequency threshold" />
                </when>
                <when value="no">
                    <param argument='-S' type="boolean" checked="false" truevalue="-S" falsevalue="" label="Enable read selection" help="If enabled, hifiasm_meta will estimate the total number of read overlaps. If the estimation seems acceptable, no read will be dropped; otherwise, reads will be dropped from the most redundant ones until the criteria are satisfied. This can only be enabled if forced read selection is disabled." />
                </when>
            </conditional>
        </section>
        <section name="overlap_correction" title="Overlap/Error correction" expanded="false">
            <param argument='-k' type="integer" value='51' min="1" max="63" label="k-mer length" />
            <param argument='-r' type="integer" value='3' min="1" max="10" label="rounds of correction" />
        </section>
        <section name="assembly" title="Assembly" expanded="false">
            <param argument='-a' type="integer" value='4' min="1" max="10" label="rounds of assembly cleaning" />
        </section>
    </inputs>
    <outputs>
        <!-- contig graph files -->
        <collection name="contig_graphs" type="list" label="hifiasm_meta on ${on_string}: contig graphs">
            <data name="Primary contigs" label="Primary contigs" from_work_dir="asm.p_ctg.gfa" format="gfa2" />
            <data name="Alternate contigs" label="Alternate contigs" from_work_dir="asm.a_ctg.gfa" format="gfa2" />
        </collection>
        <!-- unitig graph files -->
        <collection name="unitig_graphs" type="list" label="hifiasm_meta on ${on_string}: unitig graphs">
            <data name="Raw unitigs" label="Raw unitigs" from_work_dir="asm.r_utg.gfa" format="gfa2" />
            <data name="Processed unitigs" label="Processed unitigs" from_work_dir="asm.p_utg.gfa" format="gfa2" />
        </collection>
        <!-- Simplified graphs for visualisation -->
        <collection name="simple_graphs" type="list" label="hifiasm_meta on ${on_string}: graphs for visualisation">
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.noseq.gfa" format="gfa2" visible="false" />
        </collection>
    </outputs>
    <tests>
        <!-- 01: basic function -->
        <test>
            <param name="reads" value="zymoD6331std-ecoli-ten-percent.42.1.fq.gz" />
            <param name='f' value="0" />
            <output_collection name="contig_graphs" type="list">
                <element name="Primary contigs" file="asm.p_ctg.gfa"/>
                <element name="Alternate contigs" file="asm.a_ctg.gfa"/>
            </output_collection>
        </test>
        <!-- 02: forced read selection -->
        <test>
            <param name="reads" value="tiny.fa.gz" />
            <param name='f' value="0" />
            <param name='force_rs' value='yes' />
            <output_collection name="contig_graphs" type="list">
                <element name="Primary contigs">
                    <assert_contents>
                        <has_size value="93053" delta="30000" />
                    </assert_contents>
                </element>
            </output_collection>
        </test>
        <!-- 03: read selection -->
        <test>
            <param name="reads" value="zymoD6331std-ecoli-ten-percent.42.1.fq.gz" />
            <param name='f' value="0" />
            <param name='force_rs' value='no' />
            <param name='S' value='true' />
            <output_collection name="contig_graphs" type="list">
                <element name="Primary contigs" file="S.p_ctg.gfa"/>
                <element name="Alternate contigs" file="S.a_ctg.gfa"/>
            </output_collection>
        </test>
    </tests>
        <help><![CDATA[
hifiasm_meta
------------

de novo metagenome assembler, based on hifiasm, a haplotype-resolved de novo
assembler for PacBio Hifi reads.


Hifiasm is an ultrafast haplotype-resolved de novo assembler for PacBio Hifi
reads. Unlike most existing assemblers, hifiasm starts from uncollapsed
genome. Thus, it is able to keep the haplotype information as much as
possible. The input of hifiasm is the PacBio Hifi reads in fasta/fastq
format, and its outputs consist of multiple types of assembly graph in GFA
format.

Hifiasm_meta is a fork of hifiasm. It comes with a read selection module,
which enables the assembly of dataset of high redundancy without compromising
overall assembly quality, and meta-centric graphcleaning modules. Currently
hifiasm_meta does not take binning info.

--------------

hifiasm_meta's home page is
`xfengnefx/hifiasm-meta <https://github.com/xfengnefx/hifiasm-meta>`__.

This tool was wrapped by the Galaxy Australia team.
        ]]></help>
        <expand macro="citations"/>
</tool>