def test_parse_conservation(cyvcf2_variant): variant = cyvcf2_variant ## GIVEN a variant with some GERP information variant.INFO['GERP++_RS_prediction_term'] = 'Conserved' ## WHEN parsing conservation ## THEN assert that the field is parsed correct assert parse_conservation(variant, 'GERP++_RS_prediction_term') == ['Conserved']
def test_parse_conservation(cyvcf2_variant): variant = cyvcf2_variant ## GIVEN a variant with some GERP information variant.INFO['dbNSFP_GERP___RS'] = 3.7 ## WHEN parsing conservation ## THEN assert that the field is parsed correct assert parse_conservation(variant, 'dbNSFP_GERP___RS') == ['Conserved']
def test_parse_conservation_wrong_term(cyvcf2_variant): variant = cyvcf2_variant ## GIVEN a variant with wrong GERP information variant.INFO['GERP++_RS_prediction_term'] = 'Conservation' ## WHEN parsing conservation ## THEN assert that nothing is returned assert parse_conservation(variant, 'GERP++_RS_prediction_term') == []
def test_parse_conservation_multiple_terms(cyvcf2_variant): variant = cyvcf2_variant ## GIVEN a variant with multiple GERP annotations variant.INFO['GERP++_RS_prediction_term'] = 'Conserved, NotConserved' ## WHEN parsing conservation ## THEN assert that all terms are returned assert parse_conservation(variant, 'GERP++_RS_prediction_term') == ['Conserved', 'NotConserved']
def test_parse_conservation_multiple_terms(cyvcf2_variant): variant = cyvcf2_variant ## GIVEN a variant with multiple GERP annotations variant.INFO['dbNSFP_GERP___RS'] = 3.7, -0.34 ## WHEN parsing conservation ## THEN assert that all terms are returned assert parse_conservation(variant, 'dbNSFP_GERP___RS') == ['Conserved', 'NotConserved']
def test_parse_conservation_multiple_terms(cyvcf2_variant): variant = cyvcf2_variant ## GIVEN a variant with multiple GERP annotations variant.INFO['dbNSFP_GERP___RS'] = 3.7, -0.34 ## WHEN parsing conservation ## THEN assert that all terms are returned assert parse_conservation( variant, 'dbNSFP_GERP___RS') == ['Conserved', 'NotConserved']