extractAlpine: Extract results from estimateAbundance run across genes

View source: R/helper.R

extractAlpineR Documentation

Extract results from estimateAbundance 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 estimateAbundance

model

the name of a model, corresponds to names of models used in fitBiasModels

lib.sizes

the vector of library sizes passed to estimateAbundance. 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 estimateAbundance. 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


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


mikelove/alpine documentation built on June 9, 2024, 11:37 a.m.