plot.Fasta: Plotting and summary of Fasta objects

Description

Generic functions for plotting and printing the content of a Fasta object.

Usage

1
2
3
4
5
## S3 method for class 'Fasta'
plot(x, y = NULL, col = "tan4", border = "tan4", ...)

## S3 method for class 'Fasta'
summary(object, ...)

Arguments

x

A Fasta object, see below.

y

not used.

col

Color of bar interiors.

border

Color of bar borders.

...

Optional graphical arguments.

object

A Fasta object, see below.

Details

A Fasta object contains biological sequences in the FASTA format. It is a small (S3) extension to a data.frame. It is actually a data.frame containing at least two text columns named Header and Sequence. The Header column contains the headerlines for each sequence, and the Sequence columns the sequences themselves. A Fasta object is typically created by reading a FASTA formatted file into R by readFasta.

A Fasta object can be treated as a data.frame, which makes it quick and easy to search both Header and Sequence for specific regular expressions, sort or re-arrange the ordering of the sequences, extract subsets or add new data to an existing Fasta object.

The plot.Fasta function will display the content of the Fasta object as a histogram over the lengths of the sequences.

The summary.Fasta function will display a text giving the number of sequences and the alphabet, i.e. listing all unique symbols found in the file.

Author(s)

Lars Snipen and Kristian Hovde Liland.

See Also

readFasta, writeFasta.

Examples

1
# See the examples in the Help-file for readFasta/writeFasta

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.