[Bioc-sig-seq] read length distribution from ShortReadQ or AlignedRead

Steve Lianoglou mailinglist.honeypot at gmail.com
Sun Aug 22 19:33:37 CEST 2010


Hi Joseph,

On Sun, Aug 22, 2010 at 1:27 PM, joseph <jdsandjd at yahoo.com> wrote:
> can somebody show me how to determine the read length distribution from a
> ShortReadQ or AlignedRead objects and plot them as histograms?

You can get the length of all the reads in your fastq/shortread/etc.
object using the `width` function.

Imagine `reads` is your ShortReadQ object, to plot the distribution of
read lengths:

R> hist(width(reads))

Hope that helps,
-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



More information about the Bioc-sig-sequencing mailing list