How to deal with two gene sets have exact same values from GSVA results?
I encountered a GSVA difficulty. Here is an example:
# Fake data
set.seed(1111)
p <- 10 ## number of genes
n <- 5 ## number of samples
nGS <- 2 ## number of gene sets
min.sz <- 3 ## minimum gene set size
max.sz <- 10 ## maximum gene set size
X <- matrix(rnorm(p*n), nrow=p, dimnames=list(1:p, 1:n))
gs <- as.listsamplemin.sz:max.sz, size=nGS, replace=TRUE)) ## sample gene set sizes
gs <- lapply(gs, function(n, p) sample(1:p, size=n, replace=FALSE), p) ## sample gene sets
gs
[[1]]
[1] 9 7 10
[[2]]
[1] 5 4 10 7 1 8
both sets have '10'. Change other rownames to letters
rownames(X)[1:9] <- LETTERS[1:9]
X
1 2 3 4 5
A -0.08658011 -0.97647981 1.48342630 2.61512874 -0.5412316
B 1.32252443 0.99083635 0.67760030 1.76150083 0.2955919
C 0.63970204 -1.53428157 -0.71862122 -0.78600959 2.2282912
D 1.17478657 -1.81700160 -0.54787228 -0.17635698 -1.5510840
E 0.11629031 0.35563308 1.52752066 0.09470582 -0.6791092
F -2.93084636 0.86390468 -0.03994143 0.12713485 -1.1362552
G 0.67750806 -0.08051261 0.38408728 0.51051787 -1.2004306
H 1.11777194 -0.96248032 2.23916461 -1.24821415 -1.7534293
I 1.38404752 0.11231096 1.75397430 0.96301181 0.5919149
10 1.28394086 -0.25765185 1.22050988 0.30795664 0.1591204
es.test <- gsva(X, gs, mx.diff=T, min.sz=1, max.sz=Inf,
kcdf="Gaussian", verbose=T, parallel.sz=1)
As you can see, the two geneSets enrichment scores from GSVA will be the same.
es.test
1 2 3 4 5
[1,] 0.5555556 -0.7777778 0.3333333 -0.3333333 0.7777778
[2,] 0.5555556 -0.7777778 0.3333333 -0.3333333 0.7777778
Is there any way to fix this in real data? Suppose two KEGG pathways can only map exactly same genes in my gene expr and produce the same values for the two KEGG pathways. What should I do?
Thanks in advance.
• 116 views
•
link
0 answers
No answers yet.
Log in to answer this question.
What's the problem? It's not clear what you're trying to do.