Skip to content

mourisl/MSAplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSAplot

What is it?

A Python package to visualize multiple sequence alignment (MSA). MASplot is inspired by the package pyMSAviz and ggmsa. The major feature of MSAplot is customizable panels for plotting MSA, seqlogo, annotation, and consensus histogram.

Installation

  1. Clone the GitHub repo, e.g. with git clone https://github.com/mourisl/msaplot.
  2. Copy "msaplot" folder to your project folder or run "python3 setup.py install" to install.

I will try to add msaplot to PyPi in future.

Usage

Here is a minimal example:

import matplotlib.pyplot as plt
from msaplot import msaplot

msaplot.DrawComplexMSA(msa=["AC-GAT", "A-CGT-"],
               panels=[msaplot.DrawSeqLogo, msaplot.DrawMSA, msaplot.DrawConsensusHisto])

There are four drawinging functions that can be used in the panels option:

  • DrawMSA: visualize multiple sequence alignment
  • DrawSeqLogo: represent the seqlogo of the alignment
  • DrawConsensusHisto: represent the fraction of the consensus character for each position
  • DrawAnnotation: need to take a list to specify the name for each annotated region and region coordinate.

See more examples in example.ipynb.

Requirements

  • Python >= 3.6
  • seaborn >= 0.9
  • matplotlib >= 2.2.2

About

Plot multiple sequence alignment (MSA)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published