GeneBe API
This page briefly describes the GeneBe API, which can be utilized for various purposes:
- If you need to annotate a VCF file using the API, we recommend using the Java client available at https://github.com/pstawinski/genebe-cli . Read more here .
- If you intend to annotate variants in a Python script, such as with Pandas, we suggest using the Python library also accessible at https://pygenebe.readthedocs.io/en/latest/. Read more here .
- For other specific requirements, you may opt to generate a client yourself by referring to the Open API documentation at https://api.genebe.net/cloud/gb-api-doc/swagger-ui/index.html .
We encourage you to review the brief description below, which outlines the main endpoints.
Introduction
GeneBe provides a user-friendly API for genetic variant annotation. You can use one of two key endpoints: a GET query for single variant annotation and a POST query for batch annotation. We'll explore the details of this API, its advantages, and how to use it effectively.
Endpoints for Genetic Variant Annotation
You can read more about Variant Annotation here.
GET Endpoint for Single Variant (/api-public/v1/variant
)
Ideal for individual variant annotation.
Example Usage without Logging In:
curl -X 'GET' \
'https://api.genebe.net/cloud/api-public/v1/variant?chr=6&pos=160585140&ref=T&alt=G&genome=hg38' \
-H 'Accept: application/json'
You can easily see the results in browser: https://api.genebe.net/cloud/api-public/v1/variant?chr=6&pos=160585140&ref=T&alt=G&genome=hg38
Example Usage with an API key:
curl -X 'GET' -u YOUR_EMAIL:YOUR_API_KEY \
'https://api.genebe.net/cloud/api-public/v1/variant?chr=6&pos=160585140&ref=T&alt=G&genome=hg38' \
-H 'Accept: application/json'
POST Endpoint for Batch Annotation (/api-public/v1/variants
)
If you need to annotate multiple variants it is recommended to use POST endpoint. It works with multiple variants in batches (up to 1000).
Example Usage Without Logging In:
curl -X 'POST' \
'https://api.genebe.net/cloud/api-public/v1/variants?genome=hg38' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '[{"chr":"22", "pos":28695868, "ref":"AG", "alt":"A"}]'
Example Usage with an API key:
curl -X 'POST' -u YOUR_EMAIL:YOUR_API_KEY \
'https://api.genebe.net/cloud/api-public/v1/variants?genome=hg38' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '[{"chr":"22", "pos":28695868, "ref":"AG", "alt":"A"}]'
GeneBe Python client
There is an experimental python API client, available on PyPI.
Read more here.
API Limits and Registration
GeneBe enforces daily query limits per IP address. To access more queries, it's recommended to:
- Register an account on GeneBe.
- Create an API key on your profile page.
- Use Basic Authorization with your email as the username and the API key as the password in your API requests.
Read more here.
If you require annotation for hundreds of thousands of variants daily, please contact us.
Detailed Open API documentation
For more comprehensive information, you can refer to the automatically generated GeneBe Rest API documentation .