View source: R/snap-utilities.R
createSnapFromGmat | R Documentation |
This function takes a cell-by-gene count matrix as input and returns a snap object.
createSnapFromGmat(mat, barcodes, gene.names)
mat |
A sparse matrix |
barcodes |
An array of characters for barcodes |
gene.names |
An array of characters for gene names |
mat = Matrix(sample(0:10, 100, replace=TRUE),sparse=TRUE, ncol=5); barcodes = paste("barcode", seq(nrow(mat)), sep="."); gene.names = paste("genes", seq(ncol(mat)), sep="."); x.sp = createSnapFromGmat( mat, barcodes=barcodes, gene.names=gene.names );
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.