newDeaSet: DeaSet object creator

Description Usage Arguments Value Examples

View source: R/regenrichClasses.R

Description

DeaSet object creator

Usage

1
2
3
4
5
6
7
newDeaSet(
  assayRaw = matrix(nrow = 0, ncol = 0),
  rowData = NULL,
  assays = SimpleList(),
  colData = DataFrame(),
  metadata = list()
)

Arguments

assayRaw

A matrix of gene expression data. This can be the same as the matrix-like element in assays parameter.

rowData

A DataFrame object describing the rows.

assays

A list or SimpleList of matrix-like element, or a matrix-like object. The matrix-like element can be the same as assayRaw parameter.

colData

A DataFrame describing the sample information.

metadata

An optional list of arbitrary content describing the overall experiment.

Value

A DeaSet object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Empty DeaSet object
newDeaSet()

# 100 * 6 DeaSet object
nrows = 100
ncols = 6
counts = matrix(rnbinom(nrows * ncols, size = 2, mu = 500),
                nrow = nrows)
assays = SimpleList(counts=counts)

colData = DataFrame(Condition = rep(c("treatment", "ctrl"), 3),
                    row.names=LETTERS[1:6])
geneNames = sprintf("G%03s", seq(nrows))
elementMetadata = DataFrame(gene = geneNames,
                            p = numeric(nrows),
                            logFC = numeric(nrows))
newDeaSet(assayRaw = counts, 
          rowData = elementMetadata,
          assays = SimpleList(assayData = counts),
          colData = colData)

RegEnrich documentation built on March 7, 2021, 2 a.m.