Skip to main content

Annobee

About The Project

annobee is designed to analyze genetic variants to determine their pathogenicity using multiple established criteria. It integrates several functions to set various genetic criteria based on evolutionary conservation, allele frequency, and ACMG/AMP standards. The main functionality is centralized in the main.py.

(back to top)

Built With

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Requirements

  • flask==2.0.1
  • numpy==1.23.5
  • pandas==1.5.3
  • requests==2.25.1
  • tqdm==4.65.0

Installation

  1. Clone the repo
    git clone https://github.com/variantAnnotation/annobee-sdk.git
  2. Follow to directory where you clone the repo:
    cd annobee-sdk
  3. Install requirements and dependencies:
    pip install -r requirements.txt

(back to top)

Usage

Starting the Flask API

To start the Flask API that the SDK communicates with:

python app.py

Command-Line Interface

To use the annobee-sdk, you can execute the CLI tool with various options to evaluate genetic variant criteria.

Example 1: Evaluate Specific Criteria (PS1)

python cli.py 1-14973-A-AG --endpoint http://localhost:5000/api/interpret -ps1

Example 2: Evaluate All Criteria

python cli.py 1-14973-A-AG --endpoint http://localhost:5000/api/interpret -all

Using the Annobee Class in a Python Script

Here's an example script that evaluates multiple variants using the Annobee class:

import json
from cli import Annobee

def evaluate_variant(annobee, variant, criteria):
    variant_info = annobee.get_criteria(variant)
    results = {}
    
    if criteria == 'all':
        results = annobee.get_all(variant_info)
    else:
        for criterion in criteria:
            if criterion == 'PS1':
                results['PS1'] = annobee.get_ps1(variant_info)
            elif criterion == 'PM5':
                results['PM5'] = annobee.get_pm5(variant_info)
            elif criterion == 'BP7':
                results['BP7'] = annobee.get_bp7(variant_info)
            elif criterion == 'PVS1':
                results['PVS1'] = annobee.get_pvs1(variant_info)
            # Add more criteria as needed
            
    return results

if __name__ == '__main__':
    # Set the endpoint
    endpoint = 'http://localhost:5000/api/interpret'
    annobee = Annobee(endpoint=endpoint)

    # List of variants
    variants = [
        '1-14973-A-AG',
        '2-23214-G-T',
        '3-45321-C-A',
        '4-55423-T-G',
        '5-67432-A-C'
    ]

    # Evaluate one criterion for one variant
    print("Evaluating one criterion (PS1) for one variant:")
    result_one_criterion = evaluate_variant(annobee, variants[0], ['PS1'])
    print(json.dumps(result_one_criterion, indent=4))

    # Evaluate three criteria for one variant
    print("\nEvaluating three criteria (PS1, PM5, BP7) for one variant:")
    result_three_criteria = evaluate_variant(annobee, variants[0], ['PS1', 'PM5', 'BP7'])
    print(json.dumps(result_three_criteria, indent=4))

    # Evaluate all criteria for one variant
    print("\nEvaluating all criteria for one variant:")
    result_all_criteria = evaluate_variant(annobee, variants[0], 'all')
    print(json.dumps(result_all_criteria, indent=4))

Running the Test Script

Ensure your Flask API is running and that the cli.py script with the Annobee class is in the same directory or properly installed. Then run the test.py script:

python test.py

This will print the results of evaluating both one criterion, three criteria, and all criteria for the first variant in the list using the specified endpoint. Adjust the criteria and variant list as needed for your specific use case.

(back to top)

Roadmap

  • Adding testing metrics regarding the performance of the platform

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Metadata

Release files for annobee 0.6.1

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

Source distribution (sdist)

Source distribution for annobee 0.6.1
File Size Uploaded
annobee-0.6.1.tar.gz 5.9 kB Details

Built distribution (wheel)

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

Total release size: 21.3 kB

Release files / annobee-0.6.1.tar.gz

Download URL annobee-0.6.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
92bb2bbb44fa6e73fef7a1506985d7a74239877493b3952e5348c70b77e64f74
BLAKE2b-256 checksum
How to use checksums
341b4af4617edc38a9f6d43b280900e06909aad777cc20ea1669c34ff885ba68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / annobee-0.6.1-py3-none-any.whl

Download URL annobee-0.6.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b666e5c5d9e1ff1b8643d742a2f73efc59317e21ffe8e83abe10da343640013
BLAKE2b-256 checksum
How to use checksums
6a2c9f9417f59ccb7f750162d13b1fe34077517a912d77fdd4afde9a8fa4d88f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

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