Skip to main content

Annotate a VCF file with AF, AD and DP from tumor and normal BAMs

Project description

VAFator

PyPI version Run unit tests License

Annotate the variants in a VCF file with allele frequencies, allele counts and depth of coverage for alternate alleles from one or more BAM files.

Outputs a VCF with the following annotations in the INFO field for tumor and normal:

chr1    12345       .       A       G       .       PASS  tumor_af=0.0;tumor_ac=0;tumor_dp=89;normal_af=0.0196078431372549;normal_ac=1;normal_dp=51

Both tumor and normal BAMs are optional, it can annotate only with the tumor BAM and viceversa. If more than one BAM is provided for either the tumor or the normal the frequencies and counts are added up.

Run it as follows:

$ vafator --help
usage: vafator [-h] --input-vcf INPUT_VCF --output-vcf OUTPUT_VCF
               [--normal-bams NORMAL_BAMS [NORMAL_BAMS ...]]
               [--tumor-bams TUMOR_BAMS [TUMOR_BAMS ...]]
               [--mapping-quality MAPPING_QUALITY]
               [--base-call-quality BASE_CALL_QUALITY]

vafator v0.1.0

optional arguments:
  -h, --help            show this help message and exit
  --input-vcf INPUT_VCF
                        The VCF to annotate (default: None)
  --output-vcf OUTPUT_VCF
                        The annotated VCF (default: None)
  --normal-bams NORMAL_BAMS [NORMAL_BAMS ...]
                        Whitespace-separated list of normal BAMs to analyse
                        (default: [])
  --tumor-bams TUMOR_BAMS [TUMOR_BAMS ...]
                        Whitespace-separated list of tumor BAMs to analyse
                        (default: [])
  --mapping-quality MAPPING_QUALITY
                        All reads with a mapping quality lower or equal than
                        this threshold will be filtered out (default: 0)
  --base-call-quality BASE_CALL_QUALITY
                        All bases with a base call quality lower or equal than
                        this threshold will be filtered out (default: 29)

Copyright (c) 2015-2020 TRON gGmbH (See LICENSE for licensing details) 

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

vafator-0.3.4.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

vafator-0.3.4-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file vafator-0.3.4.tar.gz.

File metadata

  • Download URL: vafator-0.3.4.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for vafator-0.3.4.tar.gz
Algorithm Hash digest
SHA256 4496d700900fc0ed4e2863ddbba06a494f721fcc02f1f5cf4e8a0081c051152b
MD5 58405f62bc55dced379f00236271a217
BLAKE2b-256 e0280be0661b3bef81d7bd511e72675a02e3b53a42eff5d15f2b6ae5348a6ee0

See more details on using hashes here.

File details

Details for the file vafator-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: vafator-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for vafator-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 752d04e0aec17cade86db2e7580bd5a53050bc6fa06be37dcc7b4d44e3f5915d
MD5 dfb562b1a849b45ed7eec3a89e6589e5
BLAKE2b-256 3059d3aeadc4bca0b569bb64b864b4ee4a26b2c4ac6b14b71bbac559ee7c06f2

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