Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

image

VRS AnVIL

Project Overview

This Python project is designed to process Variant Call Format (VCF) files or other sources of variant information and perform lookup operations on Genomic Variation Representation Service (GA4GH VRS) identifiers. The GA4GH VRS identifiers provide a standardized way to represent genomic variations, making it easier to exchange and share genomic information.

In addition, this project facilitates the retrieval of evidence associated with genomic alleles by leveraging the Genomic Data Representation and Knowledge Base (GA4GH MetaKB) service. GA4GH MetaKB provides a comprehensive knowledge base that links genomic variants to relevant evidence, enabling users to access valuable information about genomic alleles.

Features

  1. VCF File Processing:

    • Streamlines reading and parsing of VCF files, to extract relevant genomic information.
  2. GA4GH VRS Identifier Lookup:

    • Utilizes the GA4GH VRS API to perform lookups for each genomic variation mentioned in the VCF file.
    • Retrieves standardized identifiers for the alleles, enhancing interoperability with GA4GH-compliant systems.
    • GA4GH MetaKB Service Integration: Utilizes the GA4GH MetaKB service to query and retrieve evidence associated with the specified genomic alleles.
  3. Output Generation:

    • Generates summary metrics about throughput, errors, and evidence hits and misses
    • Optionally, generates a processed VCF file with additional GA4GH VRS identifiers for each genomic variation.
    • Presents the retrieved evidence in a structured format, including information about studies, publications, and other relevant details.
  4. Error Handling:

    • Implements robust error handling to address issues like invalid input files, invalid variants, connectivity problems with the GA4GH MetaKB API, and more.

Getting Started

Prerequisites

  • Python 3.10 or later
  • Internet connectivity for setting up dependencies, GA4GH MetaKB lookups, etc.

Installation

  1. Clone the repository:

    git clone https://github.com/ohsu-comp-bio/vrs_bulk_toolkit
    cd vrs-anvil
    
  2. Install dependencies: a. for local use

    # install postgresql@14 (required for vrs-python)
    brew install postgresql@14
    bash scripts/setup.sh
    

    b. for use on Terra

    SEQREPO_ROOT=~
    bash terra/setup.sh
    

Usage

Manifest

The configuration is controlled by a manifest.yaml file. The manifest file specifies the input VCF file(s), the output directory, and other parameters.

CLI

source venv/bin/activate
# navigate to a working directory, with your manifest.yaml file.  Add the VCF urls or file paths to your manifest

# run the vrs_anvil command in the fore ground
vrs_bulk annotate

# run the vrs_bulk command in parallel, one process per VCF file
vrs_bulk annotate --scatter

# run the vrs_bulk command in parallel in the background
nohup vrs_bulk annotate --scatter & # press enter to continue

# get the status of the scatter processes
vrs_bulk ps

Processing VCF Files (vrs-python)

vrs-python is a GA4GH GKS package centered around creating Variant Representation specification (VRS) IDs: consistent, globally unique identifiers for variation. Some of its functionality includes variant ID translation and VCF annotation. Used as a dependency in vrs_bulk, it can also be used as a standalone package.

For Python usage, see vrs_vcf_annotator.py for an example.

For CLI usage:

python3 -m ga4gh.vrs.extras.vcf_annotation --vcf_in tests/fixtures/1kGP.chr1.1000.vcf --vcf_out annotated_output.vcf.gz --vrs_pickle_out allele_dicts.pkl --seqrepo_root_dir ~/seqrepo/latest

The above is an example using an example vcf. Replace the --vcf_out and vrs_pickle_out here with your desired output file path, where the output vcf can be BCF (vcf.gz) or VCF (vcf)

Terra The command line utility supports Google Cloud URIs and running commands in the background to interop with Terra out-of-the-box. This is described in the CLI usage above. For an example notebook, see vrs-anvil-demo.ipynb on the vrs-anvil workspace.

Contributing

This project is open to contributions from the research community. If you are interested in contributing to the project, please contact the project team. See the contributing guide for more information on how to contribute to the project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for vrs-anvil 0.0.1rc2

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

Source distribution (sdist)

Source distribution for vrs-anvil 0.0.1rc2
File Size Uploaded Provenance Actions
vrs_anvil-0.0.1rc2.tar.gz 25.1 kB Without provenance Details for vrs_anvil-0.0.1rc2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vrs-anvil 0.0.1rc2
File Interpreter ABI Platform Actions
vrs_anvil-0.0.1rc2-py3-none-any.whl Python 3 none any Details for vrs_anvil-0.0.1rc2-py3-none-any.whl

Total release size: 51.7 kB

Release files / vrs_anvil-0.0.1rc2.tar.gz

Download URL vrs_anvil-0.0.1rc2.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
44d08e87b15b492a79a710444fdddb5446a889757a8780592d35f05060d3b13d
BLAKE2b-256 checksum
How to use checksums
ceb1fd9bb61dbb696ae93f9e749e803d622dc0847b0295eda88aaee83b2eeb42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release files / vrs_anvil-0.0.1rc2-py3-none-any.whl

Download URL vrs_anvil-0.0.1rc2-py3-none-any.whl
Size 26.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
396207ae3e1fbf71de27dc4acc5d15ea2c12964cb754e2d3870c7b0f4ba1418a
BLAKE2b-256 checksum
How to use checksums
f963fa2b09c4f80d5bfd9c886ff4403d32b9a16b44ffcb02f4aeabada9903a04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Security for vrs-anvil 0.0.1rc2

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.

Release history Release notifications | RSS feed

This release
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