[BioC] IRanges problem: findOverlaps
Nicolas Delhomme
delhomme at embl.de
Tue Jul 10 18:44:34 CEST 2012
Hi all,
I'm not sure about intervals, but genomeIntervals is chromosome-aware (http://bioconductor.org/packages/release/bioc/html/genomeIntervals.html). The syntax is as described by Alex, since genomeIntervals extends intervals.
Whether you use genomeIntervals or IRanges is just a matter of taste, really.
Cheer,
Nico
---------------------------------------------------------------
Nicolas Delhomme
Genome Biology Computational Support
European Molecular Biology Laboratory
Tel: +49 6221 387 8310
Email: nicolas.delhomme at embl.de
Meyerhofstrasse 1 - Postfach 10.2209
69102 Heidelberg, Germany
---------------------------------------------------------------
On Jul 10, 2012, at 6:34 PM, Ivan Gregoretti wrote:
> Hi Alex,
>
> I am not sure interval_overlap() is better option than findOverlaps().
>
> Is interval_overlap() aware that intervals may lie in different chromosomes?
>
> In other words, every peak has three coordinates: chromosome, start
> and end. The findOverlaps() function is aware of that.
>
> Thank you,
>
> Ivan
>
>
> Ivan Gregoretti, PhD
>
>
> On Tue, Jul 10, 2012 at 12:05 PM, alessandro brozzi
> <alessandro.brozzi at gmail.com> wrote:
>> hi Nicolas,
>>
>> I don't know very well Iranges but to find overlapping intervals the
>> package "intervals"
>>
>> http://cran.fhcrc.org/web/packages/intervals/index.html
>>
>> is very straightforward.
>>
>> Here an example:
>>
>> peaks = matrix(
>> c(
>> 2, 8,
>> 8, 9,
>> 6, 9,
>> 11, 12,
>> 3, 3
>> ),
>> ncol = 2, byrow = TRUE
>> )
>>
>>> peaks
>> [,1] [,2]
>> [1,] 2 8
>> [2,] 8 9
>> [3,] 6 9
>> [4,] 11 12
>> [5,] 3 3
>>>
>>
>> track = matrix(
>> c(
>> 2, 8,
>> 3, 4,
>> 5, 10
>> ),
>> ncol = 2, byrow = TRUE
>> )
>>
>> track
>> [,1] [,2]
>> [1,] 2 8
>> [2,] 3 4
>> [3,] 5 10
>>
>> interval_overlap ( Intervals(peaks), Intervals(track))
>>
>> [[1]]
>> [1] 1 2 3
>>
>> [[2]]
>> [1] 1 3
>>
>> [[3]]
>> [1] 1 3
>>
>> [[4]]
>> integer(0)
>>
>> [[5]]
>> [1] 1 2
>>
>> the result is a list: for each peak you have the indexes of the
>> corresponding overlapping items of the track matrix. Setting some options
>> you can fine tune your research.
>>
>> HTH,
>> Alex
>>
>>
>> On Tue, Jul 10, 2012 at 5:40 PM, Nicolas DESCOSTES <
>> descostes at ciml.univ-mrs.fr> wrote:
>>
>>> Dear members,
>>>
>>> I have a set of chip-Seq peaks which I want to find the overlap with a
>>> bench of annotations downloaded from ucsc.
>>>
>>> When I am doing the overlap between my peaks and annotations list, I am
>>> finding 5635 positive matches. When adding "type = "start"", I have no
>>> results returned. However, when I am visualizing the 5635 intervals, it
>>> overlaps many start site of my genes annotations.
>>>
>>> I tried to update IRanges but I am still getting no results.
>>>
>>> Any idea?
>>>
>>> Thanks.
>>>
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> Bioconductor mailing list
>>> Bioconductor at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>> Search the archives:
>>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>>
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor
mailing list