view dada2_mergePairs.xml @ 2:5ccfc129619c draft

planemo upload for repository https://github.com/bernt-matthias/mb-galaxy-tools/tree/topic/dada2/tools/dada2 commit 5b1603bbcd3f139cad5c876be83fcb39697b5613-dirty
author matthias
date Tue, 09 Apr 2019 07:07:52 -0400
parents 44230c777694
children caae353b2928
line wrap: on
line source

<tool id="dada2_mergePairs" name="dada2: mergePairs" version="@DADA2_VERSION@+galaxy@WRAPPER_VERSION@">
    <description>Merge denoised forward and reverse reads</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <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(file.path('$dadaf'))
dadaR <- readRDS(file.path('$dadar'))
derepF <- readRDS(file.path('$derepf.extra_files_path',"Rdata"))
derepR <- readRDS(file.path('$derepr.extra_files_path',"Rdata"))

merged <- mergePairs(dadaF, derepF, dadaR, derepR, minOverlap = $minoverlap, maxMismatch = $maxmismatch,
    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 name="dadaf" type="data" format="dada2_dada" label="Dada results for forward reads"/>
        <param name="derepf" type="data" format="dada2_derep" label="Dereplicated forward reads"/>
        <param name="dadar" type="data" format="dada2_dada" label="Dada results for reverse reads"/>
        <param name="derepr" type="data" format="dada2_derep" label="Dereplicated reverse reads"/>
        <param name="minoverlap" type="integer" value="12" min="0" label="Minimum length of the overlap"/>
        <param name="maxmismatch" type="integer" value="0" min="0" label="Maximum number of mismatches"/>
        <param name="justconcatenate" type="boolean" checked="false" truevalue="FALSE" 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 name="trimoverhang" type="boolean" checked="false" truevalue="FALSE" 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>

    <help><![CDATA[
Description
...........

This function attempts to merge each denoised pair of forward and reverse reads, rejecting any pairs which do not sufficiently overlap or which contain too many (>0 by default) mismatches in the overlap region.
    ]]></help>
    <expand macro="citations"/>
</tool>