[BioC] IRanges merging query
Kasper Daniel Hansen
kasperdanielhansen at gmail.com
Fri Nov 12 20:55:02 CET 2010
ir1, ir2 are your IRanges
do
reduce(c(ir1, ir2))
Kasper
On Fri, Nov 12, 2010 at 2:49 PM, Vishal Thapar <vishalthapar at gmail.com> wrote:
> Hi All,
>
> I have a question about how to merge / have a union of 2 RangeData objects
> Say I have a rangeData1
> head(rangeData1)
> RangedData with 6 rows and 0 value columns across 25 spaces
> space ranges |
> <character> <IRanges> |
> 1 chr1 [ 101, 283] |
> 2 chr1 [ 704, 710] |
> 3 chr1 [ 310, 450] |
> 4 chr2 [ 582, 635] |
> 5 chr3 [ 422, 548] |
> 6 chr4 [ 40, 128] |
>
> and another
>
> head(rangeData2)
> RangedData with 6 rows and 0 value columns across 25 spaces
> space ranges |
> <character> <IRanges> |
> 1 chr1 [ 90, 200] |
> 2 chr1 [ 600, 650] |
> 3 chr1 [ 306, 384] |
> 4 chr2 [ 650, 690] |
> 5 chr3 [ 315, 697] |
> 6 chr5 [ 140, 228] |
>
> Would it be possible to merge these two so that I get something like this:
> RangeData3
> RangedData with 7 rows and 0 value columns across 25 spaces
> space ranges |
> <character> <IRanges> |
> 1 chr1 [ 90, 283] |
> 2 chr1 [ 600, 710] |
> 3 chr1 [ 306, 450] |
> 4 chr2 [ 582, 690] |
> 5 chr3 [ 315, 697] |
> 6 chr4 [ 40, 128] |
> 7 chr5 [ 140, 228] |
>
>
> Thanks for the help!
>
> Sincerely,
>
> Vishal
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> 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