Comments (5)
Hey rythi4,
Would you mind sharing an example?
If you are using a single-cell object to run enrichIt()
, the function is pulling the raw counts from the "RNA" assay and calculates the enrichment score using a Poisson distribution in GSVA, and performs the ssGSEA normalization described by Barbie et al 2009. This normalization uses the absolute difference between a given gene set - so it is occurring on a gene.set-level.
So if the composition of the seurat object changed, in terms of the cell number, there might be a difference in the output values. But if it is the same Seurat object, it should result in the same values.
Nick
from escape.
Here is an example:
`
#Making GeneSetCollections:
set1 <- GeneSetCollection(GeneSet(genes[["X"]][["gene"]], setName = "x"), GeneSet(genes[["Y"]][["gene"]], setName = "y"), GeneSet(genes[["Z"]][["gene"]], setName = "z"), GeneSet(genes[["W"]][["gene"]], setName = "w"))
set2 <- GeneSetCollection(GeneSet(genes[["X"]][["gene"]], setName = "x"), GeneSet(genes[["Y"]][["gene"]], setName = "y"))
#Here I define the seurat_object: seurat_object <- XXX
DefaultAssay(seurat_object) <- "RNA"
seurat_object_1 <- UpdateSeuratObject(seurat_object)
ES.seurat_1 <- enrichIt(obj = seurat_object_1, gene.sets = set1, groups = 1000)
#Here I define the seurat_object: seurat_object <- XXX
DefaultAssay(seurat_object) <- "RNA"
seurat_object_1 <- UpdateSeuratObject(seurat_object)
ES.seurat_2 <- enrichIt(obj = seurat_object_1, gene.sets = set2, groups = 1000)
`
The two seurat_objects are defined by the exact same line of code.
When I look at ES.seurat_1 and ES.seurat_2 (I order the columns 'x' by highest value for easy comparison), I see that the highest value is not the same:
from escape.
Thank you so much for the reproducible example!!
I found the issue - it lies in the GSVA package itself
I think this might be an error in my reading of the original manuscript for ssGSEA. I will take a look, I might have to implement an intrinsic normalization so the enrichment scores are deterministic. I'll post here when I get something working.
Thanks for bringing this to my attention.
Nick
from escape.
Of course, that was no problem!
from escape.
The newest dev version (v1.3.5) now has a new parameter ssGSEA.norm which will scale the columns from 0 to 1. However, if you would like to subset the data at a later time, the default setting is now not to normalize the data.
enrichIt <- function(obj, gene.sets = NULL,
method = "ssGSEA",
groups = 1000,
cores = 2,
min.size = 5,
ssGSEA.norm = FALSE)
Thanks again for letting me know about this.
Nick
from escape.
Related Issues (20)
- Visualization of Enrichment HOT 1
- Improve computational time for EnrichIt(), performPCA(), and masterPCAplot HOT 1
- Median of getSignificance and multi_dittoPlot() don't match HOT 2
- masterPCAplot bug HOT 1
- Saving heatmap HOT 1
- enrichmentPlot did not finish HOT 3
- enrichIT values-negative scores HOT 3
- Differentially expressed genes in enrichment pathways HOT 3
- getSignificance very memory intensive when fit = ANOVA HOT 3
- about using a subset of groups in visualization HOT 8
- Batch effect correction HOT 2
- About ANOVA results viz HOT 3
- How to add significant differences between groups of variables in a figure HOT 1
- enrichIT fails due to " file names with spaces do not work properly on this platform" HOT 1
- Leading edge subset
- Installing an older version of escape HOT 2
- enrichIt results in various aspects in layered form. HOT 1
- Normalization in enrichIt using 'UCell' HOT 1
- Prepare for upcoming Seurat v5 release
- How to find Enriched pathways per seurat_cluster? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from escape.