broadinstitute / ssGSEA2.0

Single sample Gene Set Enrichment analysis (ssGSEA) and PTM Enrichment Analysis (PTM-SEA)
Other
230 stars 79 forks source link

ssgsea-cli.R: 'names' attribute must be same length as the vector #1

Closed u909090 closed 6 years ago

u909090 commented 6 years ago

Hi,

I cannot manage to make the script run.

My command line:

RScript ssGSEA2.0-master/ssgsea-cli.R \
-i my_gene_exp.gct \
-d my_database.gmt \
-o my_results

I get

Error in names(x) <- value :
  'names' attribute [28] must be the same length as the vector [1]
Calls: ssGSEA2 -> colnames<-
Execution halted

My session info:

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.4

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] C/UTF-8/C/C/C/C

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

loaded via a namespace (and not attached):
[1] compiler_3.4.4
karstenkrug commented 6 years ago

Sorry for the slow response. Could you please forward the gct and gmt files. I'll have to look further into this.

zjzace commented 6 years ago

Hi,

I have come across the same issue.

my command is: Rscript ssgsea-cli.R -i test2.gct -o res -d immune_marker.gmt -n rank -c z.score and I got the same error with @u909090.

Here is my file used for ssGSEA. DATA.zip

karstenkrug commented 6 years ago

Hi zjzace,

Thanks for attaching the files. The error occurs when the gmt file contains a single gene set. As soon as I duplicated the gene set in your gmt file and assigned a unique name, all works fine.

I will fix this in the next days. For the time being please use gmt files with >1 gene set.

Best, K

karstenkrug commented 6 years ago

Fixed.