It seems to me this is a feature. If you read the RangedData man page (at least in R 2.11, which I checked) the underlying structures are split by space. Some reorderings are permitted, but the one that you attempted leads to a situation in which rows from a given space are not contiguous in the resulting row ordering. This is not permitted.
On Tue, Mar 16, 2010 at 11:06 AM, Zhu, Julie <[email protected]> wrote: > Hi, > > I am trying to sort a RangedData but encountered the following error. Here > is a toy example to reproduce the error. Did I do something wrong? Thank you > very much for your help! > > Best regards, > > Julie > > myPeak1 = RangedData(IRanges(start=c(967654, 2010897, 2496704, 3075869, > 3123260 ,3857501,201089), end= c(967754, 2010997, 2496804, 3075969, 3123360 > ,3857601,201089),names=c("Site1", "Site2", "Site3", "Site4", "Site5", > "Site6", "site7")), space=c("1", "2", "3", "4", "5", "6","2")) > > > myPeak1[order(rownames(myPeak1)),] > > Error in myPeak1[order(rownames(myPeak1)), ] : > cannot combine 'i' row values from different spaces > >> sessionInfo() > R version 2.10.0 (2009-10-26) > i386-apple-darwin8.11.1 > > locale: > [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] grid stats graphics grDevices utils datasets methods > base > > other attached packages: > [1] Ringo_1.10.0 Matrix_0.999375-31 > lattice_0.17-26 > [4] limma_2.19.2 RColorBrewer_1.0-2 > ChIPpeakAnno_1.2.4 > [7] org.Hs.eg.db_2.3.6 GO.db_2.3.5 > RSQLite_0.7-1 > [10] DBI_0.2-4 AnnotationDbi_1.8.1 > BSgenome.Ecoli.NCBI.20080805_1.3.16 > [13] BSgenome_1.14.2 Biostrings_2.14.8 > IRanges_1.4.9 > [16] multtest_2.1.2 Biobase_2.5.5 > biomaRt_2.1.0 > > loaded via a namespace (and not attached): > [1] annotate_1.23.1 genefilter_1.25.7 MASS_7.3-3 RCurl_0.98-1 > splines_2.10.0 survival_2.35-7 > [7] tools_2.10.0 XML_2.3-0 xtable_1.5-6 > > > > ******************************************* > Lihua Julie Zhu, Ph.D > Research Associate Professor > Program Gene Function and Expression > University of Massachusetts Medical School > 364 Plantation Street, Room 613 > Worcester, MA 01605 > 508-856-5256 > http://www.umassmed.edu/pgfe/faculty/zhu.cfm > > _______________________________________________ > Bioc-sig-sequencing mailing list > [email protected] > https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing > _______________________________________________ Bioc-sig-sequencing mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
