irGSEA.hub | R Documentation |
Easy to calculate the hub gene of the geneset based on the correlation between the geneset's score and the expression or rank of gene included in the geneset
irGSEA.hub(
object = NULL,
assay = "RNA",
slot = "data",
method = NULL,
show.geneset = NULL,
ncores = 4,
type = "rank",
maxRank = 2000,
top = 5,
correlation.color = c("#0073c2", "white", "#efc000"),
method.color = NULL
)
object |
A Seurat after perform |
assay |
Name of assay to calculate the correction. Default RNA. |
slot |
Default data. |
method |
A character. |
show.geneset |
A character. |
ncores |
Default 4. |
type |
expression or rank. Default rank. Calculate the correlation between the geneset's score and the rank of gene included in the geneset while the type is rank. Calculate the correlation between the geneset's score and the expression of gene included in the geneset while the type is expression. |
maxRank |
Maximum number of genes to rank per cell; above this rank, a given gene is considered as not expressed. Default 2000. |
top |
The number of top-ranked positively correlated genes in each method is displayed in a heatmap. |
correlation.color |
A vector. |
method.color |
A vector. Default "ggsci::pal_png()(the number of methods)" when it is set to NULL. |
list includes hub_result and hub_plot
## Not run:
# load PBMC dataset by R package SeuratData
library(Seurat)
library(SeuratData)
# download 3k PBMCs from 10X Genomics
InstallData("pbmc3k")
data("pbmc3k.final")
pbmc3k.final <- SeuratObject::UpdateSeuratObject(pbmc3k.final)
# Seurat object
pbmc3k.final <- irGSEA.score(object = pbmc3k.final, assay = "RNA",
slot = "data", msigdb = T, species = "Homo sapiens",
category = "H", geneid = "symbol",
method = c("AUCell", "UCell", "singscore", "ssgsea"), kcdf = 'Gaussian')
hub.result <- irGSEA.hub(object = pbmc3k.final, assay = "RNA", slot = "data",
method = c("AUCell","UCell","singscore", "ssgsea"),
show.geneset = c("HALLMARK-INFLAMMATORY-RESPONSE", "HALLMARK-APOPTOSIS"),
ncores = 4, type = "rank", maxRank = 2000, top = 5,
correlation.color = c("#0073c2","white","#efc000"), method.color = NULL)
head(hub.result$hub_result)
hub.result$hub_plot$`HALLMARK-APOPTOSIS`
hub.result$hub_plot$`HALLMARK-INFLAMMATORY-RESPONSE`
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.