Learn R Programming

BASiCS (version 0.7.30)

BASiCS_Data-class: The BASiCS_Data class

Description

Container of expression counts from single-cell sequencing experiments in the format required by BASiCS (see Vallejos et al 2015).

Arguments

Slots

Counts

Matrix of dimensions q times n whose elements corresponds to the raw expression counts. First q.bio rows correspond to biological genes. Last q-q.bio rows correspond to technical spike-in genes.

Tech

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

SpikeInput

Vector of length q-q.bio whose elements indicate the input number of molecules for the spike-in genes (amount per cell).

GeneNames

Vector of length q containing gene names. Default value: GeneNames = paste("Gene", 1:q), with numbering order as in the input dataset.

BatchInfo

Vector of lenght n containing batch indicators.

References

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

See Also

BASiCS_Data-methods, BASiCS_MCMC.

Examples

Run this code
# NOT RUN {
# Expression counts
set.seed(1)
Counts = Counts = matrix(rpois(50*10, 2), ncol = 10)
rownames(Counts) <- c(paste0("Gene", 1:40), paste0("Spike", 1:10))

# Technical information 
Tech = c(rep(FALSE,40),rep(TRUE,10))

# Spikes input number of molecules 
set.seed(2)
SpikeInfo <- data.frame(gene=rownames(Counts)[Tech],amount=rgamma(10,1,1))

# Creating a BASiCS_Data object (no batch effect)
Data = newBASiCS_Data(Counts, Tech, SpikeInfo)

head(counts(Data))
dim(counts(Data, type="biological"))
dim(counts(Data, type="technical"))
displayTechIndicator(Data)
displaySpikeInput(Data)
displayBatchInfo(Data)

# }

Run the code above in your browser using DataLab