view dada2_mergePairs.xml @ 6:84743da21318 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit ea6c9c638e742c097b0ef294161eeea447c09e06
author iuc
date Fri, 30 Jun 2023 07:56:20 +0000
parents 69900ffd3b8e
children 35176674168c
line wrap: on
line source

<tool id="dada2_mergePairs" name="dada2: mergePairs" version="@DADA2_VERSION@+galaxy@WRAPPER_VERSION@" profile="19.09">
    <description>Merge denoised forward and reverse reads</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[
    Rscript '$dada2_script'
    ]]></command>
    <configfiles>
        <configfile name="dada2_script"><![CDATA[
library(dada2, quietly=T)

dadaF <- readRDS('$dadaF')
dadaR <- readRDS('$dadaR')

merged <- mergePairs(dadaF, '$derepF', dadaR, '$derepR', minOverlap = $minOverlap, maxMismatch = $maxMismatch,
## currently not accessible by the wrapper    returnRejects = FALSE, propagateCol = character(0),
    justConcatenate = $justConcatenate, trimOverhang = $trimOverhang)

saveRDS(merged, file='$merged')
##For display in Galaxy this could be transposed (..but the user could also do it herself)
##write.table(merged, "$merged", quote=F, sep="\t", row.names = F, col.names = T)
    ]]></configfile>
    </configfiles>
    <inputs>
        <param argument="dadaF" type="data" format="dada2_dada" label="Dada results for forward reads"/>
        <param argument="derepF" type="data" format="fastq,fastq.gz" label="Forward reads" help="despite the parameter name the sequences don't need to be dereplicated "/>
        <param argument="dadaR" type="data" format="dada2_dada" label="Dada results for reverse reads"/>
        <param argument="derepR" type="data" format="fastq,fastq.gz" label="Reverse reads" help="despite the parameter name the sequences don't need to be dereplicated "/>
        <param argument="minOverlap" type="integer" value="12" min="0" label="Minimum length of the overlap"/>
        <param argument="maxMismatch" type="integer" value="0" min="0" label="Maximum number of mismatches"/>
        <param argument="justConcatenate" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Concatenated rather than merge" help="The forward and reverse-complemented reverse read are concatenated rather than merged, with a 10 Ns spacer inserted between them"/>
        <param argument="trimOverhang" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Trim overhangs" help="Overhangs are when the reverse read extends past the start of the forward read, and vice-versa, as can happen when reads are longer than the amplicon and read into the other-direction primer region"/>
    </inputs>
    <outputs>
        <data name="merged" format="dada2_mergepairs" label="${tool.name} on ${on_string}"/>
    </outputs>
    <tests>
        <test>
            <param name="dadaF" ftype="dada2_dada" value="dada_F3D0_S188_L001_R1.Rdata"/>
            <param name="derepF" ftype="fastq.gz" value="filterAndTrim_F3D0_R1.fq.gz"/>
            <param name="dadaR" ftype="dada2_dada" value="dada_F3D0_S188_L001_R2.Rdata"/>
            <param name="derepR" ftype="fastq.gz" value="filterAndTrim_F3D0_R2.fq.gz"/>
            <output name="merged" value="mergePairs_F3D0_S188_L001.Rdata" ftype="dada2_mergepairs" compare="sim_size" delta="400" />
        </test>
        <!-- test non-default options -->
        <test>
            <param name="dadaF" ftype="dada2_dada" value="dada_F3D0_S188_L001_R1.Rdata"/>
            <param name="derepF" ftype="fastq.gz" value="filterAndTrim_F3D0_R1.fq.gz"/>
            <param name="dadaR" ftype="dada2_dada" value="dada_F3D0_S188_L001_R2.Rdata"/>
            <param name="derepR" ftype="fastq.gz" value="filterAndTrim_F3D0_R2.fq.gz"/>
            <output name="merged" value="mergePairs_F3D0_S188_L001_nondefault.Rdata" ftype="dada2_mergepairs" compare="sim_size" delta="700"/>
            <param name="minOverlap" value="8" />
            <param name="maxMismatch" value="1"/>
            <param name="justConcatenate" value="TRUE" />
            <param name="trimOverhang" value="TRUE" />
        </test>
    </tests>
    <help><![CDATA[
Description
...........

This function attempts to merge each denoised pair of forward and reverse reads, rejecting any pairs which do not sufficiently overlap (at least 12bp by default) or which contain too many (>0 by default) mismatches in the overlap region.

Usage
.....

**Input**

- reads and learned error rates of the forward reads
- reads and learned error rates of the reverse reads

**Output**

- a data set of type dada2_mergepairs (which is a RData file containing the output of dada2's mergePairs function).

Details
.......

@HELP_OVERVIEW@


    ]]></help>
    <expand macro="citations"/>
</tool>