RatioFromReads: Calculate expression ratio (PSI) from bamfiles

Description Usage Arguments Value Author(s) See Also Examples

Description

This function extracts reads information from bamfile using Rsamtools and calculates expression ratio (denoted as Percent Splice-In, PSI) of each alternatively spliced exon (i.e., exon skipping, intro retention, and 5- and 3- prime splice sites).

Usage

1
2
    RatioFromReads(ASdb=NULL,Total.bamfiles=NULL,readsInfo=c("paired","single"),
        readLen=NULL,inserSize=NULL,minr=3,CalIndex=NULL,Ncor=1,out.dir=NULL)

Arguments

ASdb

An ASdb object including "SplicingModel" slot from the Splicingfinder function.

Total.bamfiles

A data frame containing the path and name of a bamfile from RNA-seq

readsInfo

Information of RNA-seq types (single- or paired-end reads)

readLen

The read length

inserSize

The insert size between paired-end reads.

minr

A minimum number of testable reads mapping to a given exon.

CalIndex

An index number in the ASdb object which will be tested in this function.

Ncor

The number of cores for multi-threads.

out.dir

An output directory.

Value

ASdb with the slot (labeled by "Ratio") containing results from the the RatioFromReads function. The "Ratio" slot contains a list object and each element of the list object returns the results assigned to three elements, which is of each alternative splicing type (i.e. Exon skipping, Alternative splice site, Intron retention). Three elements are as follows;

ES

A data frame for the result of Exon skipping, consisting of the columns named as follows; Index (index number), EnsID (gene name), Nchr (chromosome name), 1stEX (alternatively spliced target exon), 2ndEX (second alternatively spliced target exon which is the other one of the mutually exclusive spliced exons), DownEX (downstream exon range), UpEX (upstream exon range), Types (splicing type), and names of individuals.

ASS

A data frame for the result of Alternative splice sites, consisting of the columns named as follows; Index (index number), EnsID (gene name), Nchr (chromosome name), ShortEX (shorter spliced target exon), LongEX (longer spliced target exon), NeighborEX (neighboring down or upstream exons), Types (splicing type), and names of individuals.

IR

A data frame for the result of Intron retention, consisting of the columns named as follows; Index (index number), EnsID (gene name), Nchr (chromosome name), RetainEX (retained intron exon), DownEX (downstream exon range), UpEX (upstream exon range), Types (splicing type), and names of individuals.

Author(s)

Seonggyun Han, Younghee Lee

See Also

SplicingReads

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    data(bamfilestest)
    ext.dir <- system.file("extdata", package="IMAS")
    samplebamfiles[,"path"] <- paste(ext.dir,"/samplebam/",samplebamfiles[,"path"],".bam",sep="")
    sampleDB <- system.file("extdata", "sampleDB", package="IMAS")
    transdb <- loadDb(sampleDB)
    ## Not run: 
    ASdb <- Splicingfinder(transdb,Ncor=1)
    ASdb <- ExonsCluster(ASdb,transdb)
    ASdb <- RatioFromReads(ASdb,samplebamfiles,"paired",50,40,3,CalIndex="ES3")
    
## End(Not run)

hangost/IMAS documentation built on May 17, 2019, 2:28 p.m.