Exemple #1
0
def test_gorule55():
    a = ["blah"] * 15
    a[0] = "HELLO"
    a[1] = "123"
    a[3] = ""
    a[5] = "GO:0012345|PMID:1234567"
    a[6] = "ISS"
    a[7] = "HELLO:123"
    a[8] = "P"
    a[12] = "taxon:12345"
    a[13] = "20200303"
    assoc = make_annotation(db="HELLO",
                            db_id="123",
                            references="GO:0012345|PMID:1234567",
                            evidence="ISS",
                            withfrom="HELLO:123").associations[0]

    test_result = qc.GoRule55().test(assoc, all_rules_config())
    assert test_result.result_type == qc.ResultType.PASS

    assoc.evidence.has_supporting_reference = [
        association.Curie.from_str("GO:0001234"),
        association.Curie.from_str("GO:123456")
    ]
    test_result = qc.GoRule55().test(assoc, all_rules_config())
    assert test_result.result_type == qc.ResultType.WARNING
Exemple #2
0
def test_gorule55():
    a = ["blah"] * 15
    a[0] = "HELLO"
    a[1] = "123"
    a[3] = ""
    a[5] = "GO:0012345|GO:1234567"
    a[6] = "ISS"
    a[7] = "HELLO:123"
    a[8] = "P"
    a[13] = "20200303"
    assoc = gafparser.to_association(a).associations[0]

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

    assoc.evidence.has_supporting_reference = ["GO:0001234", "PMID:123456"]
    test_result = qc.GoRule55().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS