sleuth_to_matrix: Convert a sleuth object to matrix

View source: R/matrix.R

sleuth_to_matrixR Documentation

Convert a sleuth object to matrix

Description

Convert a sleuth object to a matrix with the condition names.

Usage

sleuth_to_matrix(obj, which_df, which_units)

Arguments

obj

a sleuth object

which_df

character vector of length one. Which type of data to use ("obs_norm" or "obs_raw")

which_units

character vector of length one. Which units to use ("tpm" or "est_counts" (for transcript-level analyses) or "scaled_reads_per_base" (for gene-level analyses))

Value

a matrix which contains a matrix of target_ids and transcript (or gene) expression in which_units. Note this currently does not support returning raw values for gene-level counts or TPMs.

Examples

sleuth_matrix <- sleuth_to_matrix(sleuth_obj, 'obs_norm', 'tpm')
head(sleuth_matrix) # look at first 5 transcripts, sorted by name

pachterlab/sleuth documentation built on Nov. 17, 2022, 4:51 p.m.