Saba
Saba

Reputation: 21

reading gctx file in R

I am trying to read a gctx file extracted from LINCS source for gene expression analysis. The codes for eading the file are provided at the link below. https://github.com/cmap/l1ktools. I am using the script provided and I have sourced the script. however when I tried the function parse.gctx it gives me following error:

ds <- parse.gctx("../L1000 Data/zspc_n40172x22268.gctx")

reading ../L1000 Data/zspc_n40172x22268.gctx
Error in h5checktypeOrOpenLoc(file, readonly = TRUE) : 
  Error in h5checktypeOrOpenLoc(). Cannot open file. File 'C:\L1000 Data\zspc_n40172x22268.gctx' does not exist.

How can I resolve this issue and read my gctx file?

Upvotes: 0

Views: 2858

Answers (1)

oana
oana

Reputation: 11

Since you're getting a 'file does not exist' error, I think the problem is because you have a space in the path to the file you're trying to read (specifically, in "L1000 Data"); if you remove the space in the path it should parse properly.

In other words, try renaming your "L1000 Data" folder so that instead of:

ds <- parse.gctx("../L1000 Data/zspc_n40172x22268.gctx")

you have something along the lines of:

ds <- parse.gctx("../L1000_Data/zspc_n40172x22268.gctx")

Upvotes: 1

Related Questions