Beispiel #1
0
def test_gorule43():
    a = ["blah"] * 15
    a[3] = ""
    a[5] = "GO_REF:0000024"
    a[6] = "ISO"
    a[8] = "P"
    assoc = gafparser.to_association(a).associations[0]

    config = assocparser.AssocParserConfig(
        goref_metadata={
            "goref-0000024": {
                "authors":
                "Pascale Gaudet, Michael Livstone, Paul Thomas, The Reference Genome Project",
                "id": "GO_REF:0000024",
                "evidence_codes": ["ECO:0000266"]
            }
        })

    test_result = qc.GoRule43().test(assoc, config)
    assert test_result.result_type == qc.ResultType.PASS

    assoc.evidence.type = "ECO:0000501"
    test_result = qc.GoRule43().test(assoc, config)
    assert test_result.result_type == qc.ResultType.WARNING

    assoc.evidence.type = "ECO:0000266"
    assoc.evidence.has_supporting_reference = "FOO:123"
    test_result = qc.GoRule43().test(assoc, config)
    assert test_result.result_type == qc.ResultType.PASS
Beispiel #2
0
def test_gorule43():
    assoc = make_annotation(references="GO_REF:0000024",
                            evidence="ISO").associations[0]

    config = assocparser.AssocParserConfig(goref_metadata={
        "goref-0000024": {
            "authors":
            "Pascale Gaudet, Michael Livstone, Paul Thomas, The Reference Genome Project",
            "id": "GO_REF:0000024",
            "evidence_codes": ["ECO:0000266"]
        }
    },
                                           rule_set=assocparser.RuleSet.ALL)

    test_result = qc.GoRule43().test(assoc, config)
    assert test_result.result_type == qc.ResultType.PASS

    assoc.evidence.type = Curie.from_str("ECO:0000501")
    test_result = qc.GoRule43().test(assoc, config)
    assert test_result.result_type == qc.ResultType.WARNING

    assoc.evidence.type = Curie.from_str("ECO:0000266")
    assoc.evidence.has_supporting_reference = [Curie.from_str("FOO:123")]
    test_result = qc.GoRule43().test(assoc, config)
    assert test_result.result_type == qc.ResultType.PASS
Beispiel #3
0
def test_gorule43():
    a = ["blah"] * 16
    a[5] = "GO_REF:0000024"
    a[6] = "ISO"

    config = assocparser.AssocParserConfig(
        goref_metadata={
            "goref-0000024": {
                "authors":
                "Pascale Gaudet, Michael Livstone, Paul Thomas, The Reference Genome Project",
                "id": "GO_REF:0000024",
                "evidence_codes": ["ECO:0000266"]
            }
        })

    test_result = qc.GoRule43().test(a, config)
    assert test_result.result_type == qc.ResultType.PASS

    a[6] = "FOO"
    test_result = qc.GoRule43().test(a, config)
    assert test_result.result_type == qc.ResultType.WARNING

    a[6] = "ISO"
    a[5] = "FOO:123"
    test_result = qc.GoRule43().test(a, config)
    assert test_result.result_type == qc.ResultType.PASS