예제 #1
0
def test_gorule50():
    a = "PMID:21873635"
    assoc = make_annotation(db="HELLO", db_id="123", evidence="ISS", withfrom="HELLO:123").associations[0]

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

    assoc.subject.id = Curie.from_str("BYE:567")
    test_result = qc.GoRule50().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS

    # Not ISS, so fine to have repeated columns
    assoc.subject.id = Curie.from_str("HELLO:123")
    assoc.evidence.type = Curie.from_str("ECO:0000501")
    test_result = qc.GoRule50().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS
예제 #2
0
def test_gorule50():
    a = ["blah"] * 16
    a[6] = "ISS"
    a[1] = "HELLO:123"
    a[7] = "HELLO:123"

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

    a[1] = "BYE:567"
    test_result = qc.GoRule50().test(a, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS

    a[1] = "HELLO:123"
    a[6] = "BLA"
    # Not ISS, so fine to have repeated columns
    test_result = qc.GoRule50().test(a, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS
예제 #3
0
def test_gorule50():
    a = ["blah"] * 15
    a[0] = "HELLO"
    a[1] = "123"
    a[3] = ""
    a[6] = "ISS"
    a[7] = "HELLO:123"
    a[8] = "P"
    assoc = gafparser.to_association(a).associations[0]

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

    assoc.subject.id = "BYE:567"
    test_result = qc.GoRule50().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS

    a[1] = "HELLO:123"
    a[6] = "ECO:0000501"
    # Not ISS, so fine to have repeated columns
    test_result = qc.GoRule50().test(assoc, assocparser.AssocParserConfig())
    assert test_result.result_type == qc.ResultType.PASS