view FPKM_count.xml @ 63:27e16a30667a draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rseqc commit d7544582d5599c67a284faf9232cd2ccc4daa1de
author iuc
date Tue, 09 Apr 2024 11:24:55 +0000
parents 473382134e56
children
line wrap: on
line source

<tool id="rseqc_FPKM_count" name="FPKM Count" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@GALAXY_VERSION@">
    <description>calculates raw read count, FPM, and FPKM for each gene</description>
    <macros>
        <import>rseqc_macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <version_command><![CDATA[FPKM_count.py --version]]></version_command>
    <command><![CDATA[
        @BAM_SAM_INPUTS@
        FPKM_count.py -i 'input.${extension}' -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="tabular" name="output" from_work_dir="output.FPKM.xls" label="${tool.name} on ${on_string}: FPKM counts"/>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam"/>
            <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed" ftype="bed12"/>
            <output name="output" file="output01.tab"/>
        </test>
        <test expect_num_outputs="1">
            <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam"/>
            <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed" ftype="bed12"/>
            <conditional name="multihits_type">
                <param name="multihits_type_selector" value="skip_multihits"/>
                <param name="mapq" value="20"/>
            </conditional>
            <output name="output" file="output02.tab"/>
            <assert_command>
                <has_text text="--mapq=20"/>
            </assert_command>
        </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>