knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) protein_sequences <- system.file("extdata", "sample.fasta", package = "ggmsa") miRNA_sequences <- system.file("extdata", "seedSample.fa", package = "ggmsa") nt_sequences <- system.file("extdata", "LeaderRepeat_All.fa", package = "ggmsa") library(ggmsa) library(ggplot2)
In this package, there are various powerful parameters to customize the non-data components of MSA plots: i.e. font size, background, sequence names, legends and border. Some parameters can be used to give MSA plots a consistent customized look.
Characters width can be specified by char_width
. Default is 0.9.
ggmsa(protein_sequences, start = 320, end = 360, char_width = 0.5)
If none_bg = TRUE
, only show the character but not the colored background..
ggmsa(protein_sequences, start = 320, end = 360, none_bg = TRUE) + theme_void()
If seq_name = TRUE
, the sequence name will be displayed.
ggmsa(protein_sequences, 164, 213, seq_name = TRUE)
If show.legend = TRUE
, the legend of MSA plot will be displayed.
ggmsa(protein_sequences, 164, 213, font = NULL, show.legend = TRUE)
Change or set colored block border. if border = NA
, the border would be removed.
ggmsa(protein_sequences, 164, 213, font = NULL, border = NA)
Or, modify the border color by assign the color to border, like this: border = "white"
ggmsa(protein_sequences, 164, 213, font = NULL, border = "white")
Specified position can be highlighted but the block colors only assign by ggplot2 automatically.
ggmsa(protein_sequences, 164, 213, posHighligthed = c(185, 190), char_width = 0.5)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.