Skip to content

Commit

Permalink
new release
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Aug 7, 2024
1 parent ddfa6e9 commit 6a50cea
Show file tree
Hide file tree
Showing 20 changed files with 97,540 additions and 66,384 deletions.
27 changes: 16 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# TODO: parse from yaml
BUILDS = hg38 ce11 mm10 rn6 galGal6
# https://hgdownload.soe.ucsc.edu/downloads.html
BUILDS = hg38 ce11 mm39 rn6 galGal6 calJac4 danRer11
# TODO: dm6
RUN = poetry run

all: all-chromAlias all-cytoBand src/ontology/components/ucsc.owl all-components ontology
all-chromAlias: $(patsubst %, download/%-chromAlias.tsv, $(BUILDS))
Expand All @@ -18,29 +20,32 @@ test:
pytest

download/%-chromAlias.tsv:
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/$*/database/chromAlias.txt.gz | gzip -dc > $@
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/$*/database/chromAlias.txt.gz | gzip -dc > $@.tmp && mv $@.tmp $@
download/%-cytoBand.tsv:
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/$*/database/cytoBand.txt.gz | gzip -dc > $@
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/$*/database/cytoBandIdeo.txt.gz | gzip -dc > $@.tmp && mv $@.tmp $@
# curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/$*/database/cytoBand.txt.gz | gzip -dc > [email protected] && mv [email protected] $@
download/ce11-cytoBand.tsv:
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/ce11/database/cytoBandIdeo.txt.gz | gzip -dc > $@
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/ce11/database/cytoBandIdeo.txt.gz | gzip -dc > $@.tmp && mv $@.tmp $@
download/danRer10-cytoBand.tsv:
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/danRer10/database/cytoBandIdeo.txt.gz | gzip -dc > $@
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/danRer10/database/cytoBandIdeo.txt.gz | gzip -dc > $@.tmp && mv $@.tmp $@
download/galGal6-cytoBand.tsv:
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/galGal6/database/cytoBandIdeo.txt.gz | gzip -dc > $@
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/galGal6/database/cytoBandIdeo.txt.gz | gzip -dc > $@.tmp && mv $@.tmp $@
download/calJac4-cytoBand.tsv:
curl -L -s http://hgdownload.cse.ucsc.edu/goldenPath/calJac4/database/cytoBandIdeo.txt.gz | gzip -dc > $@.tmp && mv $@.tmp $@
components/%.owl: download/%-cytoBand.tsv download/%-chromAlias.tsv
python -m monochrom.monochrom $^ -o $@
$(RUN) ucsc2owl $^ -o $@
components/%.yaml: download/%-cytoBand.tsv download/%-chromAlias.tsv
python -m monochrom.monochrom $^ -f yaml -o $@
$(RUN) ucsc2owl $^ -f yaml -o $@

download/ncit.owl:
curl -L -s http://purl.obolibrary.org/obo/ncit.owl > $@
curl -L -s http://purl.obolibrary.org/obo/ncit.owl > $@.tmp && mv $@.tmp $@

download/ncit-chrom-terms.owl: download/ncit.owl config/ncit-chrom-terms.txt
robot extract -i $< -m TOP -T config/ncit-chrom-terms.txt -o $@

# ODK will take things on from here
src/ontology/tmp/ucsc.ofn: monochrom/monochrom.py monochrom/chromschema.py
python -m monochrom.monochrom download/*-*.tsv -o $@.tmp && mv $@.tmp $@
$(RUN) ucsc2owl download/*-*.tsv -o $@.tmp && mv $@.tmp $@
.PRECIOUS: src/ontology/tmp/ucsc.ofn

ONTBASE=http://purl.obolibrary.org/obo/chr
Expand All @@ -51,7 +56,7 @@ src/ontology/components/ucsc.owl: src/ontology/tmp/ucsc.ofn
## Schema

monochrom/chromschema.py: model/schema/chromo.yaml
gen-py-classes model/schema/chromo.yaml > $@
gen-pydantic model/schema/chromo.yaml > $@.tmp && mv $@.tmp $@

gendocs:
gen-markdown -d docs model/schema/chromo.yaml
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ http://purl.obolibrary.org/obo/chr.owl (once this ontology is registered)
From the top level of this repo:

```bash
pip install -r requirements.txt
poetry install
make
```

Expand All @@ -99,7 +99,7 @@ make prepare_release

The [Makefile](Makefile) and the metadata file [genomes.yaml](genomes.yaml) drive the python code in [monochrom/](monochrom/).

To add more genomes, it is necessary to etxend both the Makefile and the genomes metadata file, but this could be made more elegant in the future.
To add more genomes, it is necessary to extend both the Makefile and the genomes metadata file, but this could be made more elegant in the future.

If you wish to modify the code, here is how it is structured, and the underlying philosophy.

Expand Down
Loading

0 comments on commit 6a50cea

Please sign in to comment.