sssom-py icon indicating copy to clipboard operation
sssom-py copied to clipboard

Add filter-negative common

Open cmungall opened this issue 2 years ago • 0 comments

We want to make idiot-proof versions of sssom files

Context from paper:

Mappings are not idempotent: adding a column to a mapping table could change its semantics. The hardest design decision to make was regarding the modifiers on “predicate_id”. There are many use cases for modifiers, such as negation: you want to be able to say that UBERON:0002101 is NOT a skos:exactMatch to FMA:54448. After debates during our 1st Workshop on SSSOM (15), we decided to add a “predicate_modifier” element to SSSOM which allows such encodings. The alternative would have been to introduce additional syntax (e.g. !skos:exactMatch) or additional predicates like “example:notExactMatch”. The former solution (!skos:exactMatch) is a violation of the “simplicity” requirement because it introduces the need to handle special syntax on the user side. The latter solution would have led to a potential doubling of all predicates - which could have led to a combinatorial explosion if it had to capture additional modifiers, such as “direct” or “inverse”. The main limitation, and risk, of our chosen approach is that users that consume SSSOM may simply believe that the mappings they consume do not have a predicate modifier (because they never had in the past), and therefore not notice that they suddenly consume “negative” or otherwise modified mappings. We decided that this risk was worth it to keep the model simple and easy to use. A second example where we violate idempotency is with our “preprocessing” columns - ignoring the “preprocessing” column when interpreting the “match_field” columns could lead to confusing results. For example, “Alzheimer 2” and “Alzheimer 3” are different concepts, but if the non-alphabetical characters were stripped during pre-processing, they would be (misleadingly) matched.

We want a command that removes any rows with non-defaults for semantics-modifying fields

cmungall avatar Dec 04 '21 23:12 cmungall