stringtie2se: Create a SummarizedExperiment object from StringTie output

View source: R/05_04_assembly_quantification_stringtie.R

stringtie2seR Documentation

Create a SummarizedExperiment object from StringTie output

Description

Create a SummarizedExperiment object from StringTie output

Usage

stringtie2se(
  sample_info = NULL,
  stringtiedir = "results/05_quantification/stringtie",
  level = "gene",
  tx2gene = NULL,
  countsFromAbundance = "lengthScaledTPM"
)

Arguments

sample_info

Data frame of sample metadata created with the functions create_sample_info

stringtiedir

Directory where StringTie output files are stored.

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".

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)
qc_table <- summary_stats_fastp(system.file("extdata", package = "bears"))
data(tx2gene)
mappingdir <- system.file("extdata", package="bears")
gff_path <- system.file("extdata", "Homo_sapiens.GRCh37.75_subset.gtf",
                        package="bears")
stringtiedir <- tempdir()
if(stringtie_is_installed()) {
    a <- stringtie_quantify(sample_info, qc_table, mappingdir, 
                            gff_path, stringtiedir)
    se_gene <- stringtie2se(sample_info, stringtiedir, tx2gene = tx2gene)
}

almeidasilvaf/GEAtlas documentation built on April 14, 2023, 6:58 p.m.