[BioC] IRanges problem: findOverlaps

Ivan Gregoretti ivangreg at gmail.com
Tue Jul 10 18:34:39 CEST 2012


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



More information about the Bioconductor mailing list