Hi Kasper

Thanks for a quick reply. I tried the following and I believe I would need
a max.gapwidth parameter.

ir <- IRanges(c(10,10,11,9,10,11), width=c(190,190,190,190,180,180))

reduce(ir,min.gapwidth=1)
IRanges of length 1
    start end width
[1]     9 200   192


Although not sure why this one merges everything

 reduce(ir,min.gapwidth=11)
IRanges of length 1
    start end width
[1]     9 200   192

-Abhi





On Tue, Apr 24, 2012 at 2:54 PM, Kasper Daniel Hansen <
kasperdanielhansen@gmail.com> wrote:

> Use the min.gapwidth argument to reduce, as explained in the help page.
>
> Kasper
>
> On Tue, Apr 24, 2012 at 2:47 PM, Abhishek Pratap <apratap@lbl.gov> wrote:
> > Hi Guys
> >
> > I am trying to run a reduce operation on my genomic interval data.
> >
> > Sample Data and expected output pasted here :
> http://pastebin.com/cccZby2t
> >
> >
> > Rows 1-5 from input have merged since the tiling distance between them
> is <
> > 2 bp. Ideally I would like to define that distance.
> > Rows 5-6 are merged separately as their distance is more than 2 bp from
> the
> > above rows.
> >
> > I hope tiling is the right word above. In essence what I want to do is
> > define a max merging width and merge all the intervals which are within
> > this user defined threshold . The condition of tiling distance should be
> > satisfied by both start and end.
> >
> > Hope this is clear.
> >
> > Thanks!
> > -Abhi
> >
> >        [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor@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]]

