broadinstitute / ssGSEA2.0

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

can not run example gct file PI3K_pert_logP_n2x23936.gct #14

Closed jzsbioinfo closed 4 years ago

jzsbioinfo commented 4 years ago

Error in ssGSEA2(input.ds, gene.set.databases = gene.set.databases, sample.norm.type = sample.norm.type, :

Error importing GCT file using 'cmapR::parse.gctx()'. The GCT file doesn't seem to be in the correct format! Please see take a look at https://clue.io/connectopedia/gct_format for details about GCT format.

Error message thrown by 'cmapR::parse.gctx()':

I work on windows10, R version 3.6.2 and once I git-clone the ssGSEA2.0, I follow the instruction choose the example gct file and choose gmt file n the db folder. I have tried so many times, it doesn't work. Hope somebody can help me, thanks!

karstenkrug commented 4 years ago

It seem like a more general problem since I got several messages describing the same issue. However, I just ran the example and it worked fine on my local machine (Win 10, R 3.6.1). So we'll have to figure out what's causing the problem.

Let's start with two scenarios:

1) the GCT file is not in the correct format.

2) The cmapR package did not install correctly.

library("cmapR") gct <- parse.gctx("/path/to/PI3K_pert_logP_n2x23936.gct")

It would be great if you could check the points above and report back.

Thanks, K

jzsbioinfo commented 4 years ago

I think I find the solution. Thanks for your remind of "cmapR" package, I notice in cmapR, there is only cmapR::parse_gctx, but not cmapR::parse.gctx. So, to use the ssgsea-gui.R, you will need to replace all parse.gctx with parse_gctx and replace all write.gct with write_gct in ssgsea-gui.R and src/ssGSEA2.0.R. Then I can successfully run it.

karstenkrug commented 4 years ago

Sorry for my slow response here...

Thanks for looking into that! While the problem you encountered had been addressed by the cmapR folks, it seems like the cmapR package currently has some issues. I pushed a bugfix 20 days ago which does not require the cmapR package to be installed on your machine but uses the io.R script from the package instead.

I think this will be a temporary fix though and I will use the cmapR package again once it will become available through Bioconductor.