Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
60 changes: 60 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,63 @@ SubClassOf(obo:CL_4072102 ObjectSomeValuesFrom(obo:RO_0002215 obo:GO_0061534))

The reasoner can find the most specific `is_a`, so it's OK to leave this off.

## Adding ROBOT Templates

ROBOT templates allow bulk addition of annotations and other axioms from TSV files. Follow these steps to add a new template:

### 1. Create the template file
- Place TSV file in `src/templates/` directory
- Use descriptive filename (e.g., `lungmap_links.tsv`)
- First row: column headers (for reference only)
- Second row: ROBOT template specification

### 2. Template syntax
- `ID`: Term identifier column (always required)
- `AI <property>`: Annotation with IRI value
- `A <property>`: Annotation with string value
- `>A <property>`: Axiom annotation (annotation on annotation)
- `SPLIT=|`: Allow multiple values separated by pipes

For more details see [ROBOT template documentation](https://robot.obolibrary.org/template).

Example template structure:
```tsv
ID External_link Link_label Synonyms Dbxref
ID AI rdfs:seeAlso >A rdfs:label A oboInOwl:hasExactSynonym SPLIT=| >A oboInOwl:hasDbXref
CL:0002062 https://example.com/cell123 cell - on Database synonym1|synonym2 Database:123
```

### 3. Add to Makefile
Add template to `src/ontology/Makefile`:
- Add `{template_name}.owl` to `OTHER_SRC` variable
- Add build rule following existing pattern:
```make
components/{template_name}.owl: ../templates/{template_name}.tsv
$(ROBOT) template --template $< --output $@
```
- Add to `.PRECIOUS` targets

### 4. Add import statement
Add import to `src/ontology/cl-edit.owl` (alphabetically):
```
Import(<http://purl.obolibrary.org/obo/cl/components/{template_name}.owl>)
```

### 5. Update catalog
Add URI resolution to `src/ontology/catalog-v001.xml` within "odk-managed-catalog" group:
```xml
<uri name="http://purl.obolibrary.org/obo/cl/components/{template_name}.owl" uri="components/{template_name}.owl" />
```

### 6. Build and test
Test template generation:
```bash
./run.sh make components/{template_name}.owl
```

### Common template patterns
- **External links**: `AI rdfs:seeAlso` with `>A rdfs:label` for custom labels
- **Synonyms**: `A oboInOwl:hasExactSynonym SPLIT=|` for multiple synonyms
- **Database refs**: `>A oboInOwl:hasDbXref` as axiom annotations
- **Definitions**: `A obo:IAO_0000115` with `>A oboInOwl:hasDbXref` for sources

10 changes: 9 additions & 1 deletion src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ OBODATE ?= $(shell date +'%d:%m:%Y %H:%M')
VERSION= $(TODAY)
ANNOTATE_ONTOLOGY_VERSION = annotate -V $(ONTBASE)/releases/$(VERSION)/$@ --annotation owl:versionInfo $(VERSION)
ANNOTATE_CONVERT_FILE = annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) convert -f ofn --output [email protected] && mv [email protected] $@
OTHER_SRC = $(PATTERNDIR)/definitions.owl $(COMPONENTSDIR)/hra_subset.owl $(COMPONENTSDIR)/mappings.owl $(COMPONENTSDIR)/blood_and_immune_upper_slim.owl $(COMPONENTSDIR)/eye_upper_slim.owl $(COMPONENTSDIR)/general_cell_types_upper_slim.owl $(COMPONENTSDIR)/kidney_upper_slim.owl $(COMPONENTSDIR)/cellxgene_subset.owl $(COMPONENTSDIR)/PNS_neurons.owl $(COMPONENTSDIR)/clm-cl.owl $(COMPONENTSDIR)/2DFTU_HRA_illustrations.owl $(COMPONENTSDIR)/wmbo-cl-comp.owl
OTHER_SRC = $(PATTERNDIR)/definitions.owl $(COMPONENTSDIR)/hra_subset.owl $(COMPONENTSDIR)/mappings.owl $(COMPONENTSDIR)/blood_and_immune_upper_slim.owl $(COMPONENTSDIR)/eye_upper_slim.owl $(COMPONENTSDIR)/general_cell_types_upper_slim.owl $(COMPONENTSDIR)/kidney_upper_slim.owl $(COMPONENTSDIR)/cellxgene_subset.owl $(COMPONENTSDIR)/lungmap_links.owl $(COMPONENTSDIR)/PNS_neurons.owl $(COMPONENTSDIR)/clm-cl.owl $(COMPONENTSDIR)/2DFTU_HRA_illustrations.owl $(COMPONENTSDIR)/wmbo-cl-comp.owl
ONTOLOGYTERMS = $(TMPDIR)/ontologyterms.txt
EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl

Expand Down Expand Up @@ -496,6 +496,7 @@ recreate-components:
--assume-new=$(TMPDIR)/stamp-component-general_cell_types_upper_slim.owl \
--assume-new=$(TMPDIR)/stamp-component-kidney_upper_slim.owl \
--assume-new=$(TMPDIR)/stamp-component-cellxgene_subset.owl \
--assume-new=$(TMPDIR)/stamp-component-lungmap_links.owl \
--assume-new=$(TMPDIR)/stamp-component-PNS_neurons.owl \
--assume-new=$(TMPDIR)/stamp-component-clm-cl.owl \
--assume-new=$(TMPDIR)/stamp-component-2DFTU_HRA_illustrations.owl \
Expand All @@ -511,6 +512,7 @@ no-mirror-recreate-components:
--assume-new=$(TMPDIR)/stamp-component-general_cell_types_upper_slim.owl \
--assume-new=$(TMPDIR)/stamp-component-kidney_upper_slim.owl \
--assume-new=$(TMPDIR)/stamp-component-cellxgene_subset.owl \
--assume-new=$(TMPDIR)/stamp-component-lungmap_links.owl \
--assume-new=$(TMPDIR)/stamp-component-PNS_neurons.owl \
--assume-new=$(TMPDIR)/stamp-component-clm-cl.owl \
--assume-new=$(TMPDIR)/stamp-component-2DFTU_HRA_illustrations.owl \
Expand Down Expand Up @@ -584,6 +586,12 @@ $(COMPONENTSDIR)/cellxgene_subset.owl: $(TEMPLATEDIR)/cellxgene_subset.tsv $(TMP
$(ANNOTATE_CONVERT_FILE)
.PRECIOUS: $(COMPONENTSDIR)/cellxgene_subset.owl

$(COMPONENTSDIR)/lungmap_links.owl: $(TEMPLATEDIR)/lungmap_links.tsv $(TMPDIR)/stamp-component-lungmap_links.owl
$(ROBOT) template \
--template $(TEMPLATEDIR)/lungmap_links.tsv \
$(ANNOTATE_CONVERT_FILE)
.PRECIOUS: $(COMPONENTSDIR)/lungmap_links.owl

$(COMPONENTSDIR)/PNS_neurons.owl: $(TEMPLATEDIR)/PNS_neurons.csv $(TMPDIR)/stamp-component-PNS_neurons.owl
$(ROBOT) template \
--template $(TEMPLATEDIR)/PNS_neurons.csv \
Expand Down
1 change: 1 addition & 0 deletions src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<uri name="http://purl.obolibrary.org/obo/cl/components/eye_upper_slim.owl" uri="components/eye_upper_slim.owl" />
<uri name="http://purl.obolibrary.org/obo/cl/components/general_cell_types_upper_slim.owl" uri="components/general_cell_types_upper_slim.owl" />
<uri name="http://purl.obolibrary.org/obo/cl/components/kidney_upper_slim.owl" uri="components/kidney_upper_slim.owl" />
<uri name="http://purl.obolibrary.org/obo/cl/components/lungmap_links.owl" uri="components/lungmap_links.owl" />
<uri name="http://purl.obolibrary.org/obo/cl/components/cellxgene_subset.owl" uri="components/cellxgene_subset.owl" />
<uri name="http://purl.obolibrary.org/obo/cl/components/PNS_neurons.owl" uri="components/PNS_neurons.owl" />
<uri name="http://purl.obolibrary.org/obo/cl/components/clm-cl.owl" uri="components/clm-cl.owl" />
Expand Down
1 change: 1 addition & 0 deletions src/ontology/cl-edit.owl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Import(<http://purl.obolibrary.org/obo/cl/components/eye_upper_slim.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/general_cell_types_upper_slim.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/hra_subset.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/kidney_upper_slim.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/lungmap_links.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/mappings.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/wmbo-cl-comp.owl>)
Import(<http://purl.obolibrary.org/obo/cl/components/2DFTU_HRA_illustrations.owl>)
Expand Down
253 changes: 253 additions & 0 deletions src/ontology/components/lungmap_links.owl
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.w3.org/2002/07/owl#"
xml:base="http://www.w3.org/2002/07/owl"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#">
<Ontology/>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Annotation properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->




<!-- http://www.geneontology.org/formats/oboInOwl#hasDbXref -->

<AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasDbXref"/>



<!-- http://www.geneontology.org/formats/oboInOwl#hasExactSynonym -->

<AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->




<!-- http://purl.obolibrary.org/obo/CL_0002062 -->

<Class rdf:about="http://purl.obolibrary.org/obo/CL_0002062">
<oboInOwl:hasExactSynonym>AEC1</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>AT1</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>Alveolar type 1 cells</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>alveolar epithelial cell 1</oboInOwl:hasExactSynonym>
<rdfs:seeAlso rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000003"/>
</Class>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002062"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>AEC1</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000003</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002062"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>AT1</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000003</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002062"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>Alveolar type 1 cells</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000003</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002062"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>alveolar epithelial cell 1</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000003</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002062"/>
<annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
<annotatedTarget rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000003"/>
<rdfs:label>alveolar type 1 epithelial cell - on LungMap</rdfs:label>
</Axiom>



<!-- http://purl.obolibrary.org/obo/CL_0002063 -->

<Class rdf:about="http://purl.obolibrary.org/obo/CL_0002063">
<oboInOwl:hasExactSynonym>AEC2</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>Alveolar type 2 cells</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>alveolar epithelial cell 2</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>lung alveolar epithelial type II cell</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>type II lung epithelial cell</oboInOwl:hasExactSynonym>
<rdfs:seeAlso rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000004"/>
</Class>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002063"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>lung alveolar epithelial type II cell</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000004</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002063"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>type II lung epithelial cell</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000004</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002063"/>
<annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
<annotatedTarget rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000004"/>
<rdfs:label>alveolar type 2 epithelial cell - on LungMap</rdfs:label>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002063"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>AEC2</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000004</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002063"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>Alveolar type 2 cells</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000004</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002063"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>alveolar epithelial cell 2</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000004</oboInOwl:hasDbXref>
</Axiom>



<!-- http://purl.obolibrary.org/obo/CL_0002145 -->

<Class rdf:about="http://purl.obolibrary.org/obo/CL_0002145">
<oboInOwl:hasExactSynonym>Ciliated cells</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>MCACs</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>MCCs</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>Multi-ciliated airway cells</oboInOwl:hasExactSynonym>
<oboInOwl:hasExactSynonym>Multiciliated cells</oboInOwl:hasExactSynonym>
<rdfs:seeAlso rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000130"/>
</Class>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002145"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>Ciliated cells</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000130</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002145"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>MCACs</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000130</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002145"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>MCCs</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000130</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002145"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>Multi-ciliated airway cells</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000130</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002145"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>Multiciliated cells</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000130</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002145"/>
<annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
<annotatedTarget rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000130"/>
<rdfs:label>multiciliated columnar cell of tracheobronchial tree - on LungMap</rdfs:label>
</Axiom>



<!-- http://purl.obolibrary.org/obo/CL_0002638 -->

<Class rdf:about="http://purl.obolibrary.org/obo/CL_0002638">
<rdfs:seeAlso rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000018"/>
</Class>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0002638"/>
<annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
<annotatedTarget rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000018"/>
<rdfs:label>Bronchioalveolar stem cell - on LungMap</rdfs:label>
</Axiom>



<!-- http://purl.obolibrary.org/obo/CL_0017000 -->

<Class rdf:about="http://purl.obolibrary.org/obo/CL_0017000">
<oboInOwl:hasExactSynonym>Ionocyte</oboInOwl:hasExactSynonym>
<rdfs:seeAlso rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000017"/>
</Class>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0017000"/>
<annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<annotatedTarget>Ionocyte</annotatedTarget>
<oboInOwl:hasDbXref>LungMap:LMCC0000000017</oboInOwl:hasDbXref>
</Axiom>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0017000"/>
<annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
<annotatedTarget rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000017"/>
<rdfs:label>ionocyte of lung - on LungMap</rdfs:label>
</Axiom>



<!-- http://purl.obolibrary.org/obo/CL_1000272 -->

<Class rdf:about="http://purl.obolibrary.org/obo/CL_1000272">
<rdfs:seeAlso rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000012"/>
</Class>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_1000272"/>
<annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
<annotatedTarget rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000012"/>
<rdfs:label>lung secretory cell - on LungMap</rdfs:label>
</Axiom>



<!-- http://purl.obolibrary.org/obo/CL_1000352 -->

<Class rdf:about="http://purl.obolibrary.org/obo/CL_1000352">
<rdfs:seeAlso rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000139"/>
</Class>
<Axiom>
<annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_1000352"/>
<annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
<annotatedTarget rdf:resource="https://www.lungmap.net/research/cell-cards/?cell_cards_id=LMCC0000000139"/>
<rdfs:label>bronchiolar basal cell - on LungMap</rdfs:label>
</Axiom>
</rdf:RDF>



<!-- Generated by the OWL API (version 4.5.29) https://github.com/owlcs/owlapi -->

Loading
Loading