Learn R Programming

phyclust (version 0.1-9)

plothist: Plot histogram to compare number of mutations.

Description

Plot histogram to compare number of mutations.

Usage

plothist(X, X.class = NULL, Mu = NULL, fill.color = .Color,
   draw.all = TRUE, main = "Mutation counts",
   xlab = "Difference", ylab = "Counts", append = FALSE)

Arguments

X
nid/sid matrix with $N$ rows/sequences and $L$ columns/sites.
X.class
class ids indicated for all sequences.
Mu
a central sequence with length $L$.
fill.color
color to fill the histogram.
draw.all
draw a histogram use all sequences.
main
main label, default = "Mutation counts".
xlab
x-axis label, default = "Difference".
ylab
y-axis label, default = "Counts".
append
overwrite histograms.

Value

  • Histograms will be drawn to show the number of mutations away from the central sequence.

Details

If X.class is set, the histograms will be drawn by classes and all sequences will be compared to the central sequence Mu. Otherwise, all sequences will be used to count mutations. draw.all is not effect if X.class is not set.

If Mu is set, it will be used to compare to all other sequences to count mutations. Otherwise, the first sequence of X will be used, and the first sequence in the first class will be used if X.class is set. If Mu is a matrix, the first row will be used as the central sequence.

References

Phylogenetic Clustering Website: http://thirteen-01.stat.iastate.edu/snoweye/phyclust/

See Also

seqgen, plotdots.

Examples

Run this code
X <- seq.data.toy$org
plothist(X)

# With class ids
X.class <- as.numeric(gsub(".*-(.*)", "\\1", seq.data.toy$seqname))
plothist(X, X.class)

Run the code above in your browser using DataLab