Learn R Programming

BASiCS (version 0.3.1)

newBASiCS_Data: Creates a BASiCS_Data object from a matrix of expression counts and experimental information about spike-in genes

Description

newBASiCS_Data creates a BASiCS_Data-class object from a matrix of expression counts and experimental information about spike-in genes.

Usage

newBASiCS_Data(Counts, Tech, SpikeInfo, BatchInfo = NULL)

Arguments

Counts

Matrix of dimensions q times n whose elements contain the expression counts to be analyses (including biological and technical spike-in genes). Gene names must be stored as `rownames(Counts)`.

Tech

Logical vector of length q. If Tech = FALSE the gene is biological; otherwise the gene is spike-in.

SpikeInfo

data.frame whose first and second columns contain the gene names assigned to the spike-in genes (they must match the ones in `rownames(Counts)`) and the associated input number of molecules, respectively.

BatchInfo

Vector of length n whose elements indicate batch information.

Value

An object of class BASiCS_Data-class.

References

Vallejos, Marioni and Richardson (2015). Bayesian Analysis of Single-Cell Sequencing data.

See Also

BASiCS_Data-class

Examples

Run this code
# NOT RUN {
set.seed(1)
Counts = matrix(rpois(10*5, 1), ncol = 5)
rownames(Counts) <- paste0("Gene",1:10)
Tech = c(rep(FALSE,7), rep(TRUE,3))
set.seed(2)
SpikeInfo = data.frame(paste0("Gene",8:10), rgamma(3,1,1))
Data = newBASiCS_Data(Counts, Tech, SpikeInfo)
# }

Run the code above in your browser using DataLab