Skip to main content

MSPlotter

Make a graphical representation of a blastn alignment

Multiple Sequence Plotter (MSPlotter) uses GenBank files (.gb) to align the sequences and plot the genes. MSPlotter uses the information from the CDS features section to plot the genes. To customize the colors for plotting genes, you can add a Color tag in the CDS features with color in hexadecimal. For example, add the tag /Color="#00ff00" to show a gene in green. To avoid direct manual manipulation of the GenBank file, you can edit the file with Geneious or another software and export the file with the new annotations.

MSPlotter is an easy-to-use option for people with little coding knowledge or problems running the classic app easyfig. The program offers a graphical user interface (GUI) and a command line interface (CLI).

If the user knows Python, MSPlotter uses matplotlib. Therefore, to customize your figure, the user can modify the parameters in the MakeFigure class of the msplotter module or make any necessary change in any part of the code.

I am developing MSPlotter in my free time, therefore, if you find a bug, it may take me some time to fix it, but I will try to do my best to fix the problems as soon as possible. Also, if you have any suggestions, let me know, and I will try to implement them.

Requirements

MSPlotter has been tested in macOS and Windows.

Installation

First, create a virtual environment with conda or venv. Then, install msplotter using pip as follows:

pip install msplotter

Usage and options

To run the GUI type:

msplotter --gui

Output GUI:

MSPlotter

To view all the options run:

msplotter --help

Partial output CLI:

usage: msplotter [-h] [-v] [-i INPUT [INPUT ...]] [-o OUTPUT] [-n NAME] [-f FORMAT] [-d DPI]
                 [--alignments_position ALIGNMENTS_POSITION] [--identity_color IDENTITY_COLOR]
                 [--annotate_sequences [ANNOTATE_SEQUENCES]] [--annotate_genes [ANNOTATE_GENES]] [-g]

Make a graphical representation of a blastn alignment.

Help:
  -h, --help            Show this help message and exit.
  -v, --version         Show program's version number and exit

Required:
  -i INPUT [INPUT ...], --input INPUT [INPUT ...]
                        Path to input files. Provided files must be GenBank files.

Optional:
  -o OUTPUT, --output OUTPUT
                        Path to output folder.
                        Default: current working directory.
  -n NAME, --name NAME  Name of figure.
                        Default: `figure`.
  -f FORMAT, --format FORMAT
                        Format of figure. Options: pdf, png, and svg.
                        For a complete list of valid options visit:
                        https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html
                        Default: `png`.
  -d DPI, --dpi DPI     Resolution in dots per inch.
                        Default: 300 (high resolution for print).
  --alignments_position ALIGNMENTS_POSITION

Usage examples CLI

To make a figure with default parameters:

msplotter -i path/file_1.gb path/file_2.gb path/file_3.gb

To save a figure in pdf format:

msplotter -i path/file_1.gb path/file_2.gb path/file_3.gb -f pdf

Notes

I started this project to make a figure paper with three sequences with lengths between 8 to 23 kb. However, the matplotlib parameters can be adjusted for larger, smaller, or more sequences.

Credits

Inspired by easyfig: Sullivan et al (2011) Bioinformatics 27(7):1009-1010

License

BSD 3-Clause License

Metadata

Release files for msplotter 0.1.37

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for msplotter 0.1.37
File Size Uploaded Provenance Actions
msplotter-0.1.37.tar.gz 415.7 kB Without provenance Details for msplotter-0.1.37.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for msplotter 0.1.37
File Interpreter ABI Platform Actions
msplotter-0.1.37-py3-none-any.whl Python 3 none any Details for msplotter-0.1.37-py3-none-any.whl

Total release size: 836.0 kB

Release files / msplotter-0.1.37.tar.gz

Download URL msplotter-0.1.37.tar.gz
Size 415.7 kB
Tags Source
SHA-256 checksum
How to use checksums
40ec92eb39f4253aa10e4dd8db83d5624d06b31c722eebf40e3509edfe47f7bf
BLAKE2b-256 checksum
How to use checksums
4632605aae053e857bdfd45ab26818fb87a033ae73ac1b167d6732368e28509c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / msplotter-0.1.37-py3-none-any.whl

Download URL msplotter-0.1.37-py3-none-any.whl
Size 420.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f42afce946d320271a4ec3ace441c98798a245ae1182ccb1edde80194a0520dd
BLAKE2b-256 checksum
How to use checksums
bc732ab0bc81b303777abbce0c4263efabd2440c914f65ba11e7dd5b5b6068d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for msplotter 0.1.37

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page