Learn R Programming

micropan (version 1.0)

plot.Panmat: Plotting and printing Panmat objects

Description

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

Usage

"plot"(x, col="black", xlab="Number of genomes", ylab="Number of clusters", ...) "summary"(object, ...) "str"(object, ...)

Arguments

x
A Panmat object, see below.
object
A Panmat object, see below.
col
The color, default is "black", of interior and borders of the bars in the barplot.
xlab
The label of the X axis.
ylab
The label of the Y axis.
...
Optional (graphical) arguments.

Details

A Panmat object contains a pan-matrix, which is the fundamental data structure for pan-genome analyses. It is a small (S3) extension to a matrix. It has one row for each genome in the study, and one column for each gene cluster. The number in cell [i,j] is the number of sequences in genome i that belongs to cluster j. A Panmat object is typically created by the function panMatrix. The plot.Panmat function will display the content of the Panmat object as a bar chart showing the number of clusters found in 1,2,...,G genomes, where G is the total number of genomes in the study (rows in Panmat). The summary.Panmat function will display a text giving the same information as plot.Panmat. The str.Panmat function will simply print the dimensions of the Panmat object.

See Also

panMatrix.

Examples

Run this code
# Loading clustering data in the micropan package
data(list="Mpneumoniae.blast.clustering",package="micropan")
panmat.blast <- panMatrix(Mpneumoniae.blast.clustering)

# Plotting and printing the Panmat object
plot(panmat.blast)
summary(panmat.blast)
str(panmat.blast)

Run the code above in your browser using DataLab