Problem in using "rtracklayer' package
1
0
Entering edit mode
li lilingdu ▴ 450
@li-lilingdu-1884
Last seen 6.6 years ago
Hi, I used "rtracklayer' and ran into some problems in using browserSession() function. I traced back the code and found somthing might wrong in the "hguid" slot of a "ucscSession" object. Followin was the code I used. ======================================== library(rtracklayer) #browserSession("ucsc") ##error!!! Class<-"ucscSession" ClassDef <- getClass(Class, where = topenv(parent.frame())) value <- .Call("R_do_new_object", ClassDef, PACKAGE = "base") value at url <- "http://genome.ucsc.edu/cgi-bin/" value at views<-new.env() handle<-getCurlHandle() getURL("http://genome.ucsc.edu/cgi-bin/hgGateway", cookiefile = tempfile(),curl = handle) cart <- getURL("http://genome.ucsc.edu/cgi-bin/hgTracks", curl = handle) vlaue at hguid<-as.numeric(gsub(".*hguid=([^\n]*).*","\\1", cart)) #[1] NA #Warning message: #NAs introduced by coercion grep("hguid",cart) #integer(0) ======================================== As shown in the above result, "hguid" will be NA as will lead to the subsequent underling code of browserSession("ucsc") to be failed. How to fix this problem? Or this might related to 'cookie' or 'handle'? Thanks! ---- LiGang
• 999 views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-2759
Last seen 10.3 years ago
Just for the record, I responded to an email about this problem sent directly to me. However, I still have not learned what the original error actually was... it's true that the code below does not work, but that's because it's incorrect and not the code in any version of rtracklayer, so I'm a bit confused :) On Wed, Aug 6, 2008 at 7:50 PM, LiGang <luzifer.li@gmail.com> wrote: > Hi, > > I used "rtracklayer' and ran into some problems in using > browserSession() function. > > I traced back the code and found somthing might wrong in the "hguid" > slot of a "ucscSession" object. > > Followin was the code I used. > > ======================================== > library(rtracklayer) > > #browserSession("ucsc") > > ##error!!! > > > Class<-"ucscSession" > ClassDef <- getClass(Class, where = topenv(parent.frame())) > value <- .Call("R_do_new_object", ClassDef, PACKAGE = "base") > > > value@url <- "http://genome.ucsc.edu/cgi-bin/" > value@views<-new.env() > handle<-getCurlHandle() > > getURL("http://genome.ucsc.edu/cgi-bin/hgGateway", cookiefile = > tempfile(),curl = handle) > cart <- getURL("http://genome.ucsc.edu/cgi-bin/hgTracks", curl = handle) > > vlaue@hguid<-as.numeric(gsub(".*hguid=([^\n]*).*","\\1", cart)) > > #[1] NA > #Warning message: > #NAs introduced by coercion > > > grep("hguid",cart) > > #integer(0) > ======================================== > > As shown in the above result, "hguid" will be NA as will lead to the > subsequent underling code of browserSession("ucsc") to be failed. > > How to fix this problem? Or this might related to 'cookie' or 'handle'? > > Thanks! > > ---- > LiGang > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 406 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6