[BioC] Problem in using "rtracklayer' package

LiGang luzifer.li at gmail.com
Thu Aug 7 04:50:57 CEST 2008


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



More information about the Bioconductor mailing list