This function parses FASTA file and convert it to a tidy data frame.
The function will also assign color to each molecule (amino acid or nucleotide) according to the selected color scheme. Sequence logo data for drawing alignment label will also be added if font != NULL. The output of msa_data() is the input of geom_msa().
Usage
msa_data(fasta, start = NULL, end = NULL, font = "helvetica_regular",
color = "Clustal")
Arguments
fasta
Aligned fasta file.
start
Start position to plot,Defaults = NULL.
end
End position to plot, Defaults = NULL.
font
Character font, Defaults is 'helvetica_regular'.
color
A Color scheme. One of 'Clustal', 'Chemistry_AA', 'Shapely_AA', 'Zappo_AA', 'Taylor_AA', 'Chemistry_NT', 'Shapely_NT', 'Zappo_NT', 'Taylor_NT'.Defaults is 'Clustal'.
# NOT RUN {fasta <- system.file("extdata/sample.fasta", package="ggmsa")
data <- msa_data(fasta, 20, 120, font = 'helvetica_regular', color = 'Chemistry_AA' )
# }