fasta2png
This program generates PNG images from nucleic acid (na) sequences in FASTA format.
It scans the sequence and generates a (small) rectangle (configurable size with --pixel-size) for each nucleotide bases from top-left to bottom-right. The aspect ratio of the PNG is also configurable (with --aspect-ratio). The PNG image is in RGBA format.
A, C, G, T is painted using different colors (U is same as T), and all other codes (N and others) are painted with white. The background of the image (meaning the remaining area in the image) is painted with black. These colors are also configurable.
Installation
pip install fasta2png
Usage
fna2png --input <input_in_fasta_format> --output <output_filename>
There are various options to customize PNG output, see help fna2png --help for more info.
Example
NC_045512.2 is the SARS-CoV-2 (corona virus 2) complete genome sequenced by Chinese researchers in January 2020.
NC_045512.2.fna file below is https://www.ncbi.nlm.nih.gov/nuccore/NC_045512.2?report=fasta&log$=seqview&format=text.
$ fna2png --input NC_045512.2.fna --output NC_045512.2.png --pixel-size 4 --aspect-ratio 3 2
seqdesc: NC_045512.2 Severe acute respiratory syndrome coronavirus 2 isolate Wuhan-Hu-1, complete genome
seqlen: 29903
Metadata
Release files for fasta2png 1
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 | Actions |
|---|---|---|---|---|
| fasta2png-1.tar.gz | 3.3 kB | Without provenance | Details for fasta2png-1.tar.gz |
Release files / fasta2png-1.tar.gz
| Download URL | fasta2png-1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27b40f4f906b1103c648d144b5dd4a97bc280bf94f7ac94dfdba6d615eae8dd7
|
|
BLAKE2b-256 checksum How to use checksums |
02d0cdbdc1a224f02a4e14bbe52b879f3514b9c69112bdd573606d7deaa315cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.6.9
|
Security for fasta2png 1
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.