runSeurat | R Documentation |
runSeurat(counts, gene.use = FALSE, resolution)
counts |
|
gene.use |
|
resolution |
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (counts, gene.use = FALSE, resolution)
{
require(Seurat)
tmp <- CreateSeuratObject(counts = counts)
tmp <- tmp[-grep("^RPS", rownames(tmp)), ]
tmp <- tmp[-grep("^RPL", rownames(tmp)), ]
tmp <- NormalizeData(tmp)
tmp <- FindVariableFeatures(tmp)
if (!gene.use) {
gene.use <- VariableFeatures(tmp)
}
else {
gene.use <- gene.use[gene.use %in% rownames(tmp)]
}
tmp <- ScaleData(tmp, features = gene.use)
tmp <- RunPCA(tmp, features = gene.use)
tmp <- FindNeighbors(tmp, dims = 1:10)
tmp <- FindClusters(tmp, resolution = resolution)
tmp <- RunTSNE(tmp, dims = 1:10, check_duplicates = FALSE)
return(tmp)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.