コード例 #1
0
ファイル: test_variant_utils.py プロジェクト: terestahl/scout
def test_clinsig_human_no_clnsig():
    ## GIVEN a variant with clinsig info
    var_obj = {}
    ## WHEN getting the clinsig
    clinsigs = clinsig_human(var_obj)
    ## THEN assert there where no objects returned
    i = 0
    for i, obj in enumerate(clinsigs, 1):
        pass
    assert i == 0
コード例 #2
0
def test_clinsig_human_no_accession():
    ## GIVEN a variant with clinsig info wothout accession number
    var_obj = {
        "clnsig": [{"value": "Likely benign", "revstat": "criteria_provided, single submitter"}]
    }
    ## WHEN getting the clinsig
    clinsigs = clinsig_human(var_obj)
    ## THEN assert there where no objects returned since we skip those wothout accession
    i = 0
    for i, obj in enumerate(clinsigs, 1):
        pass
    assert i == 0
コード例 #3
0
ファイル: test_variant_utils.py プロジェクト: terestahl/scout
def test_clinsig_human():
    ## GIVEN a variant with clinsig info
    var_obj = {
        "clnsig": [{
            "value": "Likely benign",
            "accession": 335067,
            "revstat": "criteria_provided, single submitter",
        }]
    }
    ## WHEN getting the clinsig
    clinsigs = clinsig_human(var_obj)
    ## THEN assert there where no objects returned
    clinsig_obj = next(clinsigs)
    assert clinsig_obj["human"] == "Likely benign"
    assert clinsig_obj[
        "link"] == "https://www.ncbi.nlm.nih.gov/clinvar/variation/335067"