ShortRead (version 1.30.0)

tables: Summarize XStringSet read frequencies

Description

This generic summarizes the number of times each sequence occurs in an XStringSet instance.

Usage

tables(x, n=50, ...)

Arguments

x
An object for which a tables method is defined.
n
An integer(1) value determining how many named sequences will be present in the top portion of the return value.
...
Additional arguments available to methods

Value

A list of length two.
top
A named integer vector. Names correspond to sequences. Values are the number of times the corresponding sequence occurs in the XStringSet. The vector is sorted in decreasing order; methods typically include a parameter specifying the number of sequences to return.
distribution
a data.frame with two columns. nOccurrences is the number of times any particular sequence is represented in the set (1, 2, ...). nReads is the number of reads with the corresponding occurrence.

Details

Methods of this generic summarize the frequency with which each read occurs, There are two components to the summary. The reads are reported from most common to least common; typically a method parameter controls how many reads to report. Methods also return a pair of vectors describing how many reads were represented 1, 2, ... times.

The following methods are defined, in addition to methods described in class-specific documentation:

tables
signature(x= "XStringSet", n = 50): Apply tables to the XStringSet x.

Examples

Run this code
showMethods("tables")
sp <- SolexaPath(system.file("extdata", package="ShortRead"))
aln <- readAligned(sp)
tables(sread(aln), n=6)
lattice::xyplot(log10(nReads)~log10(nOccurrences),
       tables(sread(aln))$distribution)

Run the code above in your browser using DataLab