<div style="text-align: center;">
<img src="https://github.com/pgcbioinfo/vargram/blob/main/img/vargram_header.png?raw=True" alt="VARGRAM Header" />
</div>
<h1 style="text-align:center;">VARGRAM (Visual ARrays for GRaphical Analysis of Mutations)</h1>
🧬 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](https://github.com/pgcbioinfo/vargram/issues).
## Installation
A pre-release (but tested) version of VARGRAM is available for download and can already be used. To install with [pip](https://pip.pypa.io/en/stable/), run
```bash
pip install --pre vargram
```
on the command line. Python version ≥3.11 is required.
VARGRAM relies on [Nextclade](https://clades.nextstrain.org/) to perform mutation calling when sequence files are provided. Make sure to [download the Nextclade CLI](https://docs.nextstrain.org/projects/nextclade/en/stable/user/nextclade-cli/installation/index.html) 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.)
Full installation instructions are available on the [VARGRAM Wiki](https://github.com/pgcbioinfo/vargram/wiki).
## 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](https://docs.nextstrain.org/projects/nextclade/en/stable/user/input-files/03-genome-annotation.html) format.
A mutation profile can be generated in just four lines of code:
```python
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](https://clades.nextstrain.org/) and download the analysis CSV output. VARGRAM recognizes this output and can process it:
```python
from vargram import vargram
vg = vargram(data='path/to/nextclade_analysis.csv')
vg.profile()
vg.show()
```
Calling the mutation profile this way does not require Nextclade CLI to be installed.
## Sample Output
Check out the [VARGRAM Wiki](https://github.com/pgcbioinfo/vargram/wiki) for more details, including how to customize the figure and produce profiles like the following:
<div style="text-align: center;">
<img src="https://github.com/pgcbioinfo/vargram/blob/main/img/mutation_profile.png?raw=True" alt="mutation profile" />
</div>
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, even though the start position of ORF1a is smaller. You may wish to force VARGRAM to show the genes in order based on the start position. You can do so by setting `vargram(order=True)`. The mutation profile above will then look like the following:
<div style="text-align: center;">
<img src="https://github.com/pgcbioinfo/vargram/blob/main/img/mutation_profile_ordered.png?raw=True" alt="mutation profile with genes ordered" />
</div>
Raw data
{
"_id": null,
"home_page": null,
"name": "vargram",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "Philippine Genome Center - Core Facility for Bioinformatics <bioinformatics@pgc.up.edu.ph>",
"keywords": "virus, mutations, epidemiology, visualization",
"author": "C. J. Palpal-latoc, Francis A. Tablizo",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/61/eb/b4bbf7d4c47b9fb2409f2cb504aaf5272508402812f59fc0c05dabcc0ca0/vargram-0.2.0b1.tar.gz",
"platform": null,
"description": "<div style=\"text-align: center;\">\n <img src=\"https://github.com/pgcbioinfo/vargram/blob/main/img/vargram_header.png?raw=True\" alt=\"VARGRAM Header\" />\n</div>\n<h1 style=\"text-align:center;\">VARGRAM (Visual ARrays for GRaphical Analysis of Mutations)</h1>\n\n\n\ud83e\uddec 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.\n\n\ud83d\udd25 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](https://github.com/pgcbioinfo/vargram/issues). \n\n## Installation\n\nA pre-release (but tested) version of VARGRAM is available for download and can already be used. To install with [pip](https://pip.pypa.io/en/stable/), run\n```bash\npip install --pre vargram\n``` \non the command line. Python version \u22653.11 is required.\n\nVARGRAM relies on [Nextclade](https://clades.nextstrain.org/) to perform mutation calling when sequence files are provided. Make sure to [download the Nextclade CLI](https://docs.nextstrain.org/projects/nextclade/en/stable/user/nextclade-cli/installation/index.html) 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.)\n\nFull installation instructions are available on the [VARGRAM Wiki](https://github.com/pgcbioinfo/vargram/wiki).\n\n## Quickstart Guide\n\nTo 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](https://docs.nextstrain.org/projects/nextclade/en/stable/user/input-files/03-genome-annotation.html) format.\n\nA mutation profile can be generated in just four lines of code:\n```python\nfrom vargram import vargram # Importing the package\n\nvg = vargram(seq='path/to/covid_samples/', # Provide sample sequences\n ref='path/to/covid_reference.fa', # Provide reference sequence\n gene='path/to/covid_annotation.gff') # Provide genome annotation\nvg.profile() # Tell VARGRAM you want to create a mutation profile\nvg.show() # And show the resulting figure\n```\n\nAlternatively, you can simply provide a CSV file. For example, you can upload your sequences to the [Nextclade web app](https://clades.nextstrain.org/) and download the analysis CSV output. VARGRAM recognizes this output and can process it:\n```python\nfrom vargram import vargram\n\nvg = vargram(data='path/to/nextclade_analysis.csv')\nvg.profile()\nvg.show()\n```\nCalling the mutation profile this way does not require Nextclade CLI to be installed.\n\n## Sample Output\n\nCheck out the [VARGRAM Wiki](https://github.com/pgcbioinfo/vargram/wiki) for more details, including how to customize the figure and produce profiles like the following:\n\n<div style=\"text-align: center;\">\n <img src=\"https://github.com/pgcbioinfo/vargram/blob/main/img/mutation_profile.png?raw=True\" alt=\"mutation profile\" />\n</div>\n\nNote 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, even though the start position of ORF1a is smaller. You may wish to force VARGRAM to show the genes in order based on the start position. You can do so by setting `vargram(order=True)`. The mutation profile above will then look like the following:\n\n<div style=\"text-align: center;\">\n <img src=\"https://github.com/pgcbioinfo/vargram/blob/main/img/mutation_profile_ordered.png?raw=True\" alt=\"mutation profile with genes ordered\" />\n</div>\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python visualization tool for genomic surveillance",
"version": "0.2.0b1",
"project_urls": {
"Repository": "https://github.com/pgcbioinfo/vargram"
},
"split_keywords": [
"virus",
" mutations",
" epidemiology",
" visualization"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "23c3c557132f13b62f5b2c23fc28c764e44531d7610fff698771f06dfda5bf6e",
"md5": "b7783c1ec9561a7375e50cf41fd7c65a",
"sha256": "a1ec21874eefc707623d779d6e3f447a93f2cec496e2076d3e307867b06e968c"
},
"downloads": -1,
"filename": "vargram-0.2.0b1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b7783c1ec9561a7375e50cf41fd7c65a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 26687,
"upload_time": "2024-11-13T04:59:33",
"upload_time_iso_8601": "2024-11-13T04:59:33.074733Z",
"url": "https://files.pythonhosted.org/packages/23/c3/c557132f13b62f5b2c23fc28c764e44531d7610fff698771f06dfda5bf6e/vargram-0.2.0b1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "61ebb4bbf7d4c47b9fb2409f2cb504aaf5272508402812f59fc0c05dabcc0ca0",
"md5": "64763a039c86b841f0479ae44000792e",
"sha256": "b194c611704a1819239c67fe800a75a1cddd401ab50f3a0d71b65b357b0de9d6"
},
"downloads": -1,
"filename": "vargram-0.2.0b1.tar.gz",
"has_sig": false,
"md5_digest": "64763a039c86b841f0479ae44000792e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 26841,
"upload_time": "2024-11-13T04:59:34",
"upload_time_iso_8601": "2024-11-13T04:59:34.938706Z",
"url": "https://files.pythonhosted.org/packages/61/eb/b4bbf7d4c47b9fb2409f2cb504aaf5272508402812f59fc0c05dabcc0ca0/vargram-0.2.0b1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-13 04:59:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pgcbioinfo",
"github_project": "vargram",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "vargram"
}