Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ googlemaps-api-key.txt
bin

cachedir
cache_from_local_mongodb
examples/outputs

temp/
Expand Down Expand Up @@ -63,7 +64,7 @@ sphinx/_build/*

# Cacheing
tests/cachedir/
./cachedir/
cachedir

# https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore

Expand Down
22 changes: 20 additions & 2 deletions make-gold-cache.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

RUN=poetry run

.PHONY: load-gold-biosamples-into-mongo
.PHONY: gold-to-mongo-all gold-to-mongo-clean load-gold-biosamples-into-mongo rebuild-gold-cache-from-mongodb

gold-to-mongo-all: gold-to-mongo-clean load-gold-biosamples-into-mongo

Expand Down Expand Up @@ -39,13 +39,31 @@ local/gold-study-ids-with-biosamples.txt: downloads/goldData.xlsx
# # --purge-diskcache
# # --env-file

#load-gold-biosamples-into-mongo: local/gold-study-ids-with-biosamples.txt
# $(RUN) gold-to-mongo \
# --authentication-file config/gold-key.txt \
# --cache-dir cache_from_local_mongodb \
# --env-file local/.env.27778 \
# --log-failures-to-file local/gold-to-mongo-failures.json \
# --mongo-uri "mongodb://localhost:27778/staging?directConnection=true&authMechanism=DEFAULT&authSource=admin" \
# --study-ids-file $<


load-gold-biosamples-into-mongo: local/gold-study-ids-with-biosamples.txt
$(RUN) gold-to-mongo \
--authentication-file config/gold-key.txt \
--cache-dir cache_from_local_mongodb \
--log-failures-to-file local/gold-to-mongo-failures.json \
--mongo-uri "mongodb://localhost:27017/gold_metadata" \
--mongo-uri "mongodb://localhost:27017/gold_metadata_2" \
--study-ids-file $<

rebuild-gold-cache-from-mongodb:
poetry run rebuild-gold-cache \
--mongo-uri "mongodb://localhost:27017/gold_metadata" \
--authentication-file config/gold-key.txt \
--cache-dir cache_from_local_mongodb


local/gold-cache.json: local/gold-studies.tsv
# ~ 3 seconds/uncached study
# GOLD has ~ 63k studies
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ cache-gold = "sample_annotator.clients.gold_client:main"
extract-study-ids-with-biosamples = "sample_annotator.file_utils.extract_study_ids_with_biosamples:main"
gold-to-mongo = "sample_annotator.gold_to_mongo:main"
rel_to_oxygen_example = "sample_annotator.rel_to_oxygen_example:cli"
xlsx-to-tsv = "sample_annotator.file_utils.xlsx_to_tsv:xlsx_to_tsv"
xlsx-to-tsv = "sample_annotator.file_utils.xlsx_to_tsv:xlsx_to_tsv"
rebuild-gold-cache = "sample_annotator.rebuild_gold_cache:rebuild_gold_cache"
266 changes: 0 additions & 266 deletions sample_annotator/gold_to_mongo.py

This file was deleted.

Loading