view FPKM_count.xml @ 54:5873cd7afb67 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rseqc commit 62a9135bf04aec398d3172d17ccd60f5242d8e82
author iuc
date Wed, 13 Jun 2018 18:02:25 -0400
parents 09846d5169fa
children dbedfc5f5a3c
line wrap: on
line source

<tool id="rseqc_FPKM_count" name="FPKM Count" version="@WRAPPER_VERSION@.1">
    <description>calculates raw read count, FPM, and FPKM for each gene</description>

    <macros>
        <import>rseqc_macros.xml</import>
    </macros>

    <expand macro="requirements" />

    <expand macro="stdio" />

    <version_command><![CDATA[FPKM_count.py --version]]></version_command>

    <command><![CDATA[
        ln -sf '${input}' 'local_input.bam' &&
        ln -sf '${input.metadata.bam_index}' 'local_input.bam.bai' &&
        FPKM_count.py -i 'local_input.bam' -o output -r '${refgene}'

        #if str($strand_type.strand_specific) == "pair"
            -d
            #if str($strand_type.pair_type) == "sd"
                '1++,1--,2+-,2-+'
            #else
                '1+-,1-+,2++,2--'
            #end if
        #end if

        #if str($strand_type.strand_specific) == "single"
            -d
            #if str($strand_type.single_type) == "s"
                '++,--'
            #else
                '+-,-+'
            #end if
        #end if

        @MULTIHITS@

        $onlyexonic
        --single-read="${singleread}"
        ]]>
    </command>

    <inputs>
        <expand macro="bam_param" />
        <expand macro="refgene_param" />
        <expand macro="strand_type_param" />
        <expand macro="multihits_param" />
        <param name="onlyexonic" type="boolean" value="false" truevalue="--only-exonic" falsevalue="" label="Only use exonic (UTR exons and CDS exons) reads, otherwise use all reads" help="(--only-exonic)"/>
        <param name="singleread" type="select" label="How should read-pairs that only have one end mapped be counted?" help="(--single-read)">
            <option value="1" selected="true">Treat it as a whole fragment (1)</option>
            <option value="0.5">Treat it as a half fragment (0.5)</option>
            <option value="0">Ignore it (0)</option>
        </param>
    </inputs>

    <outputs>
        <data format="xls" name="outputxls" from_work_dir="output.FPKM.xls"/>
    </outputs>

    <tests>
        <test>
            <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam"/>
            <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed"/>
            <output name="outputxls" file="output.FPKM.xls"/>
        </test>
    </tests>

    <help><![CDATA[
FPKM_count.py
+++++++++++++

Given a BAM file and reference gene model, this program will calculate the raw
read count, FPM (fragments per million), and FPKM (fragments per million
mapped reads per kilobase exon) for each gene in a BED file. For strand
specific RNA-seq data, program will assign read to its parental gene according
to strand rule, if you don't know the strand rule, run infer_experiment.py.
Please note that chromosome ID, genome cooridinates should be concordant
between BAM and BED files.

Inputs
++++++++++++++

Input BAM/SAM file
    Alignment file in BAM/SAM format.

Reference gene model
    Gene model in BED format.

Strand sequencing type (default=none)
    See Infer Experiment tool if uncertain.

Options
++++++++++++++

Skip Multiple Hit Reads
    Use Multiple hit reads or use only uniquely mapped reads.

Minimum mapping quality
    Minimum mapping quality (phred scaled) for an alignment to be called
    "uniquely mapped". default=30

Only use exonic reads
    Renders program only used exonic (UTR exons and CDS exons) reads,
    otherwise use all reads.

Single Reads
    How to count read-pairs that only have one end mapped. 0: ignore it. 0.5:
    treat it as half fragment. 1: treat it as whole fragment. default=1

Sample Output
++++++++++++++

======  =========  =========  =========  =========  ===========  ==========  ============  ============
#chrom  st         end        accession  mRNA_size  gene_strand  Frag_count  FPM           FPKM
======  =========  =========  =========  =========  ===========  ==========  ============  ============
chr1    100652477  100715409  NM_001918  10815.0    ‘-‘          5498.0      191.73788949  17.728884835
chr1    175913961  176176380  NM_022457  2789.0     ‘-‘          923.0       32.188809021  11.541344217
chr1    150980972  151008189  NM_021222  2977.0     ‘+’          687.0       23.958517657  8.0478729115
chr1    6281252    6296044    NM_012405  4815.0     ‘-‘          1396.0      48.684265866  10.11095864
chr1    20959947   20978004   NM_032409  2660.0     ‘+’          509.0       17.750925018  6.6732800821
chr1    32479294   32509482   NM_006559  2891.0     ‘+’          2151.0      75.014223408  25.947500314
======  =========  =========  =========  =========  ===========  ==========  ============  ============

@ABOUT@

]]>
    </help>

    <expand macro="citations" />

</tool>