write_tpm_matrix: Write an expression matrix to file

View source: R/rnaseq_helpers.R

write_tpm_matrixR Documentation

Write an expression matrix to file

Description

Write an TPM expression matrix to a CSV file in extdata

Usage

write_tpm_matrix(
  summarised_experiment,
  path = "inst/extdata/",
  drop = NULL,
  tpm = 1,
  samples = 5
)

Arguments

summarised_experiment

a SummarisedExperiment object

path

the existing folder to write to, Default is inst/extdata/

drop

samples (columns) to remove

tpm

minimum TPM for a gene to be kept, Default: 1

samples

minimum number of samples a gene must be present in to be kept, Default: 5

Details

This function writes an expression matrix to a CSV file in extdata, filtering out genes with fewer than tpm reads in at least samples samples.

Value

path to the CSV file

See Also

SummarizedExperiment-class write.table

Examples

## Not run: 
if (interactive()) {
    write_tpm_matrix(cml_mrna_GRCm38_HLT, c("F545.7", "X490.17"), tpm = 1, samples = 5)
}

## End(Not run)

drejom/helpeRs documentation built on Aug. 26, 2022, 4:52 a.m.