read_RSEM | R Documentation |
Reads RSEM counts or stats files and optionally reshape into wide format.
read_RSEM(
path = ".",
gene = TRUE,
value = "expected_count",
reshape = TRUE,
stats = FALSE
)
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 |
A tibble in long or wide format if reshape=TRUE
The cnt and model files in the stats directory vary depending on RSEM options and the parser may fail.
Chris Stubben
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
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.