ggmsa icon indicating copy to clipboard operation
ggmsa copied to clipboard

Feature Request: Consensus View

Open ammaraziz opened this issue 3 years ago • 8 comments

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:

Annotation 2020-09-02 170741

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

ammaraziz avatar Sep 02 '20 07:09 ammaraziz

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.

brj1 avatar Sep 02 '20 17:09 brj1

That's super cool @brj1 I'll be sure to check it out. What was your approach for plotting consensus view?

ammaraziz avatar Sep 03 '20 00:09 ammaraziz

@nyzhoulang pls look into it. Maybe we can work out a data structure that compatible with gghighlighter.

GuangchuangYu avatar Sep 03 '20 01:09 GuangchuangYu

Got it.

nyzhoulang avatar Sep 03 '20 01:09 nyzhoulang

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)

1

ggmsa(protein_sequences, star = 150, end = 200 , char_width = 0.5, color = "Chemistry_AA", seq_name = T, consensus_views = T, use_dot = T)

2

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)

3

nyzhoulang avatar Oct 05 '20 09:10 nyzhoulang

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.

kcamnairb avatar Dec 02 '20 19:12 kcamnairb

Hi, @kcamnairb Using install_github('YuLab-SMU/ggmsa') to install the dev version, the version in "nyzhoulang/ggmsa" has stopped updating.

nyzhoulang avatar Dec 03 '20 01:12 nyzhoulang

Great, thanks!

kcamnairb avatar Dec 03 '20 15:12 kcamnairb