From 18669633b325bdc603643cd852dac528523a8e5a Mon Sep 17 00:00:00 2001
From: Huseyin Kir <73784267+hkir-dev@users.noreply.github.com>
Date: Tue, 16 Jan 2024 12:18:53 +0000
Subject: [PATCH] CellXGene referred cells tagged (#2267)
* CellXGene cited cells subset added
* CellXGene subset robot template added
---
docs/odk-workflows/RepositoryFileStructure.md | 1 +
src/ontology/Makefile | 10 +-
src/ontology/catalog-v001.xml | 1 +
src/ontology/cl-edit.owl | 1 +
src/ontology/cl-odk.yaml | 4 +
src/ontology/cl.Makefile | 7 +-
src/ontology/components/cellxgene_subset.owl | 3451 +++++++++++++++++
src/templates/cellxgene_subset.tsv | 688 ++++
8 files changed, 4161 insertions(+), 2 deletions(-)
create mode 100644 src/ontology/components/cellxgene_subset.owl
create mode 100644 src/templates/cellxgene_subset.tsv
diff --git a/docs/odk-workflows/RepositoryFileStructure.md b/docs/odk-workflows/RepositoryFileStructure.md
index e1cd5f6b8..7f982ace0 100644
--- a/docs/odk-workflows/RepositoryFileStructure.md
+++ b/docs/odk-workflows/RepositoryFileStructure.md
@@ -41,3 +41,4 @@ These are the components in CL
| eye_upper_slim.owl | None |
| general_cell_types_upper_slim.owl | None |
| kidney_upper_slim.owl | None |
+| cellxgene_subset.owl | None |
diff --git a/src/ontology/Makefile b/src/ontology/Makefile
index 7db2dc393..39e1ff4ac 100644
--- a/src/ontology/Makefile
+++ b/src/ontology/Makefile
@@ -50,7 +50,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 $@.tmp.owl && mv $@.tmp.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
+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
ONTOLOGYTERMS = $(TMPDIR)/ontologyterms.txt
EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl
PATTERNDIR= ../patterns
@@ -437,6 +437,14 @@ $(COMPONENTSDIR)/kidney_upper_slim.owl: $(TEMPLATEDIR)/kidney_upper_slim.csv
$(ANNOTATE_CONVERT_FILE); fi
.PRECIOUS: $(COMPONENTSDIR)/kidney_upper_slim.owl
+
+
+$(COMPONENTSDIR)/cellxgene_subset.owl: $(TEMPLATEDIR)/cellxgene_subset.tsv
+ if [ $(COMP) = true ] ; then $(ROBOT) template \
+ $(patsubst %, --template %, $^) \
+ $(ANNOTATE_CONVERT_FILE); fi
+
+.PRECIOUS: $(COMPONENTSDIR)/cellxgene_subset.owl
# ----------------------------------------
# Mirroring upstream ontologies
# ----------------------------------------
diff --git a/src/ontology/catalog-v001.xml b/src/ontology/catalog-v001.xml
index 558f86f37..67df007a1 100644
--- a/src/ontology/catalog-v001.xml
+++ b/src/ontology/catalog-v001.xml
@@ -19,5 +19,6 @@
+
diff --git a/src/ontology/cl-edit.owl b/src/ontology/cl-edit.owl
index b18bd1d8d..8d9b79014 100644
--- a/src/ontology/cl-edit.owl
+++ b/src/ontology/cl-edit.owl
@@ -10,6 +10,7 @@ Prefix(oboInOwl:=)
Ontology(
Import()
+Import()
Import()
Import()
Import()
diff --git a/src/ontology/cl-odk.yaml b/src/ontology/cl-odk.yaml
index 49777fd3f..17c52bf48 100644
--- a/src/ontology/cl-odk.yaml
+++ b/src/ontology/cl-odk.yaml
@@ -114,4 +114,8 @@ components:
use_template: True
templates:
- kidney_upper_slim.csv
+ - filename: cellxgene_subset.owl
+ use_template: True
+ templates:
+ - cellxgene_subset.tsv
diff --git a/src/ontology/cl.Makefile b/src/ontology/cl.Makefile
index 204af26bd..8544b1521 100644
--- a/src/ontology/cl.Makefile
+++ b/src/ontology/cl.Makefile
@@ -233,7 +233,12 @@ $(TMPDIR)/hra_subset.owl:
$(COMPONENTSDIR)/hra_subset.owl: $(TMPDIR)/hra_subset.owl
$(ROBOT) merge -i $< annotate --ontology-iri $(ONTBASE)/$@ --output $@
-
+
+## Download CellXGene reference subset
+
+CELLXGENE_SUBSET_URL="https://raw.githubusercontent.com/hkir-dev/cellxgene-cell-reporter/main/templates/cellxgene_subset.tsv"
+$(TEMPLATEDIR)/cellxgene_subset.tsv:
+ wget $(CELLXGENE_SUBSET_URL) -O $@
# Make CL-plus (CL + PCL product)
diff --git a/src/ontology/components/cellxgene_subset.owl b/src/ontology/components/cellxgene_subset.owl
new file mode 100644
index 000000000..384e6b488
--- /dev/null
+++ b/src/ontology/components/cellxgene_subset.owl
@@ -0,0 +1,3451 @@
+Prefix(:=)
+Prefix(owl:=)
+Prefix(rdf:=)
+Prefix(xml:=)
+Prefix(xsd:=)
+Prefix(rdfs:=)
+
+
+Ontology(
+
+Annotation(owl:versionInfo "2024-01-16")
+
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class())
+Declaration(Class(