On Sun, May 30, 2010 at 6:15 PM, Dario Strbenac <D.Strbenac@garvan.org.au>wrote:

> Hello,
>
> I'd like to keep my RangedData object in the same order as I constructed
> it. I can't find any options in the documentation about this. Anyone know
> how to do this ?
>
> e.g.
>
> > peaksRangedData <- RangedData(space = c("chr1", "chr2", "chr3", "chr20"),
> ranges = IRanges(start = c(1000, 2000, 3000, 4000), end =  c(5000, 6000,
> 7000, 8000)))
> > peaksRangedData
> RangedData with 4 rows and 0 value columns across 4 spaces
>        space       ranges |
>  <character>    <IRanges> |
> 1        chr1 [1000, 5000] |
> 2        chr2 [2000, 6000] |
> 3       chr20 [4000, 8000] |
> 4        chr3 [3000, 7000] |
>
> i. e. The object was automatically sorted based on the ASCII ordering of
> 'space'.
>
> Can this be done ?
>
>
No. But if you want it in order of the chromosomes, you can pass a factor to
the 'space' argument, with the levels in the correct order. e.g.
RangedData(space = factor(chr, paste("chr", 1:22, sep = "")), ...)




> --------------------------------------
> Dario Strbenac
> Research Assistant
> Cancer Epigenetics
> Garvan Institute of Medical Research
> Darlinghurst NSW 2010
> Australia
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>

	[[alternative HTML version deleted]]

