A ClinVar API submission helper written in FastAPI.
A running instance of the service is available at https://preclinvar.scilifelab.se/docs
Transforms tsv submission files (Variant.tsv and CaseData.tsv) into a json submission object, ready to be used to submit via the ClinVar API. This document is validated against the ClinVar API submission schema
Transforms csv submission files (Variant.csv and CaseData.csv) into a json submission object, ready to be used to submit via the ClinVar API. This document is validated against the ClinVar API submission schema
Proxy endpoint to the ClinVar submissions API (dry-run): https://submit.ncbi.nlm.nih.gov/api/v1/submissions/?dry-run=true. Requires a valid API key and a json file containing a submission object. If the request is valid (and the json submission object is validated) returns a response with code 200 and json body with the message value "success".
Proxy endpoint to the validation API endpoint: (apitest) "https://submit.ncbi.nlm.nih.gov/apitest/v1/submissions". Requires a valid API key and a json file containing a submission object. If the json submission document is valid returns a submission ID which can be used for a real submission. If the json submission document is not validated, the endpoint returns a list of errors which will help fixing the document.
An example containing a demo setup for the app is included in the docker-compose file. Start the docker-compose demo using this command:
docker-compose up -d
The server will be running and accepting requests sent from outside the container (another terminal or a web browser) on port 7000 (http://0.0.0.0:7000)
Given a conda environment containing Python 3.9 and poetry, clone the repository from Github with the following command:
git clone https://github.com/Clinical-Genomics/preClinVar.git
The command will create a folder named preClinVar
in your current working directory. Move inside this directory:
cd preClinVar
And install the software with poetry:
poetry install
You can run an instance of the server by typing:
uvicorn preClinVar.main:app --reload --log-level debug
The server will run on localhost and default port 8000 (http://127.0.0.1:8000)
The endpoints will be available under the docs: http://127.0.0.1:8000/docs (http://127.0.0.1:7000/docs if you are running the dockerized version of the app). They can be tested with files provided in this repository, in the demo folder: https://github.com/Clinical-Genomics/preClinVar/tree/main/preClinVar/demo