Hi, For cases where strand matters in your analysis, I would suggest moving away from RangedData (which knows nothing about biology) to GRanges.
gr <- as(rd, "GRanges") reduce(gr) Should get you somewhere close. Michael On Thu, Apr 1, 2010 at 9:53 AM, Kunbin Qu <[email protected]> wrote: > Hi, > > I have a RangedData object lib1RD like the following, space as the > chromosome name: 18S, chr1, chr2 etc. and it has two values: strand and > index. I'd like to cluster (by using "reduce") all the reads on the same > strand from each chromosome. Could you help me on how to extract the > reads for each chromosome with the same strand enforcement? > > Like reduce(ranges(lib1RD)$"18S"[strand == '-'] something like this? > > Thanks a lot. > > -Kunbin Qu > > > > > lib1RD > RangedData with 4982872 rows and 2 value columns across 28 spaces > space ranges | strand index > <character> <IRanges> | <factor> <integer> > 1 18S [ 537, 568] | - 5 > 2 18S [ 51, 73] | - 19 > 3 18S [ 47, 78] | - 52 > 4 18S [1548, 1568] | - 64 > 5 18S [1727, 1758] | + 111 > 6 18S [1164, 1195] | + 121 > 7 18S [1791, 1819] | - 123 > 8 18S [ 830, 853] | - 158 > 9 18S [1713, 1744] | - 165 > 10 18S [ 199, 228] | - 175 > ... > <4982862 more rows> > > > > ______________________________________________________________________ > The contents of this electronic message, including any attachments, are > intended only for the use of the individual or entity to which they are > addressed and may contain confidential information. If you are not the > intended recipient, you are hereby notified that any use, dissemination, > distribution, or copying of this message or any attachment is strictly > prohibited. If you have received this transmission in error, please send an > e-mail to [email protected] and delete this message, along with > any attachments, from your computer. > [[alternative HTML version deleted]] > > _______________________________________________ > Bioc-sig-sequencing mailing list > [email protected] > https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing > [[alternative HTML version deleted]] _______________________________________________ Bioc-sig-sequencing mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
