Learn R Programming

alpine (version 0.99.1)

extractAlpine: Extract results from estimateTheta run across genes

Description

This function extracts estimates for a given model from a list over many genes, returning a matrix with dimensions: number of transcript x number of samples. Here, the count of compatible fragments aligning to the genes is used to estimate the FPKM, dividing out the previously used estimate lib.sizes.

Usage

extractAlpine(res, model, lib.sizes = 1e+06, divide.out = TRUE, transcripts = NULL)

Arguments

res
a list where each element is the output of estimateTheta
model
the name of a model, corresponds to names of models used in fitBiasModels
lib.sizes
the vector of library sizes passed to estimateTheta. not needed if divide.out=FALSE
divide.out
logical, whether to divide out the initial estimate of library size and to instead use the count of compatible fragments for genes calculated by estimateTheta. Default is TRUE
transcripts
an optional GRangesList of the exons for each transcript. If this is provided, the output will be a SummarizedExperiment. The transcripts do not need to be provided in the correct order, extractAlpine will find the correct transcript by the names in res and put them in the correct order.

Value

a matrix of FPKM values across transcripts and samples, or a SummarizedExperiment if transcripts is provided

Examples

Run this code

data(preprocessedData)
extractAlpine(res, "GC")

Run the code above in your browser using DataLab