pantherdb / pango

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Create "evidence_type" field for IBA annotations #5

Open dustine32 opened 1 year ago

dustine32 commented 1 year ago

To flag whether an IBA annotation is directly supported, meaning there is an experimental annotation to the IBA's gene included in the IBA's evidence. For example:

    {
        "gene": "UniProtKB:P15036",
        "gene_symbol": "ETS2",
        "gene_name": "Protein C-ets-2",
        "term": "GO:0006357",
        "slim_terms": [
            "GO:0006355"
        ],
        "qualifiers": "involved_in",
        "evidence": [
            {
                "with_gene_id": "UniProtKB:Q15723",
                "references": [
                    "PMID:14970218",
                    "PMID:8756667"
                ]
            },
            {
                "with_gene_id": "UniProtKB:P15036",
                "references": [
                    "PMID:11909962",
                    "PMID:12637547"
                ]
            },
        ]
    }

Here you can see that the "gene" value UniProtKB:P15036 matches its second evidence object's "with_gene_id" value. So, in python:

for ev in annot["evidence"]:
    if annot["gene"] == ev["with_gene_id"]:
        is_direct = True

Whenever is_direct is true, we will set a new annotation field evidence_type to "direct". If is_direct is false, we will set it to "homology".

dustine32 commented 1 year ago

More example annotations that are directly supported:

dustine32 commented 1 year ago

@tmushayahama Here are my notes on displaying direct evidence as discussed on 2022-11-21 call:

dustine32 commented 1 year ago

Commit 88b85cb should ensure the direct evidence (if any exists) is the first element in the evidence list.