[BioC] overlap regions between two GRanges (or GRangesList)

Hervé Pagès hpages at fhcrc.org
Sat Mar 15 00:56:12 CET 2014


On 03/13/2014 09:40 PM, Zhao, Shanrong [JRDUS] wrote:
> Dear Dr. Pages,
>
> I am exploring Bioconductor packages to analyze DNA methylation data.
> One question I don’t know how to solve it. I have two GRanges (OR
> GRangesList),  Now I want to identify the common (*overlapping)
> regions*, not just overlapping or not--- *gc <- overlapRegions(ga,gb)*
>
> The other question I have: I am interested in all *cytosines* in
> promoters regions, I have already had promoter in GRange object. What is
> the most efficient way to identify the total number of Cs?   I plan to
> extract all DNA sequences corresponding to promoters, and then call
> letterFrequency (by set letters=”C”).

Yes:

   letterFrequency(promoters, "C", collapse=TRUE)

or:

   alphabetFrequency(promoters, baseOnly=TRUE, collapse=TRUE)[["C"]]

Both should be fast.

H.

>
> Best regards,
>
> Shanrong
>

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioconductor mailing list