-
Notifications
You must be signed in to change notification settings - Fork 10
/
test_beacon.py
36 lines (26 loc) · 1.17 KB
/
test_beacon.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
from __future__ import absolute_import
from .helper import SolveBioTestCase
class BeaconTests(SolveBioTestCase):
TEST_DATASET_FULL_PATH = 'solvebio:public:/ClinVar/3.7.4-2017-01-30/Variants-GRCh37' # noqa
def test_beacon_request(self):
"""
Check that current Clinvar/Variants returns correct
fields for beacon
"""
dataset = self.client.Object.get_by_full_path(
self.TEST_DATASET_FULL_PATH)
beacon = dataset.beacon(chromosome='6',
coordinate=51612854, # staging
allele='G')
check_fields = ['query', 'exist', 'total']
for f in check_fields:
self.assertTrue(f in beacon)
# Check that Clinvar/Variants version 3.7.0-2015-12-06
# returns true for specific case
dataset = self.client.Object.get_by_full_path(
self.TEST_DATASET_FULL_PATH)
beacontwo = dataset.beacon(chromosome='13',
coordinate=113803460,
allele='T')
self.assertTrue(beacontwo['exist'])
self.assertEqual(beacontwo['total'], 1)