Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,5 @@ src/ontology/reports/xrefs.tsv
src/ontology/imports/*.json
/src/metadata
src/mappings/*.owl
.claude/
.claude/settings.local.json
33 changes: 33 additions & 0 deletions docs/pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,39 @@ Pattern names like `abnormalAnatomicalEntity.yaml` define:

The pipeline matches these patterns against species phenotype ontologies to find which terms match which patterns, then uses the matches to build the uPheno intermediate layer.

### DOSDP TSV filler data

Filler data lives in `src/patterns/data/default/` (hand-curated) and `src/patterns/data/automatic/` (generated).

Each TSV has a `defined_class` column (the IRI) plus columns for each pattern variable. dosdp-tools supports special override columns to set per-row annotations on the defined class:

| Column | Effect |
|--------|--------|
| `defined_class_name` | Override the pattern-generated label |
| `defined_class_definition` | Override the pattern-generated definition |
| `defined_class_comment` | Add rdfs:comment |
| `defined_class_exact_synonym` | Add exact synonym |
| `defined_class_narrow_synonym` | Add narrow synonym |
| `defined_class_broad_synonym` | Add broad synonym |
| `defined_class_related_synonym` | Add related synonym |
| `defined_class_namespace` | Set OBO namespace |

These are defined in the DOSDP spec (`PrintfAnnotationOBO.overrides` in dosdp-tools source).

### Source of truth for OWL components

All OWL files in `src/ontology/components/` are **generated** — never edit them directly. Sources of truth:

| Component | Source |
|-----------|--------|
| `upheno-top.owl` | `src/templates/phenotype-top-level.tsv` (ROBOT template) |
| `upheno-manual-curation.owl` | `src/templates/upheno-ssspo-groupings-no-eq.tsv` + `phenotypes-without-patterns.tsv` |
| `upheno-alignments.owl` | `src/templates/upheno-ssspo-alignments-no-eq.tsv` + `phenotype-alignments.tsv` + `root-alignments.tsv` |
| `upheno-species-neutral.owl` | DOSDP pipeline output (`upheno_layer.owl`) |
| `upheno-mappings.owl` | SSSOM mapping files in `src/mappings/` |
| `upheno-bridge.owl` | SPARQL construct over species-independent mappings |
| `upheno-deprecated.owl` | `src/templates/obsolete.tsv` |

## Pipeline Phases (from `upheno.Makefile`)

1. **`prepare_patterns_for_matching`**: Copies patterns from `dosdp-dev/` to `curation/patterns-for-matching/`
Expand Down
4 changes: 2 additions & 2 deletions src/patterns/data/default/phenotype.tsv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
defined_class defined_class_name bearer
http://purl.obolibrary.org/obo/UPHENO_0001001 phenotype owl:Thing
defined_class defined_class_name bearer defined_class_definition
http://purl.obolibrary.org/obo/UPHENO_0001001 phenotypic effect owl:Thing An observable characteristic of an organism expressed as a deviation, alteration, or qualified state relative to a reference condition, resulting from genetic, environmental, or gene-environment influences.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@sbello this is the important part

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

By defining 'phenotypic effect' this way and getting rid of phenotype the MP header terms (adipose tissue phenotype, behavior/neurological phenotype, etc) will no longer fall under this term. The MP header terms are all effect neutral and MGI uses annotations to them to capture normal phenotypes. The MP has these defined as 'the observable morphological and physiological characteristics of X that are manifested through development and lifespan' where manifested is doing the work of differentiating between the trait (the characteristic in potentia, e.g. eye color) and the phenotype (the characteristic we actually see, e.g. blue eyes).

Or is the intent that 'qualified state' covers the qualification 'normal'? I think we may need a note on this term to clarify what is meant. I do see further down the file the term 'normal meiosis phenotype' so possibly the intent is to cover normals?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Discussed this with Nico, the intention is that qualified does cover any type of phenotype and is meant to do the work of distinguishing between the trait (e.g. eye color) and the phenotype (e.g. brown eyes). We should add a comment to this term to clarify the intent and scope. We'll draft a comment int he next editors' call.

Comment thread
matentzn marked this conversation as resolved.
Outdated
2 changes: 1 addition & 1 deletion src/patterns/data/default/phenotype_modified.tsv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
defined_class defined_class_name bearer modifier
http://purl.obolibrary.org/obo/UPHENO_0001002 phenotypic effect owl:Thing PATO:0000460

4 changes: 2 additions & 2 deletions src/scripts/upheno_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,12 @@ def generate_warning_for_group(group, map_labels, df_cross_species, df_species_i
parents = {
p
for pid in non_upheno_ids
for p in map_superclasses.get(pid, ["UPHENO:0001002"])
for p in map_superclasses.get(pid, ["UPHENO:0001001"])
if p and isinstance(p, str) and p.startswith("UPHENO:")
}

if not parents:
parents.add("UPHENO:0001002")
parents.add("UPHENO:0001001")

if len(upheno_ids) == 0:
upheno_label = generate_upheno_label(group, map_labels)
Expand Down
1 change: 1 addition & 0 deletions src/templates/obsolete.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -17552,3 +17552,4 @@ http://purl.obolibrary.org/obo/UPHENO_0088423 true http://purl.obolibrary.org/o
http://purl.obolibrary.org/obo/UPHENO_0088424 true http://purl.obolibrary.org/obo/CHEBI_16410-http://purl.obolibrary.org/obo/BFO_0000004-abnormallyIncreasedLevelOfChemicalEntityInLocation.tsv
http://purl.obolibrary.org/obo/UPHENO_0016048 true http://purl.obolibrary.org/obo/GO_0000785-http://purl.obolibrary.org/obo/ZFA_0009177-abnormalMorphologyOfAnatomicalEntityInLocation.tsv
http://purl.obolibrary.org/obo/UPHENO_0056750 true http://purl.obolibrary.org/obo/GO_0000785-http://purl.obolibrary.org/obo/ZFA_0009111-abnormallyIncreasedNumberOfAnatomicalEntityInLocation.tsv
http://purl.obolibrary.org/obo/UPHENO_0001002 phenotypic effect true Deprecated in favor of UPHENO:0001001 http://purl.obolibrary.org/obo/UPHENO_0001001 https://github.com/obophenotype/upheno/issues/1009
1 change: 0 additions & 1 deletion src/templates/phenotype-top-level.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ UPHENO:3000004 renal/urinary system phenotype UPHENO:0001001 phenotype http://pu
UPHENO:3000006 taste/olfaction phenotype UPHENO:0001001 phenotype http://purl.obolibrary.org/obo/upheno#top_level
UPHENO:3000007 vision/eye phenotype UPHENO:0001001 phenotype http://purl.obolibrary.org/obo/upheno#top_level
UPHENO:0050177 renal system phenotype UPHENO:3000004 renal/urinary system phenotype
UPHENO:0001002 phenotypic effect UPHENO:0001001 phenotype
UPHENO:0078688 abnormal sensory perception of taste UPHENO:3000006 taste/olfaction phenotype
UPHENO:0078689 abnormal sensory perception of smell UPHENO:3000006 taste/olfaction phenotype
UPHENO:0087427 renal system morphology phenotype UPHENO:3000004 renal/urinary system phenotype
Loading
Loading