Description Usage Arguments Value Author(s) Examples
Takes in a dataframe containing a scppin and calls Seurat functions on it to get it in the proper format to use scPPIN functions with it.
1 | Preprocess(Data)
|
Data |
A dataframe containing scppin data |
returns a Seurat object with Seurat functions called on it
Matt Heffernan, University of Illinois at Chicago
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
Preprocess(uterusData)
## The function is currently defined as
function (Data)
{
SData <- CreateSeuratObject(counts = Data, min.cells = 3,
min.features = 300, names.delim = "\.")
SData[["percent.mito"]] <- PercentageFeatureSet(object = SData,
pattern = "^MT-")
SData <- subset(SData, subset = nFeature_RNA > 300 & nFeature_RNA <
2500 & percent.mito < 20)
SData <- NormalizeData(object = SData, normalization.method = "LogNormalize",
scale.factor = 10000)
SData <- ScaleData(SData, vars.to.regress = c("nCount_RNA",
"percent.mito"))
SData <- FindVariableFeatures(SData, selection.method = "disp")
length(SData@assays$RNA@var.features)
var.gene <- SData@assays$RNA@var.features
var.gene <- var.gene[!grepl(pattern = "*RPS", x = var.gene)]
var.gene <- var.gene[!grepl(pattern = "*RPL", x = var.gene)]
var.gene <- var.gene[!grepl(pattern = "*MT", x = var.gene)]
length(var.gene)
SData <- RunPCA(object = SData, features = var.gene, npcs = 50,
do.print = TRUE, pcs.print = 1:5, nfeatures.print = 5)
SData <- FindNeighbors(object = SData, reduction = "pca",
dims = 1:15)
SData <- FindClusters(object = SData, reduction = "pca",
dims = 1:15, resolution = c(0.6))
return(SData)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.