GenomicFeatures promotersByOverlap: Identify promoters by overlap?
1
0
Entering edit mode
vanbelj ▴ 20
@vanbelj-21216
Last seen 6 weeks ago
United States

I have a GRanges that represents ~150 genomic regions of interest. I want to use the location of those regions to identify any overlap with gene CDS or Promoters within the yeast genome.

There is a convenient function within the GenomicFeatures package for doing this for CDS.

cdsByOverlaps(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene, MyRegionsGRanges, maxgap = -1L, minoverlap = 0L, type = c("any", "start", "end"), columns = c("txid", "tx_name"))

However, there is no equivalent function for the comparison against Promoters by overlap. There is however, a promoter function that can be run on the TxDb to generate a GRanges of Promoters for the yeast genome.

promoters(transcripts(txdb, columns=columns, use.names=TRUE), upstream=100, downstream=50)

I could then compare my two GRanges (Promoters vs. RegionsofInterest) to find overlap and extract the gene information. I just don't know how to do that within the packages. Maybe I should just shift to base R for this comparison? Any ideas?

GenomicFeatures GenomicRanges • 1.0k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 16 hours ago
United States

The cdsByOverlaps function is really just a convenience function that uses subsetByOverlaps to do what you want. You can do the same thing directly using

prom <- promoters(transcripts(txdb, columns=columns, use.names=TRUE), upstream=100, downstream=50)
olaps <- subsetByOverlaps(prom, MyRegionsGRanges)

Alternatively you could use findOverlaps, which will give you a Hits object that indicates which of the two GRanges are overlapping.

ADD COMMENT
0
Entering edit mode

The above should be reversed if you want the regions defined in MyRegionsGRanges that overlap any promoters.

ADD REPLY
0
Entering edit mode

Yes, works with the change you mentioned: olaps <- subsetByOverlaps(MyRegionsGRanges, prom)

Thanks!

ADD REPLY

Login before adding your answer.

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