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

get NLCD values and nearby OSM features for Alaska air study #145

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ googlemaps-api-key.txt
bin

cachedir

sample_annotator/cache/

examples/outputs

temp/
Expand Down
30 changes: 29 additions & 1 deletion make-gold-cache.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ local/gold-studies.tsv: downloads/goldData.xlsx
--sheet-name Study \
--output-file $@

local/gold-biosamples.tsv: downloads/goldData.xlsx
poetry run python sample_annotator/file_utils/xlsx_to_tsv.py \
--excel-file $< \
--sheet-name Study \
--output-file $@

local/gold-study-ids.txt: local/gold-studies.tsv
# without the grep filter, this introduces some noise (non-id rows)
tail -n +2 $< | cut -f 1 | sort | grep 'Gs' > $@
Expand Down Expand Up @@ -49,4 +55,26 @@ load-gold-biosamples-into-mongo: local/gold-study-ids-subset.txt
# --biosample-output-file local/gold-biosamples-only.json \
# --project-output-file local/gold-projects-only.json \
# --remove-contacts \
# --remove-nulls
# --remove-nulls

local/gold-emp500-study-id.txt:
echo "Gs0154244" > $@
sleep 1

local/gold-emp500-cache.json: local/gold-emp500-study-id.txt
# ~ 3 seconds/uncached study
# GOLD has ~ 63k studies
# < 2 days to fetch all studies ?
poetry run python sample_annotator/clients/gold_client.py \
--verbose \
fetch-studies \
--output-format json \
--output $@ \
--include-biosamples \
--authentication-file config/gold-key.txt \
$<

local/gold-emp500-cache.tsv: local/gold-emp500-cache.json
poetry run python sample_annotator/parse_biosample_metadata_from_gold_study.py \
--input-file $< \
--output-file $@
Loading