Skip to content

Visualizing multiple sequence alignments and highlighter plots using ggplot2

Notifications You must be signed in to change notification settings

brj1/gghighlighter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gghighlighter

Highlighter and multiple sequence alignment (MSA) plots in ggplot2. gghighltighter adds functions to fortify ape::DNAbin and ape::AAbin objects as well as matrices of aligments.

Originally forked from YuLab-SMU/ggmsa.

Installation

To install run the following commands in R

#install devtools and Bioconductor
install.packages(c("devtools", "BiocManager"))

#install treeio package
library(BiocManager)
BiocManager::install("treeio")

#install ggmmsa from github
devtools::install_github("brj1/gghighlighter")

Examples

You can simply call the gghighlighter function to plot a MSA.

library(gghighlighter)
f <- system.file("extdata/sample.fasta", package="gghighlighter")
dev.new(width=11, height=2)
gghighlighter(f, 164, 213)

# Highlight differences
gghighlighter(f, 164, 213, consensus="PH4H_Rattus_norvegicus", remove.blank=c("-"))

# Highlight similarities
gghighlighter(f, 164, 213, consensus="PH4H_Rattus_norvegicus", remove.blank=c("-"), hightlight.diff=FALSE)

Or to plot DNA MSA:

library(gghighlighter)
f <- system.file("extdata/dna_seq.fasta", package="gghighlighter")
dev.new(width=11, height=2)
gghighlighter(f, 0, 100, palette="Chemistry_Nucle")

About

Visualizing multiple sequence alignments and highlighter plots using ggplot2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 87.4%
  • Makefile 12.6%