-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (39 loc) · 1.99 KB
/
Copy pathMakefile
File metadata and controls
47 lines (39 loc) · 1.99 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
# STRING Database Science Skill - developer tasks
#
# make test offline unit tests (no network required)
# make test-live full suite including live STRING/UniProt integration tests
# make lint ruff static analysis
# make regenerate-results rebuild results/ from live STRING queries
#
# All targets use `uv run`, which resolves dependencies from pyproject.toml /
# the PEP 723 metadata in the CLI script.
CLI := skills/string_database/scripts/string_cli.py
GENE_FILE := sample_data/synthetic_cancer_genes.txt
TEST_RUNNER := uv run --with pytest --with polite-http pytest
.PHONY: test test-live test-valuesranks lint regenerate-results clean-results
test:
RUN_LIVE_TESTS=0 $(TEST_RUNNER) tests/ -v
test-live:
RUN_LIVE_TESTS=1 $(TEST_RUNNER) tests/ -v
test-valuesranks:
RUN_LIVE_TESTS=1 RUN_LIVE_VALUESRANKS=1 $(TEST_RUNNER) tests/test_live_smoke.py -v -k valuesranks
lint:
uv run --with ruff ruff check skills tests conftest.py
# Rebuild every committed artifact in results/ from live STRING queries so the
# checked-in dashboard is provably produced by the current code. Every step reads
# the same gene list; `@file` expands one identifier per line.
regenerate-results:
uv run $(CLI) map -i @$(GENE_FILE) -s 9606 --limit_to_best -o results/mapped_genes.tsv
uv run $(CLI) network -i @$(GENE_FILE) -s 9606 --required_score 400 --summary -o results/network_edges.tsv
uv run $(CLI) ppi-enrichment -i @$(GENE_FILE) -s 9606 -o results/ppi_enrichment.tsv
uv run $(CLI) enrichment -i @$(GENE_FILE) -s 9606 --fdr 0.05 --summary -o results/enrichment.tsv
uv run $(CLI) dashboard \
--title "Synthetic Cancer Gene Network & Pathway Analysis" \
--map_file results/mapped_genes.tsv \
--network_file results/network_edges.tsv \
--ppi_file results/ppi_enrichment.tsv \
--enrichment_file results/enrichment.tsv \
-o results/dashboard.html
clean-results:
rm -f results/mapped_genes.tsv results/network_edges.tsv results/ppi_enrichment.tsv \
results/enrichment.tsv results/dashboard.html