GENEXP_CDS: GENEXP_CDS, count reads mapped to CDS regions and calculate...

View source: R/APAlyzer.R

GENEXP_CDSR Documentation

GENEXP_CDS, count reads mapped to CDS regions and calculate TPM for coding gene

Description

Map reads to CDS regions and calculate TPM for each gene.

Usage

    GENEXP_CDS(CDSbygene, flS, Strandtype="NONE")

Arguments

CDSbygene

a genomic ranges of CDS regions for each coding gene

flS

bamfile lists containing the file and path of bam files

Strandtype

strand type of the bam file; "forward" is forwand sequencing, "invert" is reverse sequencing and "NONE" is non-strand specific, Default is "NONE".

Value

The function GENEXP_CDS() return a dataframe containing reads count, TPM for each gene

Author(s)

Ruijia Wang

Examples

## count reads mapped to CDS regions and calculate TPM for each gene
## using forward sequencing
    library("TBX20BamSubset")
    library("Rsamtools")
    library("GenomicAlignments")
    library("GenomicFeatures")
    library("org.Mm.eg.db")
    flsall = getBamFileList()
    extpath = system.file("extdata", "mm9.chr19.refGene.R.DB", package="APAlyzer")
    txdb = loadDb(extpath, packageName='GenomicFeatures')
    IDDB = org.Mm.eg.db
    CDSdbraw = REFCDS(txdb,IDDB)
    DFGENEraw = GENEXP_CDS(CDSdbraw, flsall, Strandtype="forward")


RJWANGbioinfo/APAlyzer documentation built on July 10, 2022, 10:30 a.m.