Skip to main content

No project description provided

Project description

About The Project

annobee-sdk 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

(back to top)

Getting Started

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

Prerequisites

  • Python: Download Python here.

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

Downloading annobee

pip install annobee

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)

annobee 1-14973-A-AG -ps1

It returns :

  { "PS1": 0 }

Example 2: Evaluate Specific Criterias more then One (PS1, BP7, PP2 etc)

annobee 1-14973-A-AG -ps1

It returns :

   {
    "PS1": 0,
    "BP7": 1,
    "PP2": 0,
    "BS1": 0,
    "PP5": 0
} 

Example 3: Evaluate All Criteria and pathogenicity

annobee 1-14973-A-AG -all

It returns :


    {"PS1": 0,
    "PM5": 0,
    "BP7": 1,
    "PVS1": 1,
    "BP1": 0,
    "PP2": 0,
    "PS4": 0,
    "BS1": 0,
    "BS2": 1,
    "PM2": 0,
    "PM1": 0,
    "PP5": 0,
    "BP6": 0,
    "BA1": 1,
    "PP3": 0,
    "BP4": 1,
    "PM4": 1,
    "BP3": 0,
    "VA_PATHOGENICITY": "Pathogenic"}

(back to top)

Usage as python library

Here's a simple script that evaluates multiple variants using the annobee SDK:

import json
from annobee 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))

Roadmap

  • [ ] Adding testing metrics regarding the performance of the platform

(back to top)

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

(back to top)

License

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

(back to top)

Python

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

annobee-0.5.8.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

annobee-0.5.8-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file annobee-0.5.8.tar.gz.

File metadata

  • Download URL: annobee-0.5.8.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for annobee-0.5.8.tar.gz
Algorithm Hash digest
SHA256 8b8268f6e3f71d36ae5198c4dfc1e628af3597b8d80ee051c13f5c93ce1472c2
MD5 972ff633341b002045de1e64a71a7966
BLAKE2b-256 728c283f96f0103ca72e78dfd2aabfed6687456b542e0d325fa4bc5a75ab4f37

See more details on using hashes here.

File details

Details for the file annobee-0.5.8-py3-none-any.whl.

File metadata

  • Download URL: annobee-0.5.8-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for annobee-0.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d256045fc333ab939fbcb36a3ad3914eee4a35b3a0a0efec7a5712041813ffab
MD5 b5458172aa103b6db8bdd5c025cecb84
BLAKE2b-256 7665d5c615eeec36e4f2dc89875070db83256b653b38113356bae2cedd1945dc

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