kallisto2se: Create a SummarizedExperiment object from kallisto output

View source: R/05_02_quantification_kallisto.R

kallisto2seR Documentation

Create a SummarizedExperiment object from kallisto output

Description

Create a SummarizedExperiment object from kallisto output

Usage

kallisto2se(
  sample_info = NULL,
  level = "gene",
  kallistodir = "results/05_quantification/kallisto",
  tx2gene = NULL,
  countsFromAbundance = "lengthScaledTPM"
)

Arguments

sample_info

Data frame of sample metadata created with the functions create_sample_info

level

Character indicating to which level expression must be quantified in the SE object. One of "gene" (default), "transcript", or "both". For "both", the SE object will have two assays named "transcript" and "gene".

kallistodir

Directory where quantification files will be stored. Default: results/05_quantification/kallisto.

tx2gene

Data frame of correspondence between genes and transcripts, with gene IDs in the first column and transcript IDs in the second column. Only required if level = 'gene' or 'both'.

countsFromAbundance

Exactly as in tximport::tximport, whether ot not to generate estimated counts using abundance estimates. One of "lengthScaledTPM" (default), "scaledTPM", "no", or "dtuScaledTPM". See ?tximport for details.

Value

A SummarizedExperiment object with gene/transcript expression levels and sample metadata.

Examples

data(sample_info)
data(tx2gene)
kallistodir <- system.file("extdata", package = "bears")
se_gene <- kallisto2se(sample_info, kallistodir = kallistodir, 
                       tx2gene = tx2gene)

almeidasilvaf/bear documentation built on April 14, 2023, 7:03 p.m.