Description Usage Arguments Value Examples
This function uses ggplot (in particular, w/ geom_rect) to plot a sequence alignment
1 2 3 |
seq_list |
Sequence list parsed using the function 'read_alignment' |
palette |
Named-array mapping sequence to color or a pre-defined color scheme (random, rainbow, etc.) |
taxa |
Array of taxa (the actual labels, not order) intended to restrict figure to or to exclude from figure. |
columns |
Array of columns (indexed from 1) intended to restrict figure to or to exclude from figure. |
exclude_taxa |
Boolean argument indicating that taxa should be excluded from plot. Default: False |
exclude_columns |
Boolean argument indicating that columns should be excluded from plot. Default: False |
legend_title |
String determining title of legend. Default: "Character" |
ggplot object which may be saved or edited as desired
1 2 3 4 5 6 7 | fasta_file <- system.file("extdata", "example.fasta", package = "alignfigR")
plot_frame <- read_alignment(file = fasta_file)
align_plot <- plot_alignment(plot_frame, "DNA")
align_plot <- plot_alignment(plot_frame, "protein")
align_plot <- plot_alignment(plot_frame, taxa = c("Cow", "Whale"), columns = c(1:25))
align_plot <- plot_alignment(plot_frame, taxa = c("Whale"), exclude_taxa = TRUE)
align_plot <- plot_alignment(plot_frame, legend_title = "") ## Remove the title
|
Welcome to alignfigR!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.