Skip to content

Commit

Permalink
Some makefilechanges
Browse files Browse the repository at this point in the history
  • Loading branch information
matentzn committed Jan 12, 2025
1 parent e9326d3 commit 7db0537
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/ontology/upheno.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,31 @@ $(REPORTDIR)/upheno-associated-entities.csv: upheno.owl
$(TMPDIR)/oba.owl:
wget -O $@ "http://purl.obolibrary.org/obo/oba.owl"

$(TMPDIR)/upheno-oba.owl: #upheno.owl $(TMPDIR)/oba.owl $(COMPONENTSDIR)/upheno-haspart-characteristicofpartof-chain.owl
$(TMPDIR)/upheno-oba.owl: upheno.owl $(TMPDIR)/oba.owl $(COMPONENTSDIR)/upheno-haspart-characteristicofpartof-chain.owl
$(ROBOT) merge -i upheno.owl -i $(TMPDIR)/oba.owl -i $(COMPONENTSDIR)/upheno-haspart-characteristicofpartof-chain.owl \
remove --axioms DisjointClasses \
remove --term rdfs:label --select complement --select annotation-properties \
materialize --term BFO:0000051 \
query --update ../sparql/pheno_trait.ru \
reason -o $@
reason reduce \
query --update ../sparql/pheno_trait_materialise.ru -o $@

$(TMPDIR)/upheno-oba.json: $(TMPDIR)/upheno-oba.owl
$(ROBOT) convert -i $(TMPDIR)/upheno-oba.owl -o $@

$(MAPPINGDIR)/upheno-oba.sssom.tsv: $(TMPDIR)/upheno-oba.json
sssom parse $(TMPDIR)/upheno-oba.json -I obographs-json -C merged -F UPHENO:phenotypeToTrait -o $@

$(MAPPINGDIR)/upheno-oba.kgx: $(TMPDIR)/upheno-oba.json
kgx transform --input-format obojson \
--output $@ \
--output-format tsv \
$(TMPDIR)/upheno-oba.json
awk 'NR==1 || /UPHENO:phenotypeToTrait/' $(MAPPINGDIR)/upheno-oba.kgx_edges.tsv > $(TMPDIR)/upheno-oba.kgx_edges.tsv
mv $(TMPDIR)/upheno-oba.kgx_edges.tsv $(MAPPINGDIR)/upheno-oba.kgx_edges.tsv
rm $(MAPPINGDIR)/upheno-oba.kgx_nodes.tsv
touch $@

$(MAPPINGDIR)/uberon.sssom.tsv: mirror/uberon.owl
if [ $(COMP) = true ] ; then $(ROBOT) sssom:xref-extract -i $< --mapping-file $@ --map-prefix-to-predicate "UBERON http://w3id.org/semapv/vocab/crossSpeciesExactMatch"; fi

Expand All @@ -69,7 +81,9 @@ $(REPORTDIR)/upheno-eq-analysis.csv: $(foreach n,$(SSPOS), $(REPORTDIR)/$(n)_phe
--stats-directory $(REPORTDIR)/
test -f $@

$(MAPPINGDIR)/upheno-species-independent.sssom.tsv $(MAPPINGDIR)/upheno-species-independent.sssom.owl $(MAPPINGDIR)/uberon.sssom.owl:
# TODO missing dependency for "a change in a file in ../curation/pattern-matches" which
# is the true dependency here
$(MAPPINGDIR)/upheno-species-independent.sssom.tsv $(MAPPINGDIR)/upheno-species-independent.sssom.owl $(MAPPINGDIR)/uberon.sssom.owl: $(MAPPINGDIR)/uberon.sssom.tsv ../templates/obsolete.tsv ../curation/upheno_id_map.txt
if [ $(COMP) = true ] ; then python3 ../scripts/upheno_build.py create-species-independent-sssom-mappings \
--upheno-id-map ../curation/upheno_id_map.txt \
--patterns-dir ../curation/patterns-for-matching \
Expand Down Expand Up @@ -301,7 +315,6 @@ download_patterns:
--upheno-config ../curation/upheno-config.yaml \
--pattern-directory ../curation/patterns-for-matching


preprocess_dosdp_patterns:
python3 ../scripts/upheno_build.py preprocess-dosdp-patterns \
--patterns-directory ../curation/patterns-for-matching/ \
Expand Down

0 comments on commit 7db0537

Please sign in to comment.