diff --git a/Makefile b/Makefile index 696f4e6..5be73a9 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ all: ncbitaxon.owl ncbitaxon.obo ncbitaxon.json ncbi_diff_latest_current_obo.txt all: ncbitaxon.owl.gz ncbitaxon.obo.gz ncbitaxon.json.gz ROBOT=robot +DATE=$(shell date '+%Y-%m-01') .PHONY: clean clean: @@ -12,7 +13,7 @@ build: mkdir -p $@ build/taxdmp.zip: | build - curl -L -o $@ https://ftp.ncbi.nih.gov/pub/taxonomy/taxdmp.zip + curl -L -o $@ https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_$(DATE).zip ncbitaxon.ttl: src/ncbitaxon.py build/taxdmp.zip python3 $^ $@ diff --git a/src/ncbitaxon.py b/src/ncbitaxon.py index d6a6200..ef44e6f 100755 --- a/src/ncbitaxon.py +++ b/src/ncbitaxon.py @@ -187,6 +187,7 @@ def convert(taxdmp_path, output_path, taxa=None): citations = defaultdict(list) with open(output_path, "w") as output: isodate = date.today().isoformat() + ncbi_date = date.today().replace(day=1) output.write( f"""@prefix rdf: . @prefix rdfs: . @@ -205,6 +206,7 @@ def convert(taxdmp_path, output_path, taxa=None): ; terms:description "An ontology representation of the NCBI organismal taxonomy" ; terms:license ; rdfs:comment "Built by https://github.com/obophenotype/ncbitaxon"^^xsd:string +; rdfs:comment "NCBI organismal taxonomy version {ncbi_date}"^^xsd:string . obo:IAO_0000115 a owl:AnnotationProperty