Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ratio related patterns and examples #312

Merged
merged 47 commits into from
Jun 5, 2024
Merged

Add ratio related patterns and examples #312

merged 47 commits into from
Jun 5, 2024

Conversation

rays22
Copy link
Contributor

@rays22 rays22 commented Jan 19, 2024

  1. The purpose of pattern template compound_attributes is to extend PATO with compound qualities, i.e. qualities that are defined by using primitive (I mean existing PATO) qualities.
    The two-component quality is then used in the entity_attribute pattern to define a new term, e.g. digit length ratio.
  2. When there is a ratio-type quality between two other unrelated qualities, like the proportionality of mass and length in BMI, then I propose the use of proportion_of_attributes template to define such OBA attributes.
    Fix Create new 'ratio' DOS-DP pattern template #272 .

ar-ibrahim and others added 30 commits July 20, 2023 15:38
We can further improve the text later.
value: xrefs

equivalentTo:
text: "('proportionality_to'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
text: "('proportionality_to'
text: "'proportionality_to'

equivalentTo:
text: "('proportionality_to'
and ('has_part' some %s)
and ('has_part' some %s))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and ('has_part' some %s))
and ('has_part' some %s)

@rays22
Copy link
Contributor Author

rays22 commented Jan 25, 2024

I have found two TO examples of ratio-type traits that also have logical definitions:

The two classes above appear to defined by the following EQ pattern:

(proportionality to
    and (TO_has_dividend_quality some TRAIT-1)
    and (TO_has_divisor_quality some TRAIT-2)

, where proportionality to, TRAIT-1 and TRAIT-2 are qualities.

The two relationships used in the above TO pattern are defined outside of the OBO Relations Ontology:

  1. TO:has_dividend_quality
  2. TO:has_divisor_quality

I am proposing the pattern

'proportionality_to'
    and ('has_part' some TRAIT-1)
    and ('has_part' some TRAIT-2)
    and ('characteristic_of_part_of' some ENTITY)

or more tersely:

'proportionality_to'
    and ('has_part' some (TRAIT-1 and TRAIT-2)
    and ('characteristic_of_part_of' some ENTITY)

In my suggested pattern I am using the standard RO has part relationship in place of TO:has_dividend_quality and TO:has_divisor_quality.
Please note, that in my model the ratio quality is indifferent about the direction the calculation of a mathematical ratio. For example, the 'sodium to potassium' or 'potassium to sodium' ratios would be part of the same category.

@cmungall
Copy link
Member

This is definitely wrong:

'proportionality_to'
    and ('has_part' some (TRAIT-1 and TRAIT-2)
    and ('characteristic_of_part_of' some ENTITY)

if this doesn't show up as unsatisfiable we are doing something wrong

This has cryptic incoherencies:

'proportionality_to'
    and ('has_part' some TRAIT-1)
    and ('has_part' some TRAIT-2)
    and ('characteristic_of_part_of' some ENTITY)

It loses directionality so {increased, decreased} x {A:B, B:A} become indistinguishable

@rays22
Copy link
Contributor Author

rays22 commented Jan 26, 2024

This is definitely wrong:

'proportionality_to'
    and ('has_part' some (TRAIT-1 and TRAIT-2)
    and ('characteristic_of_part_of' some ENTITY)

if this doesn't show up as unsatisfiable we are doing something wrong

This has cryptic incoherencies:

'proportionality_to'
    and ('has_part' some TRAIT-1)
    and ('has_part' some TRAIT-2)
    and ('characteristic_of_part_of' some ENTITY)

It loses directionality so {increased, decreased} x {A:B, B:A} become indistinguishable

@cmungall, thanks for your feedback.
I gather from your comment that we need directionality in the trait ratio pattern to be interoperable with uPheno phenotypes.
I am wondering if I should request new RO terms equivalent to

  1. TO:has_dividend_quality
  2. TO:has_divisor_quality
    and use an EQ based on the TO pattern above or do you have something else in mind that would work better?

@cmungall
Copy link
Member

cmungall commented Jan 26, 2024 via email

@rays22
Copy link
Contributor Author

rays22 commented Feb 21, 2024

There are two term requests in RO that look relevant to the modelling of qualities emerging from two qualities that are in a ratio/proportion relationship:

  • Adding the now deprecated relation "has divisor entity" from PATO #774
  • Adding the now deprecated relation "has dividend entity" from PATO #775

@rays22
Copy link
Contributor Author

rays22 commented Feb 27, 2024

The resolution of this PR depends on oborel/obo-relations#792 .

@matentzn
Copy link
Contributor

We need this pattern now for another project, is there anything left to finalise it @rays22 ?

@rays22
Copy link
Contributor Author

rays22 commented Mar 27, 2024

We need this pattern now for another project, is there anything left to finalise it @rays22 ?

@matentzn ,
The resolution of this issue depends on a new RO release.

@matentzn
Copy link
Contributor

@anitacaron can you make one soon?

@anitacaron
Copy link

yes, I just need to finish reviewing some PRs, and I'll make one.

@matentzn
Copy link
Contributor

matentzn commented May 1, 2024

@rays22 can you bring the PR to conclusion soon? We need it for a major project coming up in OBA in the next weeks

@anitacaron
Copy link

I'm still waiting for another person to approve the RO release.

@cmungall
Copy link
Member

cmungall commented May 1, 2024 via email

@rays22 rays22 marked this pull request as draft May 17, 2024 14:12
Remove unnecessary DOS-DP templates, because the patterns they are intended for will be dealt by other templates.
Rename ratio related DOS-DP templates.
This commit intends to
1. Update the attribute_ratio DOS-DP templates.
2. Add some ratio-type trait examples to test the templates.
If applied, this commit will fix #312.
If applied, this commit will fix #312.
If applied, this commit will fix #312.
If applied, this commit will fix #312.
@rays22 rays22 marked this pull request as ready for review May 21, 2024 21:11
text: "('ratio'
and ('has_numerator' some %s)
and ('has_denominator' some %s))
and ('characteristic_of_part_of' some 'anatomical_entity')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not totally sure why this clause is here but I'm sure it's OK

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also would like a reminder!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose is to limit to the classes to systems that are relevant to OBA (and make them subclasses of OBA:0000001). I want to avoid grouping urinary sodium to potassium ratio together with some sea water sodium to potassium ratio measurement class, for example in Ubergraph. Also, without the ('characteristic_of_part_of' some 'anatomical_entity') part, I am getting some new ratio terms (see the examples in attributes_ratio.tsv) that are not subclasses of OBA:0000001 and are flagged up as biological attribute child violation error by the QC pipeline.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smart, its so unfortunate that this is necessary in OWL (its because of the tree model property which makes it impossible to constrain how references entities within an expression are related).

The same logic should be considered for abnormal chemical (without "in location") patterns.

@rays22 rays22 merged commit 73a5d74 into master Jun 5, 2024
2 checks passed
@rays22 rays22 deleted the ratio-test1 branch June 5, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clinical laboratory measurement traits Logical Observation Identifiers Names and Codes related traits gwas trait
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Create new 'ratio' DOS-DP pattern template
6 participants