load_seq: Load bulk RNA-Seq data into an ExpressionSet.

View source: R/load_seq.R

load_seqR Documentation

Load bulk RNA-Seq data into an ExpressionSet.

Description

Load bulk RNA-Seq data into an ExpressionSet.

Usage

load_seq(
  data_dir,
  species = "Homo sapiens",
  release = "94",
  load_saved = TRUE,
  save_eset = TRUE
)

Arguments

data_dir

Directory with raw and quantified RNA-Seq files.

species

Character vector indicating species. Genus and species should be space separated, not underscore. Default is Homo sapiens.

release

EnsemblDB release. Should be same as used in build_kallisto_index.

load_saved

If TRUE (default) and a saved ExpressionSet exists, will load from disk.

save_eset

If TRUE (default) and either load_saved is FALSE or a saved ExpressionSet does not exist, then an ExpressionSet will be saved to disk. Will overwrite if already exists.

Value

ExpressionSet with attributes/accessors:

  • sampleNames from names of raw RNA-Seq files (excluding .fastq.gz suffix).

  • annotation Character vector of annotation package used.

  • exprs Length scaled counts generated from abundances for use in voom (see vignette("tximport", package = "tximport")).

  • phenoData added columns:

    • lib.size library size from calcNormFactors.

    • norm.factors library normalization factors from calcNormFactors.

See Also

get_vsd

Examples


library(tximportData)
example <- system.file("extdata", "kallisto_boot",
    "ERR188021",
    package = "tximportData"
)

# setup to mirror expected folder structure
data_dir <- tempdir()
qdir <- paste("kallisto", get_pkg_version(), "quants", sep = "_")
qdir <- file.path(data_dir, qdir)
unlink(qdir, recursive = TRUE)
dir.create(qdir)
file.copy(example, qdir, recursive = TRUE)

# construct and annotate eset
eset <- load_seq(data_dir)

alexvpickering/rkal documentation built on Nov. 27, 2022, 8:38 p.m.