Beispiel #1
0
def test_go_rule_07():

    assoc = make_annotation(goid="GO:0003824", evidence="IPI").associations[0]

    test_result = qc.GoRule07().test(assoc, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.WARNING

    assoc.object.id = Curie.from_str("GO:1234567")
    test_result = qc.GoRule07().test(assoc, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.PASS

    assoc.object.id = Curie.from_str("GO:0003824")
    assoc.evidence.type = "ECO:0000501" # Not IPI
    test_result = qc.GoRule07().test(assoc, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.PASS
Beispiel #2
0
def test_go_rule_07():
    a = ["blah"] * 16
    a[4] = "GO:0003824"
    a[6] = "IPI"

    test_result = qc.GoRule07().test(
        a, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.WARNING

    a[4] = "GO:1234567"
    test_result = qc.GoRule07().test(
        a, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.PASS

    a[4] = "GO:0003824"
    a[6] = "BLA"
    test_result = qc.GoRule07().test(
        a, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.PASS
Beispiel #3
0
def test_go_rule_07():
    a = ["blah"] * 15
    a[3] = ""
    a[4] = "GO:0003824"
    a[6] = "IPI"
    a[8] = "F"
    a[13] = "20200303"
    assoc = gafparser.to_association(a).associations[0]

    test_result = qc.GoRule07().test(assoc, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.WARNING

    assoc.object.id = "GO:1234567"
    test_result = qc.GoRule07().test(assoc, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.PASS

    assoc.object.id = "GO:0003824"
    assoc.evidence.type = "ECO:0000501" # Not IPI
    test_result = qc.GoRule07().test(assoc, assocparser.AssocParserConfig(ontology=ontology))
    assert test_result.result_type == qc.ResultType.PASS