ontodev / robot

ROBOT is an OBO Tool
http://robot.obolibrary.org
BSD 3-Clause "New" or "Revised" License
263 stars 74 forks source link

add option to repair to rewire axioms that are about obsoletes rather than those referencing them #1214

Open cmungall opened 3 months ago

cmungall commented 3 months ago

Given

[Term]
id: CHEBI:0
name: c0
is_a: CHEBI:1

[Term]
id: CHEBI:1
name: c1
is_obsolete: true
replaced_by: CHEBI:2
is_a: CHEBI:3

[Term]
id: CHEBI:2
name: c2

[Term]
id: CHEBI:3
name: c3

running repair will rewire c0 (which points to an obsoleted c1)

however, it will leave in place the axioms about c1:

robot repair  -i t.obo -o t2.obo && cat t2.obo

yields

[Term]
id: CHEBI:0
name: c0
is_a: CHEBI:2 ! c2

[Term]
id: CHEBI:1
name: c1
is_a: CHEBI:3 ! c3
is_obsolete: true
replaced_by: CHEBI:2

[Term]
id: CHEBI:2
name: c2

[Term]
id: CHEBI:3
name: c3

it would be useful have an axiom that rewires c1 is_a c3 => c2 is_a c3