Learn R Programming

NBPSeq (version 0.1.8)

prepare.nb.data: Prepare the NB Data Structure for RNA-Seq Read Counts

Description

Create a NB data structure to hold the RNA-Seq read counts and other relevant information.

Usage

prepare.nb.data(counts, lib.sizes = colSums(counts),
    norm.factors = rep(1, dim(counts)[2]),
    tags = matrix(row.names(counts), dim(counts)[1], 1))

Arguments

counts
an mxn matrix of RNA-Seq read counts with rows corresponding to gene features and columns corresponding to independent biological samples.
lib.sizes
an n-vector of observed library sizes. By default, library sizes are estimated to the column totals of the matrix counts.
norm.factors
an n-vector of normalization factors. By default, have values 1 (no normalization is applied).
tags
a matrix of tags associated with genes, one row for each gene (having the same number of rows as counts. By default, row names of the matrix counts are used as tags.

Value

  • A list containing the following components:
  • countsthe count matrix, same as input.
  • lib.sizesobserved library sizes, same as input.
  • norm.factorsnormalization factors, same as input.
  • eff.lib.sizeseffective library sizes (lib.sizes x norm.factors).
  • rel.frequenciesrelative frequencies (counts divided by the effective library sizes).
  • tagsa matrix of gene tags, same as input.