Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gsva error #133

Closed
tcmlab opened this issue Jan 5, 2024 · 4 comments
Closed

gsva error #133

tcmlab opened this issue Jan 5, 2024 · 4 comments

Comments

@tcmlab
Copy link

tcmlab commented Jan 5, 2024

library(limma)

p <- 10 ## number of genes
n <- 30 ## number of samples
nGrp1 <- 15 ## number of samples in group 1
nGrp2 <- n - nGrp1 ## number of samples in group 2

consider three disjoint gene sets

geneSets <- list(set1=paste("g", 1:3, sep=""),
set2=paste("g", 4:6, sep=""),
set3=paste("g", 7:10, sep=""))

sample data from a normal distribution with mean 0 and st.dev. 1

y <- matrix(rnorm(n*p), nrow=p, ncol=n,
dimnames=list(paste("g", 1:p, sep="") , paste("s", 1:n, sep="")))

genes in set1 are expressed at higher levels in the last 'nGrp1+1' to 'n' samples

y[geneSets$set1, (nGrp1+1):n] <- y[geneSets$set1, (nGrp1+1):n] + 2

build design matrix

design <- cbind(sampleGroup1=1, sampleGroup2vs1=c(rep(0, nGrp1), rep(1, nGrp2)))

fit linear model

fit <- lmFit(y, design)

estimate moderated t-statistics

fit <- eBayes(fit)

genes in set1 are differentially expressed

topTable(fit, coef="sampleGroup2vs1")

estimate GSVA enrichment scores for the three sets

gsva_es <- gsva(y, geneSets, mx.diff=1)
Error: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE.

@tcmlab
Copy link
Author

tcmlab commented Jan 5, 2024

R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] grid stats graphics grDevices utils datasets methods base

other attached packages:
[1] limma_3.54.2 IOBR_0.99.8 survminer_0.4.9 patchwork_1.1.3 clusterProfiler_4.6.2
[6] tidyHeatmap_1.8.1 ComplexHeatmap_2.14.0 survival_3.4-0 ggpubr_0.6.0 ggplot2_3.4.4
[11] tibble_3.2.1 GSVA_1.46.0 nichenetr_2.0.4 dplyr_1.1.4 biomaRt_2.54.1

@rcastelo
Copy link
Owner

rcastelo commented Jan 5, 2024

hi, this error is caused by a recent update in package dependency upstream from GSVA. To get this fixed, you should update to the current release of R (4.3.x) and Bioconductor (3.18 and GSVA 1.50.x). Let me know if you are unsure on how to do this.

@sunPi
Copy link

sunPi commented Feb 28, 2024

@rcastelo What about a solution for Linux? There is no greater release of R than 4.2.x afaik and therefore the GSVA does not work due to the same error reported in this issue.

@rcastelo
Copy link
Owner

Hi @sunPi Linux is the main platform where R, and particularly GSVA, are developed. You can find the latest release of R 4.3.x for Linux, as well as Windows and macOS, in https://cran.r-project.org. If you want or need to install R in Linux in a different way, i.e., through some package manager system, then you should consult the maintainers of that package manager system about how to update R to 4.3.x, but certainly there is R 4.3.x for Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants