[Bioc-sig-seq] read length distribution from ShortReadQ or AlignedRead
Steve Lianoglou
mailinglist.honeypot at gmail.com
Sun Aug 22 19:59:37 CEST 2010
Sorry .. didn't CC to bioc (like I told you to do :-) ...
On Sun, Aug 22, 2010 at 1:58 PM, Steve Lianoglou
<mailinglist.honeypot at gmail.com> wrote:
> Hi Joseph,
>
> Don't forget to hit "Reply All" when responding to BioC emails, so
> that the help stays on the list ..
>
> On Sun, Aug 22, 2010 at 1:46 PM, joseph <jdsandjd at yahoo.com> wrote:
>> 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
More information about the Bioc-sig-sequencing
mailing list