Skip to content

Commit 3adc508

Browse files
committed
feat: pc owl artifact gen!!
1 parent df30f24 commit 3adc508

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

datasets/__init__.py

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/raw
22
/intermediate
3+
/output

datasets/synthetic_data/panther_pathways/Snakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ include: "../../../cache/Snakefile"
33
rule all:
44
input:
55
# TODO: pass to script
6-
"raw/pathways.txt"
6+
"raw/pathways.txt",
7+
"raw/pc-biopax.owl"
78

89
produce_fetch_rules({
910
"raw/pc-biopax.owl": FetchConfig(["PathwayCommons", "pc-biopax.owl.gz"], uncompress=True),
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
from pathlib import Path
22
from paxtools.fetch import fetch
3-
from ..util.parse_pc_pathways import parse_pc_pathways
3+
from datasets.synthetic_data.util.parse_pc_pathways import parse_pc_pathways
44

55
current_directory = Path(__file__).parent.resolve()
66

77
def main():
88
pathways_df = parse_pc_pathways(current_directory / 'raw' / 'pathways.txt')
9-
print(list(pathways_df[["PATHWAY_URI"]]))
10-
# fetch(current_directory / 'raw' / 'pc-biopax.owl', output="pc-biopax-selected.owl")
11-
pass
9+
print("Fetching pathways... [This may take some time. On the author's desktop machine, it took 15 minutes.]")
10+
(current_directory / 'output').mkdir(exist_ok=True)
11+
fetch(
12+
current_directory / 'raw' / 'pc-biopax.owl',
13+
output=(current_directory / 'output' / "pc-biopax-selected.owl"),
14+
uris=list(pathways_df["PATHWAY_URI"]),
15+
memory=f"{2**(16 - 1)}m" # this is why we don't run this in CI! This is 32gb of memory.
16+
)
1217

1318
if __name__ == "__main__":
14-
main()
19+
main()
File renamed without changes.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ package = true
3131

3232
[tool.setuptools.packages.find]
3333
namespaces = false
34+
where = ["./"]
3435
include = ["*"]
3536
exclude = ["spras*"]
3637

0 commit comments

Comments
 (0)