GetAssayData <- function(object, slot, ...) { UseMethod(generic = 'GetAssayData', object = object) } 函数实现在: R/seurat.R #' @param assay Specific assay to get data from or set data for; defaults to #' the \link[SeuratObject:DefaultAssay]{default assay} #' #' @rdname AssayDa...
data_for_SingleR <- GetAssayData(pbmc, slot="data") #数据库 Human <- xseurat2::human_celldex_BlueprintEncodeData #预测细胞类型1,使用method = "cluster"方法,聚在同一类的细胞都会注释成一种细胞类型 Anno1 <- SingleR(test = data_for_SingleR, ref = Human, labels = Human$label.main, method...
object@data GetAssayData(object = object)[1] object@raw.data GetAssayData(object = object, slot = "counts") object@scale.data GetAssayData(object = object, slot = "scale.data") object@cell.names colnames(x = object)[2] rownames(x = object@data)[3] rownames(x = object)[4] objec...
object@raw.data GetAssayData(object = object, slot = "counts") object@scale.data GetAssayData(object = object, slot = "scale.data") object@cell.names colnames(x = object)[2] rownames(x = object@data)[3] rownames(x = object)[4] object@var.genes VariableFeatures(object = object)[...
hto.dist.mtx <- as.matrix(dist(t(GetAssayData(object = pbmc.hashtag.subset, assay ="HTO"))) # Calculate tSNE embeddings with a distance matrix #pbmc.hashtag.subset <- RunTSNE(pbmc.hashtag.subset, distance.matrix = hto.dist.mtx, perplexity = 100) #...
Seurat3可以将多个不同assay的信息存储到同一个对象中,只要数据是多模式的(在同一组细胞上收集)即可。我们可以使用SetAssayData和GetAssayData函数将其他assay的信息添加到seurat对象中。 # We will define an ADT assay, and store raw counts for it
["RNA"]],slot="data")[1:5,1:5])#前五个基因和前五个细胞##②从Seurat对象中提取f<-as.matrix(GetAssayData(object=pbmc_small,slot="counts")[1:5,1:5])#提取NK细胞的表达矩阵,用于其他分析nk.raw.data<-as.matrix(GetAssayData(pbmc,slot="counts")[,WhichCells(pbmc,ident="NK")])#直接...
reference.assay ="RNA", query.assay ="ACTIVITY", reduction ="cca") 通过标签转移注释 scATAC-seq 细胞 识别锚点后,我们可以将 scRNA-seq 数据集中的注释传输到 scATAC-seq 细胞中。注释存储在seurat_annotations中,并作为refdata参数的输入。输出将包含一个矩阵,其中包含每个 ATAC-seq 细胞的预测和置信度分数...
assay <- assay %||% assay.old DefaultAssay(object = object) <- assay assay.data <- GetAssayData(object = object) features.old <- features if (k) { .NotYetUsed(arg = "k") features <- list() for (i in as.numeric(x = names(x = table(object@kmeans.obj[[1]]$cluster))) {...
pbmc.atac[["ACTIVITY"]] <- CreateAssayObject(counts = activity.matrix) # meta信息 meta <- read.table("../data/atac_v1_pbmc_10k_singlecell.csv", sep = ",", header = TRUE, row.names = 1, stringsAsFactors = FALSE) meta <- meta[colnames(pbmc.atac), ] ...