view dexseq_count.xml @ 8:2872c633f07e draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dexseq commit d6fb005b0dbf26037aab1748d9b5df12876c674d"
author iuc
date Sun, 19 Dec 2021 23:02:46 +0000
parents 251393b72616
children df929f257179
line wrap: on
line source

<tool id="dexseq_count" name="DEXSeq-Count" version="@TOOL_VERSION@.1" profile="@PROFILE@">
    <description>Prepare and count exon abundancies from RNA-seq data</description>
    <xrefs>
        <xref type="bio.tools">dexseq</xref>
    </xrefs>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements">
    </expand>
    <stdio>
        <!-- Anything other than zero is an error -->
        <exit_code range="1:" />
        <exit_code range=":-1" />
        <!-- In case the return code has not been set propery check stderr too -->
        <regex match="Error:" />
        <regex match="Exception:" />
    </stdio>
    <command><![CDATA[
#if $mode.mode_select == "prepare":
    dexseq_prepare_annotation.py
        -r $mode.aggregate
        '$mode.gtffile'
        '$flattened_gtf_out'
#elif $mode.mode_select == "count":
    dexseq_count.py
        --format bam
        --paired $mode.paired
        --stranded $mode.stranded
        --minaqual $mode.qual
        --order $mode.order
        $mode.flattened_gtf_in
        '$mode.bamfile'
        '$counts_file'
#end if
    ]]></command>
    <inputs>
        <conditional name="mode">
            <param name="mode_select" type="select" label="Mode of operation">
                <option value="prepare">Prepare annotation</option>
                <option value="count">Count reads</option>
            </param>
            <when value="prepare">
                <param name="gtffile" type="data" format="gff" label="GTF file"/>
                <param name="aggregate" type="boolean" checked="True" truevalue="yes" falsevalue="no"
                    label="Aggregate genes with exons?"
                    help="Indicates whether two or more genes sharing an exon should be merged into an 'aggregate gene'. If 'no', the exons that can not be assiged to a single gene are ignored."/>
            </when>
            <when value="count">
                <param name="bamfile" type="data" format="bam" label="Input bam file"/>
                <param name="flattened_gtf_in" type="data" format="gff" label="DEXSeq compatible GTF file" help="Created by prepare mode"/>
                <param name="paired" type="boolean" checked="false" truevalue="yes" falsevalue="no" label="Is library paired end?"/>
                <param name="stranded" type="select" label="Is library strand specific?">
                    <option value="yes" selected="true">Yes</option>
                    <option value="no">No</option>
                    <option value="reverse">Yes, but reverse</option>
                </param>
                <param name="qual" type="integer" value="10" label="Skip all reads with alignment quality lower than the given minimum value"/>
                <param name="order" type="select" label="Sorting order of alignments" help="If you generated your alignments using tophat, they are by default position sorted. Ignored for single-end data">
                    <option value="pos" selected="true">By position</option>
                    <option value="name">By name</option>
                </param>
            </when>
        </conditional>
    </inputs>

    <outputs>
        <data name="counts_file" format="tabular" label="DEXSeq count reads on ${on_string}">
            <filter>mode['mode_select'] == 'count'</filter>
        </data>
        <data name="flattened_gtf_out" format="gtf" label="DEXSeq prepare annotation on ${on_string}">
            <filter>mode['mode_select'] == 'prepare'</filter>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="mode_select" value="prepare" />
            <param name="gtffile" ftype="gff" value="original.gtf"/>
            <param name="aggregate" value="True"/>
            <output name="flattened_gtf_out" ftype="gtf" compare="sim_size" file="flattened.gtf"/>
        </test>
        <!-- Ensure count mode works -->
        <test>
            <param name="mode_select" value="count" />
            <param name="bamfile" ftype="bam" value="in.bam" />
            <param name="flattened_gtf_in" ftype="gff" value="flattened.gtf"/>
            <param name="stranded" value="no" />
            <output name="counts_file" ftype="tabular" file="out_count.tab"/>
        </test>
    </tests>

    <help><![CDATA[
.. class:: infomark

**What it does**

The main goal of this tool is to count the number of reads/fragments per exon of each gene in RNA-seq samples. In addition, it also prepares your annotation GTF file, making it compatible for counting.


**Inputs**

Mode-preprare: Takes a normal GTF file as input. For example from Ensembl database.
Mode-count: Inputs are flattened GTF file and BAM file. The flattened GTF file can be generated from 'prepare' mode of this tool.

**Output**

Mode-prepare: Flattened GTF file that contains only exons with corresponding gene ids from the input GTF file. Sometimes two or more genes sharing an exon will be merged into an 'aggregate gene' if the aggregate option was used.
Mode-count: Two column tab-delimited file with exon ids and their read counts.

.. _DEXSeq: http://master.bioconductor.org/packages/release/bioc/html/DEXSeq.html

    ]]></help>
    <citations>
        <citation type="doi">10.1101/gr.133744.111</citation>
    </citations>
</tool>