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 mechanism to retrieve missing CHEBI ids and include them in build #106

10 changes: 7 additions & 3 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,13 @@ ANNOTATION_PROPERTIES=rdfs:label IAO:0000115
# This pattern uses ROBOT to generate an import module

# Should be able to drop this if robot can just take a big messy list of terms as input.
$(IMPORTDIR)/%_terms_combined.txt: $(IMPORTSEED) $(IMPORTDIR)/%_terms.txt
if [ $(IMP) = true ]; then cat $^ | grep -v ^# | sort | uniq > $@; fi

$(IMPORTDIR)/%_terms_combined.txt: $(IMPORTSEED) $(IMPORTDIR)/%_terms.txt $(TMPDIR)/monarch_chebi_terms.txt
if [ $(IMP) = true ] && [ "$*" = "chebi" ]; then \
echo "Processing chebi terms"; \
cat $(word 1,$^) $(word 3,$^) | grep -v ^# | sort | uniq > $@; \
elif [ $(IMP) = true ]; then \
cat $(word 1,$^) $(word 2,$^) | grep -v ^# | sort | uniq > $@; \
fi

ALL_TERMS_COMBINED = $(patsubst %, $(IMPORTDIR)/%_terms_combined.txt, $(IMPORTS))
$(IMPORTDIR)/merged_terms_combined.txt: $(ALL_TERMS_COMBINED)
Expand Down
10 changes: 10 additions & 0 deletions src/ontology/phenio.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ mirror-hgnc: | $(TMPDIR)

endif

# Retrieve list of node IDs expected to be in PHENIO by downstream consumers
# Specifically Monarch
missing_phenio_nodes.tsv: | $(TMPDIR)
curl -L https://data.monarchinitiative.org/monarch-kg-dev/latest/qc/missing_phenio_nodes.tsv --create-dirs --retry 4 --max-time 400 > $@

# Just get the CHEBI IDs
# and change them to URIs
$(TMPDIR)/monarch_chebi_terms.txt: missing_phenio_nodes.tsv
cat $^ | grep CHEBI | cut -f 1 | sed 's/CHEBI:/http:\/\/purl.obolibrary.org\/obo\/CHEBI_/' > $@
Copy link
Member

Choose a reason for hiding this comment

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

no need for this, ROBOT can deal with CURIEs just fine

Copy link
Member Author

Choose a reason for hiding this comment

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

Great, I thought it should be able to handle CURIEs.


################################################################
#### Release files #############################################
################################################################
Expand Down