ranking-agent / AnswerCoalesce

A TRAPI-compliant component of ARAGORN that groups together similar results.
MIT License
2 stars 0 forks source link

Non-enriched coalescence #78

Closed cbizon closed 2 years ago

cbizon commented 3 years ago

    "message": {
        "query_graph": {
            "edges": {
                "e01": {
                    "object": "n0",
                    "subject": "n1",
                    "predicates": [
                        "biolink:entity_negatively_regulates_entity"
                    ]
                },
                "e02": {
                    "object": "n1",
                    "subject": "n2",
                    "predicates": [
                        "biolink:increases_abundance_of",
                        "biolink:increases_expression_of",
                        "biolink:increases_stability_of",
                        "biolink:increases_uptake_of",
                        "biolink:decreases_degradation_of",
                        "biolink:increases_secretion_of",
                        "biolink:increases_metabolic_processing_of",
                        "biolink:increases_folding_of",
                        "biolink:increases_localization_of",
                        "biolink:increases_synthesis_of",
                        "biolink:increases_response_to",
                        "biolink:increases_splicing_of",
                        "biolink:increases_mutation_rate_of",
                        "biolink:increases_transport_of",
                        "biolink:increases_activity_of",
                        "biolink:increases_molecular_modification_of",
                        "biolink:increases_molecular_interaction"
                    ]
                }
            },
            "nodes": {
                "n0": {
                    "ids": [
                        "NCBIGene:23221"
                    ],
                    "categories": [
                        "biolink:Gene"
                    ]
                },
                "n1": {
                    "categories": [
                        "biolink:Gene"
                    ]
                },
                "n2": {
                    "categories": [
                        "biolink:SmallMolecule"
                    ]
                }
            }
        }
    }
}

A 2 hop. Results: https://arax.ncats.io/?source=ARS&id=77a219c7-1d47-4da8-9df8-4da5c4579dc2

Many of the AC answers don't seem to add a new node. How is that occurring? I assume it's that the enriched node is already in the graph.

It's not a bad idea to allow this kind of thing; maybe we should do it on purpose!

cbizon commented 3 years ago

This is happening because of the error in #77 . But I like the results, so I'm going to implement as a coalescence type. There's an argument to make that the intent should be specified in the query graph, but right now strider doesn't handle is_set=True. When it does, then we can turn this off.