prepare_count_data: Prepare count data

View source: R/functions_expr_data.R

prepare_count_dataR Documentation

Prepare count data

Description

Remove genes with only zero counts across samples and perform voom transformation (as implemented in voom)

Usage

prepare_count_data(counts)

Arguments

counts

[data.frame or matrix] raw counts with genes in rows and samples in columns

Value

[list] assays (counts, voom and voom.weights) to be used in make_se_object

Examples

# define temporary directory for storing file from recount
temp.dir = tempdir()

# get counts from recount
library(recount)
download_study(
  project = "SRP057087",
  type = "counts-gene",
  outdir = temp.dir)
counts = read.table(
  file.path(temp.dir, "counts_gene.tsv.gz"),
  header = TRUE,
  row.names = 29)

assays = prepare_count_data(counts)

szymczak-lab/harmonizeGeneExprData documentation built on Dec. 1, 2022, 9:07 p.m.