cgdsr icon indicating copy to clipboard operation
cgdsr copied to clipboard

Error running the test and getProfileData functions following the vignette

Open asmagen opened this issue 6 years ago • 12 comments

Hello,

I get the following error with the test function:

> test(mycgds)
getCancerStudies...  OK
getCaseLists (1/2) ...  OK
getCaseLists (2/2) ...  OK
getGeneticProfiles (1/2) ...  OK
getGeneticProfiles (2/2) ...  OK
getClinicalData (1/1) ...  OK
Error in read.table(url, skip = 0, header = TRUE, as.is = TRUE, sep = "\t",  : 
  more columns than column names

asmagen avatar Jul 04 '18 11:07 asmagen

I also get the same error when running this example from the vignette:

> getProfileData(mycgds, c("MDM2","MDM4"), "gbm_tcga_mrna", "gbm_tcga_all")[c(1:5),]
Error in read.table(url, skip = 0, header = TRUE, as.is = TRUE, sep = "\t",  : 
  more columns than column names

asmagen avatar Jul 04 '18 12:07 asmagen

@asmagen I had no problem running either function. Have you updated to the latest code?

jjgao avatar Jul 05 '18 14:07 jjgao

I did. Just forced a new installation from GitHub. I'm still getting the same error.

asmagen avatar Jul 05 '18 14:07 asmagen

@asmagen I was using the cgdsr package from CRAN: https://cran.r-project.org/web/packages/cgdsr/index.html. Have you tried that?

jjgao avatar Jul 05 '18 14:07 jjgao

It works with this version from Cran. So there's a problem with the GitHub version. Thanks

asmagen avatar Jul 05 '18 14:07 asmagen

What does NaN mean when I run getProfileData(mycgds, c("MDM2","MDM4"), "gbm_tcga_mrna", "gbm_tcga_all")[c(1:5),]? Are the values missing originally in TCGA or is it a bug / problem of the download?

asmagen avatar Jul 05 '18 14:07 asmagen

@asmagen got it. thanks.

jjgao avatar Jul 05 '18 14:07 jjgao

@asmagen these samples are missing expression data in the gbm_tcga_mrna profile.

jjgao avatar Jul 05 '18 14:07 jjgao

Got it, thanks.

asmagen avatar Jul 05 '18 14:07 asmagen

I am reopening this since the originally reported issue is not solved in the code here.

jjgao avatar Jul 06 '18 01:07 jjgao

I have tried both GitHub (cgdsr_1.2.8) and CRAN (cgdsr_1.2.10 versions and I got the same error here reported when running the example from vignettes.

> getProfileData(mycgds, c("MDM2","MDM4"), "gbm_tcga_mrna", "gbm_tcga_all")[c(1:5),]
Error in read.table(url, skip = 0, header = TRUE, as.is = TRUE, sep = "\t",  : 
  more columns than column names

Could you tell me what version did you get run this function with?

avicens avatar Apr 29 '19 09:04 avicens

@avicens I committed a fix and will submit to CRAN, but more importantly I added some information on debugging cgdsr in the vignette. The line below reads the table returned from the cBioPortal API:

df = read.table(url, skip=0, header=TRUE, as.is=TRUE, sep="\t",quote='')

Much of the work of cgdsr is in the construction of the "url" parameter. For any future user encountering this issue. Please run

setVerbose(mycgds, TRUE)

This will output the constructed URL. For example, the URL below is a constructed URL:

http://www.cbioportal.org/webservice.do?cmd=getCancerStudies&

and it would be read in this way:

url = "http://www.cbioportal.org/webservice.do?cmd=getCancerStudies&"
df = read.table(url, skip=0, header=TRUE, as.is=TRUE, sep="\t",quote='')

If you encounter a URL that does not work, please include it in any report here.

cannin avatar Apr 30 '19 19:04 cannin