This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Converting UCSCData Class to GRanges Class

Dear all,

I have a UCSCData class object and would like to transform it into a Granges object. Is there any easy way of doing that (apart from doing that manually using the GRanges function)?

More specifically, I have a list of ±50K promoter elements from UCSC:

summary(prom)
  Length    Class     Mode 
   50066 UCSCData       S4

Many thanks,
Dimitris

genome r granges

1 answer

From a little playing with a UCSCData object I got via rtracklayer, it sure seems that just calling

GRanges(prom)

should give you a set of the GRanges for every promoter. Did that not work for you?

Log in to answer this question.