forked from broadinstitute/seqr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks.py
42 lines (31 loc) · 1.17 KB
/
tasks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xbrowse_server.settings")
from xbrowse_server import xbrowse_controls
from celery import Celery
celery = Celery('tasks', backend='amqp', broker='amqp://')
@celery.task
def annotate_vcf(vcf_file, overwrite):
xbrowse_controls.annotate_vcf(vcf_file, overwrite)
@celery.task
def re_run_vep(vcf_file):
xbrowse_controls.re_run_vep(vcf_file)
#
# New
#
@celery.task
def reload_project(project_id, force_annotations):
xbrowse_controls.reload_project(project_id, force_annotations=force_annotations)
@celery.task
def reload_project_variants(project_id):
xbrowse_controls.reload_project_coverage(project_id)
xbrowse_controls.reload_project_variants(project_id)
@celery.task
def reload_family_variants(project_id, family_id):
xbrowse_controls.reload_family_coverage(project_id, family_id)
xbrowse_controls.reload_family_variants(project_id, family_id)
@celery.task
def reload_cohort_variants(project_id, cohort_id):
xbrowse_controls.reload_cohort_variants(project_id, cohort_id)
@celery.task
def preload_vep_vcf_annotations(vcf_file_path):
xbrowse_controls.preload_vep_vcf_annotations(vcf_file_path)