cgdsr
cgdsr copied to clipboard
Error running the test and getProfileData functions following the vignette
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
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 I had no problem running either function. Have you updated to the latest code?
I did. Just forced a new installation from GitHub. I'm still getting the same error.
@asmagen I was using the cgdsr package from CRAN: https://cran.r-project.org/web/packages/cgdsr/index.html. Have you tried that?
It works with this version from Cran. So there's a problem with the GitHub version. Thanks
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 got it. thanks.
@asmagen these samples are missing expression data in the gbm_tcga_mrna profile.
Got it, thanks.
I am reopening this since the originally reported issue is not solved in the code here.
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 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.