Skip to main content

A Python visualization tool for genomic surveillance

Project description

Docs Build Status Tests Status

VARGRAM Header

VARGRAM (Visual ARrays for GRaphical Analysis of Mutations)

🧬 VARGRAM is a Python package that makes it easy to generate insightful figures for genomic surveillance, born out of our experience during the COVID-19 pandemic. With the latest update, VARGRAM can be used to generate mutation profiles straight from sequence files by hooking into existing tools such as Nextclade. The figures can be easily customized within a Python script or Jupyter notebook using a declarative syntax.

🔥 We are actively developing VARGRAM into a full visualization library for common use cases in molecular epidemiology. More modules will be added in the coming months. If you have a feature request or find a bug, please submit an issue.

Documentation

Full installation instructions and tutorials are available on the VARGRAM documentation website.

Installation

Install with pip:

pip install vargram

Python version ≥3.11 is required.

VARGRAM relies on Nextclade to perform mutation calling when sequence files are provided. Make sure to download the Nextclade CLI and add it to the path. (Alternatively, you may provide Nextclade's analysis CSV output directly and VARGRAM can still produce a mutation profile without Nextclade installed.)

Quickstart Guide

To produce a mutation profile, VARGRAM requires a single FASTA file (or a directory of FASTA files) of samples, a FASTA file for the reference, and a genome annotation file following the GFF3 format.

A mutation profile can be generated in just four lines of code:

from vargram import vargram # Importing the package

vg = vargram(seq='path/to/covid_samples/', # Provide sample sequences
            ref='path/to/covid_reference.fa', # Provide reference sequence
            gene='path/to/covid_annotation.gff') # Provide genome annotation
vg.profile() # Tell VARGRAM you want to create a mutation profile
vg.show() # And show the resulting figure

Alternatively, you can simply provide a CSV file. For example, you can upload your sequences to the Nextclade web app and download the analysis CSV output. VARGRAM recognizes this output and can process it:

from vargram import vargram

vg = vargram(data='path/to/nextclade_analysis.csv') # Provide Nextclade analysis file
vg.profile()
vg.show()

Calling the mutation profile this way does not require Nextclade CLI to be installed.

Sample Output

A sample mutation profile is shown below:

mutation profile

Note that by default, VARGRAM favors placing genes with the most number of mutations first. Thus, the S gene above is shown at the very top. You may wish to force VARGRAM to show the genes in order based on the start position. You can do so by setting vg.profile(order=True). The mutation profile above will then look like the following:

mutation profile with genes ordered

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vargram-0.3.0.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vargram-0.3.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file vargram-0.3.0.tar.gz.

File metadata

  • Download URL: vargram-0.3.0.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vargram-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cce642b8b17cada051588d5f886e89ffdbaa86a5cd4975b5b67ec62a52f6a441
MD5 0ea2f084c0bf17651690edeacc666093
BLAKE2b-256 e5f5bfc0d1eb9247237c2345f30f2a3b360657b2a53f5e7aa1eade74b8564e64

See more details on using hashes here.

File details

Details for the file vargram-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: vargram-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vargram-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d41b88b6f72cf425dc4c01481b38af9ed0bf793f4f152b21d7d90967baa7ac4
MD5 5f5578bb4a7d5b040049b446702c6678
BLAKE2b-256 84f68c7beffc7230a00732dffde7a052ca41de58b8c1e8f803e97a4d5f835381

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page