[BioC] IRanges::rbind with names stopped working
Robert Castelo
robert.castelo at upf.edu
Tue Feb 2 12:04:38 CET 2010
dear list, and particularly the IRanges developers,
i'm porting from BioC 2.4 to BioC 2.6 a script which is doing rbind on
two RangedData objects and have noticed that this operation (rbind) now
doesn't work when the ranges have names.
i'm reproducing below the situation with BioC 2.4, 2.5 and 2.6 where for
the latter two versions of BioC this functionality fails.
*** BioC 2.4
library(IRanges, warn.conflicts=FALSE)
rd1 <- RangedData(IRanges(start=1:3,
end=4:6))
rd2 <- RangedData(IRanges(start=1:3,
end=4:6))
rbind(rd1, rd2)
RangedData: 6 ranges by 0 columns
columns(0):
sequences(0):
rd1 <- RangedData(IRanges(start=1:3,
end=4:6,
name=letters[1:3]))
rd2 <- RangedData(IRanges(start=1:3,
end=4:6,
name=letters[4:6]))
rbind(rd1, rd2)
RangedData: 6 ranges by 0 columns
columns(0):
sequences(0):
sessionInfo()
R version 2.9.1 (2009-06-26)
x86_64-unknown-linux-gnu
locale:
C
attached base packages:
[1] stats graphics grDevices utils datasets methods
base
other attached packages:
[1] IRanges_1.2.3
** BioC 2.5
library(IRanges, warn.conflicts=FALSE)
rd1 <- RangedData(IRanges(start=1:3,
end=4:6))
rd2 <- RangedData(IRanges(start=1:3,
end=4:6))
rbind(rd1, rd2)
RangedData with 6 rows and 0 value columns across 1 space
space ranges |
<character> <IRanges> |
1 1 [1, 4] |
2 1 [2, 5] |
3 1 [3, 6] |
4 1 [1, 4] |
5 1 [2, 5] |
6 1 [3, 6] |
rd1 <- RangedData(IRanges(start=1:3,
end=4:6,
name=letters[1:3]))
rd2 <- RangedData(IRanges(start=1:3,
end=4:6,
name=letters[4:6]))
rbind(rd1, rd2)
Error in validObject(.Object) :
invalid class "RangedData" object: the names of the ranges must equal
the rownames
sessionInfo()
R version 2.10.0 (2009-10-26)
x86_64-unknown-linux-gnu
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods
base
other attached packages:
[1] IRanges_1.4.10
** BioC 2.6
library(IRanges, warn.conflicts=FALSE)
rd1 <- RangedData(IRanges(start=1:3,
end=4:6))
rd2 <- RangedData(IRanges(start=1:3,
end=4:6))
rbind(rd1, rd2)
RangedData with 6 rows and 0 value columns across 1 space
space ranges |
<character> <IRanges> |
1 1 [1, 4] |
2 1 [2, 5] |
3 1 [3, 6] |
4 1 [1, 4] |
5 1 [2, 5] |
6 1 [3, 6] |
rd1 <- RangedData(IRanges(start=1:3,
end=4:6,
name=letters[1:3]))
rd2 <- RangedData(IRanges(start=1:3,
end=4:6,
name=letters[4:6]))
rbind(rd1, rd2)
Error in validObject(.Object) :
invalid class "RangedData" object: the names of the ranges must equal
the rownames
sessionInfo()
R version 2.11.0 Under development (unstable) (2009-10-06 r49948)
x86_64-unknown-linux-gnu
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods
base
other attached packages:
[1] IRanges_1.5.37
thanks!
robert.
More information about the Bioconductor
mailing list