read_RSEM: Read RSEM output files

View source: R/read_RSEM.R

read_RSEMR Documentation

Read RSEM output files

Description

Reads RSEM counts or stats files and optionally reshape into wide format.

Usage

read_RSEM(
  path = ".",
  gene = TRUE,
  value = "expected_count",
  reshape = TRUE,
  stats = FALSE
)

Arguments

path

the path to RSEM output files, the default corresponds to the working directory.

gene

read gene or transcript (isoform) result files, default gene

value

a string with the RSEM column name to populate cell values, default expected_count

reshape

reshape into wide format with samples in rows (a count matrix).

stats

read stat files, default counts

Value

A tibble in long or wide format if reshape=TRUE

Note

The cnt and model files in the stats directory vary depending on RSEM options and the parser may fail.

Author(s)

Chris Stubben

References

https://github.com/deweylab/RSEM/blob/master/cnt_file_description.txt and https://github.com/deweylab/RSEM/blob/master/model_file_description.txt for output format

Examples

## Not run: 
 # count matrix
rsem_counts <- read_RSEM( "Alignments")
 # read TPM
tpm <- read_RSEM("Alignments", value="TPM")
 # reshape uses alignments stats only (rows 1-3 in *.cnt files)
read_RSEM( ".", stats=TRUE)

## End(Not run)

HuntsmanCancerInstitute/hciR documentation built on Aug. 20, 2024, 12:22 a.m.