def test_go_rule26(): config = assocparser.AssocParserConfig(ontology=ontology, paint=True, rule_set=assocparser.RuleSet.ALL) assoc = make_annotation(goid="GO:1234567", evidence="IBA").associations[0] # Pass due to IBA in paint test_result = qc.GoRule26().test(assoc, config) assert test_result.result_type == qc.ResultType.PASS config = assocparser.AssocParserConfig(ontology=ontology, paint=False, rule_set=assocparser.RuleSet.ALL) assoc = make_annotation(goid="GO:1234567", evidence="IPI").associations[0] # Pass due to non IBA test_result = qc.GoRule26().test(assoc, config) assert test_result.result_type == qc.ResultType.PASS config = assocparser.AssocParserConfig(ontology=ontology, paint=False, rule_set=assocparser.RuleSet.ALL) assoc = make_annotation(goid="GO:1234567", evidence="IBA").associations[0] # Fail due to non paint test_result = qc.GoRule26().test(assoc, config) assert test_result.result_type == qc.ResultType.ERROR
def test_go_rule26(): config = assocparser.AssocParserConfig(ontology=ontology, paint=True) a = make_annotation("GO:BLAHBLAH", "IBA") a[8] = "P" a[3] = "" assoc = gafparser.to_association(a).associations[0] # Pass due to IBA in paint test_result = qc.GoRule26().test(assoc, config) assert test_result.result_type == qc.ResultType.PASS config = assocparser.AssocParserConfig(ontology=ontology, paint=False) a = make_annotation("GO:BLAHBLAH", "IPI") a[8] = "P" a[3] = "" assoc = gafparser.to_association(a).associations[0] # Pass due to non IBA test_result = qc.GoRule26().test(assoc, config) assert test_result.result_type == qc.ResultType.PASS config = assocparser.AssocParserConfig(ontology=ontology, paint=False) a = make_annotation("GO:BLAHBLAH", "IBA") a[8] = "P" a[3] = "" assoc = gafparser.to_association(a).associations[0] # Pass due to non IBA test_result = qc.GoRule26().test(assoc, config) assert test_result.result_type == qc.ResultType.ERROR
def test_go_rule26(): config = assocparser.AssocParserConfig(ontology=ontology, paint=True) a = make_annotation("GO:BLAHBLAH", "IBA") # Pass due to IBA in paint test_result = qc.GoRule26().test(a, config) assert test_result.result_type == qc.ResultType.PASS config = assocparser.AssocParserConfig(ontology=ontology, paint=False) a = make_annotation("GO:BLAHBLAH", "ANY") # Pass due to non IBA test_result = qc.GoRule26().test(a, config) assert test_result.result_type == qc.ResultType.PASS config = assocparser.AssocParserConfig(ontology=ontology, paint=False) a = make_annotation("GO:BLAHBLAH", "IBA") # Pass due to non IBA test_result = qc.GoRule26().test(a, config) assert test_result.result_type == qc.ResultType.ERROR