rich-msa 
A simple module to render colorful Multiple Sequence Alignment with rich in the terminal.
🔧 Installing
Install the rich-msa package directly from PyPi
which hosts universal wheels that can be installed with pip:
$ pip install rich-msa
💡 Example
Use Biopython to load a MSA from an aligned FASTA file, and render it to the terminal:
import Bio.AlignIO
import rich
from rich_msa import RichAlignment
msa = Bio.AlignIO.read("tests/data/swissprot-halorhodopsin.muscle.afa", "fasta")
viewer = RichAlignment(
names=[record.id for record in msa],
sequences=[str(record.seq) for record in msa],
)
panel = rich.panel.Panel(viewer, title="swissprot-halorhodopsin.muscle.afa")
rich.print(panel)
You should get an output similar to the following picture, scaled to your
terminal width:
🪛 Command-Line
If you have the rich-msa library installed from PyPI, you can use it directly
to view any alignment file, provided you have Biopython installed:
$ python -m rich_msa -i tests/data/swissprot-halorhodopsin.muscle.afa
Use the -f flag to change the file format from aligned FASTA (default) to
any alignment format supported by Biopython.
💭 Feedback
⚠️ Issue Tracker
Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker if you need to report or ask something. If you are filing in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproducible situation.
🏗️ Contributing
Contributions are more than welcome! See
CONTRIBUTING.md
for more details.
⚖️ License
This library is provided under the MIT License.
This project is in no way not affiliated, sponsored, or otherwise endorsed by the original Rich authors. It was developed by Martin Larralde during his PhD project at the European Molecular Biology Laboratory in the Zeller team.
Metadata
Release files for rich-msa 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| rich-msa-0.1.0.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rich_msa-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / rich-msa-0.1.0.tar.gz
| Download URL | rich-msa-0.1.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fd78e16ab4e496f365512eb84a85c3352844e5972ef22d1bf682632482bd664
|
|
BLAKE2b-256 checksum How to use checksums |
858db57eb3386f9f62c00fd5c6c6d31f0a24227b4b86b762d1340e0656755034
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|
Release files / rich_msa-0.1.0-py3-none-any.whl
| Download URL | rich_msa-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbd7e7a479fff956d3473bb806b66e760f1a10e0569fb703e9e499f1c29ee3c2
|
|
BLAKE2b-256 checksum How to use checksums |
fdd9a8efa90c881ff4e6f223b7d07db99447d7f1c0c2b8e8998cd8d30c1d8a8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|
Security for rich-msa 0.1.0
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.