Perfect. Thanks.
________________________________ From: Steve Lianoglou <[email protected]> Cc: [email protected] Sent: Sun, August 22, 2010 10:59:37 AM Subject: Re: [Bioc-sig-seq] read length distribution from ShortReadQ or AlignedRead Sorry .. didn't CC to bioc (like I told you to do :-) ... On Sun, Aug 22, 2010 at 1:58 PM, Steve Lianoglou <[email protected]> wrote: > Hi Joseph, > > Don't forget to hit "Reply All" when responding to BioC emails, so > that the help stays on the list .. > >> Thanks Steve. >> how do I get a table of the actual values? > > The `width` function returns a vector of the same length as your > ShortRead object (which is the number of reads you have there), so > assuming your ShortRead object is still called `reads`: > > R> read.length <- width(reads) > > That `read.length` vector has the length of all the reads. You can > then manipulate it as you would any other vector in R. It sounds like > you might want the `table` or `tabulate` function, or something > similar. > > Also note that the `hist` function returns an "invisible" object you > can work with. If you do something like this: > > R> h <- hist(width(reads)) > > `h` might look something like this: > > R> h > $breaks > [1] 30 40 > > $counts > [1] 256 > > $intensities > [1] 0.1 > > $density > [1] 0.1 > > $mids > [1] 35 > > $xname > [1] "width(rfq)" > > $equidist > [1] TRUE > > attr(,"class") > [1] "histogram" > > -steve > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact > -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact [[alternative HTML version deleted]] _______________________________________________ Bioc-sig-sequencing mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
