Failed to get promoters using promoters() in R 4.0.3.
1
0
Entering edit mode
Arslan • 0
@b9531c68
Last seen 19 months ago
Pakistan

I am trying to get the promotors region using the following code but got an error.

query_ref <- ucscTableQuery(session, track="RefSeq Genes",table="refGene",
                        range=GRangesForUCSCGenome("mm9", "chr12"))

prom.refgene <- promoters(query_ref, upstream = 1000, downstream = 1000, use.names = FALSE)

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘promoters’ for signature ‘"UCSCTableQuery"’
promoter GenomicRanges rtracklayer GRanges • 1.3k views
ADD COMMENT
0
Entering edit mode
shepherl 4.1k
@lshep
Last seen 1 hour ago
United States

This probably should have been labelled with rtracklayer rather than GRanges. The ucscTableQuery function creates an ucscTableQuery instance not a GRanges object to be able to use promoters directly. I think you have to use one of other helper functions listed in ?UCSCTableQuery first to convert it. Something like tracks or getTable

ADD COMMENT
0
Entering edit mode

Thanks for the suggestion, I did it using track() function.

prom.refgene <- promoters(track(query_ref), upstream = 1000, downstream = 1000, use.names = FALSE)
ADD REPLY

Login before adding your answer.

Traffic: 845 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