-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from Ensembl/vep_support_path
Dynamically generate VEP support paths.
- Loading branch information
Showing
6 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import requests | ||
|
||
import logging | ||
from requests import HTTPError | ||
|
||
from core.config import WEB_METADATA_API, VEP_SUPPORT_PATH | ||
from core.logging import InterceptHandler | ||
|
||
logging.getLogger().handlers = [InterceptHandler()] | ||
|
||
|
||
def get_vep_support_location(genome_id): | ||
try: | ||
response = requests.get( | ||
WEB_METADATA_API | ||
+ "genome/" | ||
+ genome_id | ||
+ "/dataset/genebuild/attributes?attribute_names=vep.bgz_location" | ||
) | ||
response.raise_for_status() | ||
return VEP_SUPPORT_PATH + response.json()["attributes"].pop()["value"] | ||
except HTTPError as http_error: | ||
logging.debug(http_error) | ||
raise HTTPError | ||
except Exception as e: | ||
logging.debug(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
version: '2' | ||
services: | ||
tools_api: | ||
env_file: | ||
- ./app/.env | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
|