% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/snap-utilities.R
\name{createSnapFromGmat}
\alias{createSnapFromGmat}
\title{Create a snap object from cell-by-gene matrix}
\usage{
createSnapFromGmat(mat, barcodes, gene.names)
}
\arguments{
\item{mat}{A sparse matrix}

\item{barcodes}{An array of characters for barcodes}

\item{gene.names}{An array of characters for gene names}
}
\description{
This function takes a cell-by-gene count matrix as input and returns a snap object.
}
\examples{
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
);
}
