Description Usage Arguments Value Author(s) See Also Examples
Plot a PhyloSim object.
This method plots the aggregated alignment alongside the tree used for simulation. Various options allow for control over the plot style.
1 2 3 4 |
x |
A PhyloSim object. |
plot.tree |
Whether to plot the tree alongside the alignment. TRUE or FALSE; defaults to TRUE. |
plot.ancestors |
Whether to plot the ancestral sequences. TRUE or FALSE; defaults to TRUE. |
plot.chars |
Whether to plot the actual text of the characters. |
plot.legend |
Whether to plot the legend showing the character-to-color mapping. |
plot.labels |
Whether to plot the sequence labels along the y-axis |
aspect.ratio |
(Experimental; when set, this option forces the num.pages value to 1) Constrains the alignment residues to have a certain aspect ratio; values above 1 cause vertically-stretched blocks. FALSE disables aspect ratio control, numerical values set the aspect ratio; defaults to FALSE. |
num.pages |
Optionally split the alignment over a number of vertically-stacked pages. This is useful for long alignments. 'auto' chooses a sensible number of pages, numerical values specify a number; defaults to 'auto'. |
char.text.size |
Text size for the aligned characters. This may require tweaking depending on the DPI and output format. Defaults to 'auto'. |
axis.text.size |
Text size for the sequence labels along the y-axis. This may require tweaking depending on the DPI and output format. Defaults to 'auto'. |
color.scheme |
Color scheme to use ("auto", "binary", "dna", "protein", "codon", "combined", "combined_codon"). Defaults to 'auto'. When set to 'auto', the function will choose an appropriate coloring scheme based on the alignment content. |
color.branches |
The event count used to color the branches ("substitutions" by default). See |
tree.xlim |
The x-axis limits of the tree panel. |
aln.xlim |
The x-axis limits of the alignment panel (in alignment column coordinates). |
tracks |
Tracks to display above or below the alignment as colored blocks. The input format for tracks is a list of data frames with the following possible fields, all of which are optional and can be omitted:
|
aln.length.tolerance |
The desired alignment/sequence length ratio (A/S ratio) to trim the alignment to. The A/S ratio is defined as the ratio between the alignment length and the mean ungapped sequence length, and the alignment trimming procedure will remove blocks of indel-containing columns (in a sensible order) until either (a) the desired indel tolerance is reached, or (b) no more columns can be removed without yielding an empty alignment. A track is added below the alignment to indicate how many indels each resulting alignment column used used to harbor, and black squares are overlaid onto the alignment where extant sequence data has been trimmed. Defaults to NULL (no trimming); values in the range of 0.9 to 1.3 tend to work well at improving the legibility of very gappy alignments. |
plot.nongap.bl |
If set to TRUE, plots the non-gap branch length (defined as the branch length of the subtree of non-gapped sequences) as a track below the alignment. Defaults to FALSE. |
... |
Not used. |
The PhyloSim object (invisible).
Botond Sipos, Gregory Jordan
For more information see PhyloSim
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Create a PhyloSim object.
# Provide the phylo object
# and the root sequence.
sim<-PhyloSim(
name="TinySim",
phylo=rcoal(3),
root.seq=NucleotideSequence(string="ATGCTAGCTAGG",processes=list(list(JC69())))
);
# plot the aggregated phylo object
plot(sim)
# run simulation
Simulate(sim)
# Plot the alignment without the tree or ancestral sequences.
plot(sim, plot.ancestors=FALSE, plot.tree=FALSE)
# Force a DNA-based color scheme
# (default is 'auto' to auto-detect based on the sequence composition)
plot(sim, color.scheme='dna', plot.legend=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.