importData {scDataviz} | R Documentation |
SingleCellExperiment
object.Import a data-frame or matrix, and associated metadata, to a SingleCellExperiment
object.
importData( mat, assayname, metadata = NULL, downsampleVar = NULL, verbose = TRUE )
mat |
A data-frame or matrix of expression values. Data-frames will be coerced to matrices. |
assayname |
Name of the |
metadata |
Metadata associated with the data contained in 'mat'. A
strict rule is enforced requiring that |
downsampleVar |
Downsample based on variance. Removes this proportion of variables (rows) based on lesser variance. This is applied on a per sample basis. If user wishes to apply this globally on the final merged dataset, then set this to 0 and remove based on variance manually after object creation. |
verbose |
Boolean (TRUE / FALSE) to print messages to console or not. |
Import a data-frame or matrix, and associated metadata, to a SingleCellExperiment
object.
A SingleCellExperiment
object.
Kevin Blighe <kevin@clinicalbioinformatics.co.uk>
# create random data that follows a negative binomial mat <- jitter(matrix( MASS::rnegbin(rexp(50000, rate=.1), theta = 4.5), ncol = 20)) colnames(mat) <- paste0('CD', 1:ncol(mat)) rownames(mat) <- paste0('cell', 1:nrow(mat)) metadata <- data.frame( group = rep('A', nrow(mat)), row.names = rownames(mat), stringsAsFactors = FALSE) sce <- importData(mat, assayname = 'normcounts', metadata = metadata)