compareVarFeaturesAndRanks | R Documentation |
This function compares variable features (genes) between two Seurat objects, reporting the number of genes in each, the percentage of common genes, the percentage of unique genes in each object, and the similarity in the ranking of overlapping genes using Spearman's rank correlation coefficient. Optionally, it can also generate a scatterplot of the ranks of common genes using ggpubr's ggscatter. The function returns the common genes and the Spearman's rank correlation coefficient.
compareVarFeaturesAndRanks(
obj1 = NULL,
obj2 = NULL,
cor.plot = TRUE,
save.plot = TRUE,
plot_venn = TRUE,
suffix = NULL,
...
)
obj1 |
The first Seurat object for comparison. Default: NULL. |
obj2 |
The second Seurat object for comparison. Default: NULL. |
cor.plot |
An optional boolean indicating whether to generate a scatterplot of the ranks
of common genes. Default: |
save.plot |
save.plot |
plot_venn |
plot_venn |
suffix |
suffix |
A list containing the common genes and Spearman's rank correlation coefficient. If cor.plot is TRUE, a scatterplot is also generated.
# Assuming obj1 and obj2 are Seurat objects
result <- compareVarFeaturesAndRanks(obj1, obj2, cor.plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.