Learn R Programming

monocle (version 1.6.2)

newCellDataSet: Creates a new CellDateSet object.

Description

Monocle requires that all data be housed in CellDataSet objects. CellDataSet extends Bioconductor's ExpressionSet class, and the same basic interface is supported. newCellDataSet() expects a matrix of relative expression values as its first argument, with rows as features (usually genes) and columns as cells. Per-feature and per-cell metadata can be supplied with the featureData and phenoData arguments, respectively. Use of these optional arguments is strongly encouraged. The CellDataSet also includes a VGAM expressionFamily object to encode the distribution that describes all genes.

Usage

newCellDataSet(cellData, phenoData = NULL, featureData = NULL,
  lowerDetectionLimit = 0.1, expressionFamily = VGAM::tobit(Lower =
  log10(lowerDetectionLimit), lmu = "identitylink"))

Arguments

cellData
expression data matrix for an experiment
phenoData
data frame containing attributes of individual cells
featureData
data frame containing attributes of features (e.g. genes)
lowerDetectionLimit
the minimum expression level that consistitutes true expression
expressionFamily
the VGAM family function to be used for expression response variables

Value

  • a new CellDataSet object

Details

CellDataSet objects store a matrix of expression values. These values typically come from a program that calculates expression values from RNA-Seq reads such as Cufflinks. However, they might also be values from a single cell qPCR run or some other type of assay. By default, Monocle expects these values to be more or less log-normally distributed. If you log-transform the values before providing them to newCellDataSet, you will get bad results downstream. You can specify other VGAM family functions as an argument to this function, but this may result in undefined behavior. Expanded support for other family functions (e.g. the negative binomial) will likely appear in future versions of Monocle.

Examples

Run this code
sample_sheet_small <- read.delim("../data/sample_sheet_small.txt", row.names=1)
sample_sheet_small$Time <- as.factor(sample_sheet_small$Time)
gene_annotations_small <- read.delim("../data/gene_annotations_small.txt", row.names=1)
fpkm_matrix_small <- read.delim("../data/fpkm_matrix_small.txt")
pd <- new("AnnotatedDataFrame", data = sample_sheet_small)
fd <- new("AnnotatedDataFrame", data = gene_annotations_small)
HSMM <- new("CellDataSet", exprs = as.matrix(fpkm_matrix_small), phenoData = pd, featureData = fd)

Run the code above in your browser using DataLab