-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (55 loc) · 2.79 KB
/
Copy pathMakefile
File metadata and controls
64 lines (55 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.PHONY: run-summary process-metatraits-unmapped \
validate-isolation-source-schema validate-ingredient-schema
.SILENT:
run-summary:
poetry run python scripts/graph_summary.py data/merged
neo4j-upload:
kgx neo4j-upload --uri bolt://localhost:7687 \
--username neo4j \
--password 12345678 \
--input-format tsv \
data/merged/merged-kg/merged-kg_nodes.tsv data/merged/merged-kg/merged-kg_edges.tsv
feba-schema-diagram:
CURRENT_DIR=$(shell pwd) && docker run --mount type=bind,source="$$CURRENT_DIR",target=/home/schcrwlr \
--rm -it schemacrawler/schemacrawler /opt/schemacrawler/bin/schemacrawler.sh \
--server=sqlite --database=notebooks/feba.db \
--info-level=maximum \
--command=schema \
--children=1 \
--parents=1 \
--weak-associations \
--infer-extension-tables \
--output-file notebooks/schema.pdf
process-metatraits-unmapped:
@echo "Processing metatraits unmapped data..."
@if [ ! -f data/transformed/metatraits/unmapped_traits.tsv ]; then \
echo "Error: data/transformed/metatraits/unmapped_traits.tsv not found"; \
exit 1; \
fi
@echo "Extracting unique trait IDs..."
cut -f1 data/transformed/metatraits/unmapped_traits.tsv | sort | uniq > data/transformed/metatraits/unmapped_traits_unique.tsv
@echo "Extracting unique relation prefixes..."
cut -f1 -d ':' data/transformed/metatraits/unmapped_traits_unique.tsv | sort | uniq > data/transformed/metatraits/unmapped_traits_unique_relations.tsv
@echo "Metatraits unmapped data processing complete"
@echo "Generated files:"
@wc -l data/transformed/metatraits/unmapped_traits_unique.tsv
@wc -l data/transformed/metatraits/unmapped_traits_unique_relations.tsv
# Schema/category validation gates for SSSOM-shaped mapping TSVs.
# Complements mappings/validate_isolation_source_mappings.py (runtime
# family-mismatch check) — this one validates CURIE shape, predicate
# vocab, ontology category allowlists, and lexical drift.
# Exit codes: 2 = errors, 1 = warnings (with --strict), 0 = clean.
validate-isolation-source-schema:
@echo "Validating mappings/isolation_source_to_ontology.tsv (schema)..."
python3 mappings/validate_mapping_schema.py
validate-ingredient-schema:
@echo "Validating mappings/ingredient_mappings.sssom.tsv (schema)..."
python3 mappings/validate_mapping_schema.py --profile ingredient
# MediaDive recipe coverage vs the committed baseline. Upstream thinned these
# recipes by 48% between the 2024-12 and 2026-08 builds and nothing noticed for
# ~20 months (#728); this is the check that would have caught it.
# Exit codes: 1 = coverage moved beyond tolerance, 0 = clean.
validate-mediadive-coverage:
@echo "Validating MediaDive recipe coverage against the committed baseline..."
python3 scripts/mediadive_coverage_check.py
include kg-microbe.Makefile