ggmsa
ggmsa copied to clipboard
Feature Request: Consensus View
Hi,
Thank you for the cool package. I'd like to request "consensus view". That's when only the sequence of the reference (the top alignment) is visible with the rest hidden/replaced with a character (usually '.' or '?' or preferably user specified) but disagreements are shown/colored. Here is an example to better illustrate what I'm referring to from Geneious
:
Ideally, I'd like to combine consensus view with posHighligthed
option to be able to show say mutations in binding sites.
If at all possible the above example should be replicable inside ggmsa
because a lot of wetlab scientists use Geneious
to perform these tasks.
Thanks!
Ammar
My fork (https://github.com/brj1/gghighlighter) can do this,. Though, I think this functionality should be added to ggmsa
proper.
@GuangchuangYu My fork can't be merged because my data structure for store MSA data is quite different from yours.
That's super cool @brj1 I'll be sure to check it out. What was your approach for plotting consensus view?
@nyzhoulang pls look into it. Maybe we can work out a data structure that compatible with gghighlighter.
Got it.
Sorry for the late reply.
We added the Consensus View to the ggmsa
by referring to Geneious
.
The feature shown below can be implemented by installing the dev version of ggmsa
:
library(ggmsa)
protein_sequences <- system.file("extdata", "sample.fasta", package = "ggmsa")
ggmsa(protein_sequences, star = 150, end = 200 , char_width = 0.5, color = "Chemistry_AA", seq_name = T, consensus_views = T)
ggmsa(protein_sequences, star = 150, end = 200 , char_width = 0.5, color = "Chemistry_AA", seq_name = T, consensus_views = T, use_dot = T)
ggmsa(protein_sequences, star = 150, end = 200 , char_width = 0.5, color = "Chemistry_AA", seq_name = T, consensus_views = T, use_dot = T, disagreement = T)
Hi, I would like to use the consensus_view option. How do install the dev version? I tried "install_github('nyzhoulang/ggmsa')" but that seemed to be older than the version in CRAN.
Hi, @kcamnairb
Using install_github('YuLab-SMU/ggmsa')
to install the dev version, the version in "nyzhoulang/ggmsa" has stopped updating.
Great, thanks!