view bellerophon.xml @ 1:25ca5d73aedf draft

"planemo upload for repository https://github.com/davebx/bellerophon commit bf1c72ac01d7b761a32d0304b7b5054228f33274"
author iuc
date Fri, 27 Aug 2021 10:46:26 +0000
parents eca6296a091a
children 321347bd0494
line wrap: on
line source

<tool id="bellerophon" name="Filter and merge" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
    <description>chimeric reads from Arima Genomics</description>
    <macros>
        <token name="@TOOL_VERSION@">1.0</token>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">bellerophon</requirement>
        <requirement type="package" version="1.12">samtools</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        #if $forward.is_of_type("sam"):
            #set $forward_input = 'forward_input.sam'
            ln -s '${forward}' '$forward_input' &&
        #else:
            #set $forward_input = 'forward_input.bam'
            ln -s '${forward}' '$forward_input' &&
        #end if
        #if $reverse.is_of_type("sam"):
            #set $reverse_input = 'reverse_input.sam'
            ln -s '${reverse}' '$reverse_input' &&
        #else: 
            #set $reverse_input = 'reverse_input.bam'
            ln -s '${reverse}' '$reverse_input' &&
        #end if
        bellerophon
        --forward $forward_input
        --reverse $reverse_input
        --quality $quality
        --output 'merged_out.bam'
        && samtools sort --no-PG -O BAM -o '$outfile' -@ \${GALAXY_SLOTS:-1} merged_out.bam
        ]]>
    </command>
    <inputs>
        <param argument="--forward" type="data" format="qname_sorted.bam,sam" label="First set of reads"
            help="This is usually the forward reads in your experiment." />
        <param argument="--reverse" type="data" format="qname_sorted.bam,sam" label="Second set of reads"
            help="This is usually the reverse reads in your experiment." />
        <param argument="--quality" type="integer" value="20" label="Minimum mapping quality"/>
    </inputs>
    <outputs>
        <data name="outfile" format="bam"/>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="forward" value="forward.bam" ftype="qname_sorted.bam" />
            <param name="reverse" value="reverse.bam" ftype="qname_sorted.bam" />
            <param name="quality" value="20" />
            <!-- since the tool expects qname_sorted.bam but the bam files are actually coordinate sorted
                 galaxy sorts them automatically (https://github.com/galaxyproject/galaxy/blob/bfbc537b58e5b00d1e00c37396dbf42a3bd98c5c/lib/galaxy/datatypes/binary.py#L437) 
                 this adds a PG line -->
            <output name="outfile" file="merged-out.bam" ftype="bam" lines_diff="2" />
        </test>
        <test expect_num_outputs="1">
            <param name="forward" value="forward.sam" ftype="sam" />
            <param name="reverse" value="reverse.sam" ftype="sam" />
            <param name="quality" value="12" />
            <output name="outfile" file="merged-sam.bam" ftype="bam"/>
        </test>
    </tests>
    <help><![CDATA[
        Filter mapped reads where the mapping spans a junction, retaining the 5-prime read. This is usually needed when dealing with data from Arima Genomics.
    ]]></help>
    <citations>
        <citation type="doi">10.1038/s41586-021-03451-0</citation>
    </citations>
</tool>