YuLab-SMU / ggmsa

:traffic_light: Visualizing publication-quality multiple sequence alignment using ggplot2
http://yulab-smu.top/ggmsa
200 stars 22 forks source link

Is there a way to only highlight/colour unconserved regions? #42

Open cms72 opened 2 years ago

cms72 commented 2 years ago

Hi! First, thank you for your tool!

Background: I have an MSA alignment of a single gene coming from multiple sources.

I have managed to produce a tree and combine MSA alignment [ggtree() + geom_facet(geom = geom_msa)] into one image, but I only wanted to highlight/colour regions that aren't conserved. Is there a way to do this?

I also found the geom_msaBar useful to highlight unconserved regions, but I am unable to incorporate it into geom_facet.

Thank you!

cms72 commented 2 years ago

I also noticed that the colour="Clustal" doesn't work when using position_highlight to highlight AA differences

cms72 commented 2 years ago

Other things I noticed:

1) "by_conservation = T" works but "by_conservation = F" comes up with an error and you need to type "by_conservation = FALSE".

2) Setting "by_conservation = FALSE" - I was thinking it would do the opposite of "by_conservation = T" by highlighting non-conserved regions.

Thanks again!