Skip to main content

DOI language License: GPL v3 pypi version pypi version CONDA CONDA

Logo

virHEAT is a tool to visualize vcfs as a heatmap and map mutations to respective genes.

Ever wanted to have a condensed look at variant frequencies after mapping your raw reads to a viral/bacterial reference genome and compare multiple vcf files at the same time? Than virHEAT is for you. You can not only visualize the heatmap but also read in a gff3 file that lets you display genes harboring a mutation. This lightweight script was inspired by snipit and my variant frequency plot, getting the best visualization features of both.

SARS-CoV-2 example:

# reproduce with test data
virheat example_data/ test/ -r NC_045512 -g example_data/SARS-CoV-2.gff3 -t 0.2 1

Example

SARS-CoV-2 example with additional score tracks --scores

This is a very specific use case. Have a look at the raw data if it is useful for you.

# reproduce with test data
virheat example_mave_data/ output/ -r NC_045512 -g example_mave_data/SARS-CoV-2.gff3 --scores example_mave_data/MaveExpRBD.csv AA score MAVEexpression -z 20000 25000 -t 0.4 1

Example_Scores

Installation

via pip (recommened):

pip install virheat

via conda:

conda install -c bioconda virheat

from this repo:

git clone https://github.com/jonas-fuchs/virHEAT
cd virHEAT
pip install .

That was already it. To check if it worked:

virheat -v

You should see the current virHEAT version.

Usage

usage: 	virheat <folder containing vcfs> <output dir> -l or -g [additional arguments]

Arguments:

positional arguments:
  input                 folder containing input files and output folder

options:
  -h, --help            show this help message and exit
  -r ref_id, --reference ref_id
                        reference identifier
  --name virHEAT_plot.pdf
                        plot name and file type (pdf, png, svg, jpg). Default: virHEAT_plot.pdf
  -l None, --genome-length None
                        length of the genome (needed if gff3 is not provided)
  -g None, --gff3-path None
                        path to gff3 (needed if length is not provided)
  -a [gene ...], --gff3-annotations [gene ...]
                        annotations to display from gff3 file (standard: gene). Multiple possible.
  --gene-arrows, --no-gene-arrows
                        show genes in arrow format (only if the -g argument is provided) (default: False)
  -t 0, --threshold 0   display frequencies above this threshold (0-1)
  --delete, --no-delete
                        delete mutations that are present in all samples and their maximum frequency divergence is smaller than 0.5 (default: True)
  -n None, --delete-n None
                        do not show mutations that occur n times or less (default: Do not delete)
  -z start stop, --zoom start stop
                        restrict the plot to a specific genomic region.                      
  --sort, --no-sort     sort sample names alphanumerically (default: False)
  --min-cov 20          display mutations covered at least x time (only if per base cov tsv files are provided)
  -s scores_file pos_col score_col score_name, --scores scores_file pos_col score_col score_name
                        specify scores to be added to the plot by providing a CSV file containing scores, along with its column for amino-acid positions, its column for scores, and descriptive score names (e.g., expression, binding, antibody escape, etc.).
                        This option can be used multiple times to include multiple sets of scores.
  -v, --version         show program's version number and exit

You need to either provide the length of your reference genome or if you want to get the sequence annotation you will need to provide the gff3 file.

Additionally, you can also analyse if mutations are sufficiently covered and display non-covered cells in grey. For that first create a per base coverage tsv files for each bam file with Qualimap and provide it in the same folder as the vcf files. Give them the same name as your vcf files.

Moreover, there is an option to include visualizations of additional scores (e.g., MAVE scores for binding affinity, expression level, antibody escape, etc.) mapped to mutations on the heatmap. To utilize this feature, use the -s or --scores argument, and provide the following arguments: 1) path to the CSV file containing scores; 2) the name of the column in this file containing mutation positions in classic notation (e.g., T430Y); 3) the name of the column in this file containing the scores themselves; 4) a descriptive score name that will be used as labels in the plot. Multiple score sets can be included simultaneously by repeating the -s or --scores option with different arguments. For example input and possible output data, please refer to the files located in the example_data/example_mave_data folder.


Important disclaimer: The code is under the GPLv3 licence. The code is WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Metadata

Release files for virheat 0.7.6

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

Source distribution (sdist)

Source distribution for virheat 0.7.6
File Size Uploaded Provenance
virheat-0.7.6.tar.gz 52.9 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 93.3 kB

Release files / virheat-0.7.6.tar.gz

Download URL virheat-0.7.6.tar.gz
Size 52.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0aaa1a82966b6dcc583b3bcd2ebc01e91310cc15e20418efc9acc3233f000938
BLAKE2b-256 checksum
How to use checksums
0cdf27622c5071ab4de715b7330278a489ad5079b4ae1761e5e72a56fe92ec2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / virheat-0.7.6-py3-none-any.whl

Download URL virheat-0.7.6-py3-none-any.whl
Size 40.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0520be27e4d6f69f8d03f5eb54feea5c7704b550eab94d9ca8902bfbc2daea3
BLAKE2b-256 checksum
How to use checksums
2cf88787b4a711606661870ad3e439a9e7512cb27a1c915600705fdda14c7d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for virheat 0.7.6

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