Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
7d521ce
Merge branch 'property-expe' into config-args
tristan-f-r Jul 14, 2025
9c85c56
Merge branch 'config-pydantic' into config-args
tristan-f-r Jul 14, 2025
647f947
feat: rough draft of args design
tristan-f-r Jul 14, 2025
76011e0
feat: type oi1/oi2, rwr/strwr
tristan-f-r Jul 14, 2025
94b50c8
refactor: meo, mcf, pl types
tristan-f-r Jul 14, 2025
09fa1ba
chore: begin slowly updating
tristan-f-r Jul 14, 2025
32d4b5c
refactor: moving more tests
tristan-f-r Jul 14, 2025
9b539e9
fix: correct params
tristan-f-r Jul 14, 2025
da67711
fix: specify default args out of run
tristan-f-r Jul 14, 2025
45cfe87
fix: more defaults
tristan-f-r Jul 14, 2025
a6406e2
Merge branch 'umain' into config-args
tristan-f-r Jul 14, 2025
cf93cec
Merge branch 'no-globals' into config-args
tristan-f-r Jul 14, 2025
e080857
feat: begin algorithm parsing
tristan-f-r Jul 14, 2025
53f55e2
fix: clean up type errors, begin nondetermnism
tristan-f-r Jul 14, 2025
7c2454b
Merge branch 'config-pydantic' into config-args
tristan-f-r Jul 14, 2025
a4e265d
chore: begin little utility
tristan-f-r Jul 14, 2025
145b2ec
chore: mv container schema changes over
tristan-f-r Jul 14, 2025
5effe69
feat: initial schema
tristan-f-r Jul 15, 2025
398350e
feat: more algs schema handling
tristan-f-r Jul 15, 2025
72c4cbd
feat: default runs for default algorithms
tristan-f-r Jul 15, 2025
2ef2672
feat: function running
tristan-f-r Jul 15, 2025
9442b64
chore: drop play
tristan-f-r Jul 15, 2025
60b562f
fix(config): don't try to parse in config.py
tristan-f-r Jul 15, 2025
c1947e6
fix: subscriptability
tristan-f-r Jul 15, 2025
8beaf72
fix: auto-discriminator mapping & forbid
tristan-f-r Jul 15, 2025
b07a7ef
style: fmt
tristan-f-r Jul 15, 2025
0bcd1d1
fix: coerce fields to validate default
tristan-f-r Jul 15, 2025
1cb5d17
fix: test
tristan-f-r Jul 15, 2025
c93244f
fix: correct all algorithm usage
tristan-f-r Jul 15, 2025
69268f4
chore: talk about resumability
tristan-f-r Jul 15, 2025
5ce01db
chore: drop seeds changes
tristan-f-r Jul 17, 2025
126d99f
fix: correct dummy file
tristan-f-r Jul 17, 2025
0cfa9ae
Merge branch 'umain' into config-args
tristan-f-r Jul 18, 2025
d4e4fa7
Merge branch 'umain' into config-args
tristan-f-r Jul 24, 2025
bbabbb5
Merge branch 'config-pydantic' into config-args
tristan-f-r Jul 24, 2025
c705ef7
feat: add responsenet params
tristan-f-r Jul 24, 2025
34719d8
style: fmt
tristan-f-r Jul 24, 2025
5220a79
Merge branch 'main' into config-args
tristan-f-r Aug 14, 2025
1976c4d
fix: all configs
tristan-f-r Aug 15, 2025
b31b857
refactor: the central validate_required_run_args
tristan-f-r Aug 15, 2025
2d0c3ec
test: use correct raises err for btb
tristan-f-r Aug 15, 2025
b8ee227
better err handling for too many keys
tristan-f-r Aug 15, 2025
b617825
chore: drop schema
tristan-f-r Sep 6, 2025
9992013
Merge branch 'main' into config-args
tristan-f-r Sep 6, 2025
a77263f
test: fix
tristan-f-r Sep 6, 2025
f62ea79
refactor: pass around container_settings
tristan-f-r Sep 6, 2025
d9d38bf
test: correct all container settings
tristan-f-r Sep 6, 2025
23d109b
fix(meo): specify correctly
tristan-f-r Sep 6, 2025
2ada9c4
fix: correct snakemake
tristan-f-r Sep 6, 2025
d907262
Merge branch 'main' into container-schema-use
tristan-f-r Sep 9, 2025
6b4f52f
Merge branch 'container-schema-move' into container-schema-use
tristan-f-r Oct 4, 2025
f1b9a56
Merge branch 'umain' into container-schema-use
tristan-f-r Oct 24, 2025
4b5bbcb
style: fmt
tristan-f-r Oct 24, 2025
a47b3d8
fix: drop re-introduced framework parameter
tristan-f-r Oct 24, 2025
5a2864a
fix: move enable_profiling to container settings
tristan-f-r Oct 25, 2025
a7e56a1
fix(meo): reorder run_container_and_log params
tristan-f-r Oct 25, 2025
cb7cbc8
fix: correct out_dir for cytoscape
tristan-f-r Oct 25, 2025
ae00175
test(apsp): indicate singularity unpacking via container settings
tristan-f-r Oct 26, 2025
05e40c4
Update spras/config/algorithms.py
tristan-f-r Oct 28, 2025
5892445
Merge branch 'container-schema-use' into config-args
tristan-f-r Oct 29, 2025
cea83b2
test(btb): correct tests
tristan-f-r Oct 29, 2025
d9f251d
style: fmt
tristan-f-r Oct 29, 2025
dbe6971
test: correct other mishaps
tristan-f-r Oct 29, 2025
647907a
fix(mcf): correct types
tristan-f-r Oct 29, 2025
25a0796
fix(oi1): correct dummy node handling
tristan-f-r Oct 29, 2025
554e7ae
test: correct misc artifacts
tristan-f-r Oct 29, 2025
105b72d
fix: allow yaml safe dump of case insensitive enums
tristan-f-r Oct 29, 2025
eaecd33
docs: give credit to prev. commit
tristan-f-r Oct 29, 2025
6933fe4
fix: correctly write enum
tristan-f-r Oct 29, 2025
8fa7ca5
test(domino): don't unlink file before reading
tristan-f-r Nov 1, 2025
f321f79
fix: correct other alg parameters, summary test update
tristan-f-r Nov 1, 2025
ef02ac5
fix(summary): drop _spras_run_name
tristan-f-r Nov 1, 2025
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
20 changes: 8 additions & 12 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ algorithm_params = _config.config.algorithm_params
algorithm_directed = _config.config.algorithm_directed
pca_params = _config.config.pca_params
hac_params = _config.config.hac_params
FRAMEWORK = _config.config.container_settings.framework
container_settings = _config.config.container_settings
include_aggregate_algo_eval = _config.config.analysis_include_evaluation_aggregate_algo

# Return the dataset or gold_standard dictionary from the config file given the label
Expand Down Expand Up @@ -273,16 +273,12 @@ rule reconstruct:
run:
# Create a copy so that the updates are not written to the parameters logfile
params = reconstruction_params(wildcards.algorithm, wildcards.params).copy()
# Add the input files
params.update(dict(zip(runner.get_required_inputs(wildcards.algorithm), *{input}, strict=True)))
# Add the output file
# All run functions can accept a relative path to the output file that should be written that is called 'output_file'
params['output_file'] = output.pathway_file
# Remove the default placeholder parameter added for algorithms that have no parameters
if 'spras_placeholder' in params:
params.pop('spras_placeholder')
params['container_framework'] = FRAMEWORK
runner.run(wildcards.algorithm, params)
# Declare the input files as a dictionary.
inputs = dict(zip(runner.get_required_inputs(wildcards.algorithm), *{input}, strict=True))
# Remove the _spras_run_name parameter added for keeping track of the run name for parameters.yml
if '_spras_run_name' in params:
params.pop('_spras_run_name')
runner.run(wildcards.algorithm, inputs, output.pathway_file, params, container_settings)

# Original pathway reconstruction output to universal output
# Use PRRunner as a wrapper to call the algorithm-specific parse_output
Expand Down Expand Up @@ -313,7 +309,7 @@ rule viz_cytoscape:
output:
session = SEP.join([out_dir, '{dataset}-cytoscape.cys'])
run:
cytoscape.run_cytoscape(input.pathways, output.session, FRAMEWORK)
cytoscape.run_cytoscape(input.pathways, output.session, container_settings)


# Write a single summary table for all pathways for each dataset
Expand Down
69 changes: 34 additions & 35 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# The length of the hash used to identify a parameter combination
hash_length: 7

# Collection of container options
containers:
# Specify the container framework used by each PRM wrapper. Valid options include:
# - docker (default if not specified)
Expand All @@ -28,17 +29,17 @@ containers:
# For example, "reedcompbio" if the image is available as docker.io/reedcompbio/allpairs
owner: reedcompbio

# Enabling profiling adds a file called 'usage-profile.tsv' to the output directory of each algorithm.
# The contents of this file describe the CPU utilization and peak memory consumption of the algorithm
# as seen by its runtime container.
# NOTE: Profiling is currently supported only when the container framework is set to apptainer/singularity
# and when the host system supports the 'cgroup' filesystem.
# When profiling via HTCondor, this assumes the current process is already in a two-level nested cgroup
# (introduced in HTCondor 24.8.0). To specify a minimum HTCondor version, use the following `requirements`
# expression:
#
# requirements = versionGE(split(Target.CondorVersion)[1], "24.8.0") && (isenforcingdiskusage =!= true)
enable_profiling: false
# Enabling profiling adds a file called 'usage-profile.tsv' to the output directory of each algorithm.
# The contents of this file describe the CPU utilization and peak memory consumption of the algorithm
# as seen by its runtime container.
# NOTE: Profiling is currently supported only when the container framework is set to apptainer/singularity
# and when the host system supports the 'cgroup' filesystem.
# When profiling via HTCondor, this assumes the current process is already in a two-level nested cgroup
# (introduced in HTCondor 24.8.0). To specify a minimum HTCondor version, use the following `requirements`
# expression:
#
# requirements = versionGE(split(Target.CondorVersion)[1], "24.8.0") && (isenforcingdiskusage =!= true)
enable_profiling: false

# This list of algorithms should be generated by a script which checks the filesystem for installs.
# It shouldn't be changed by mere mortals. (alternatively, we could add a path to executable for each algorithm
Expand All @@ -60,23 +61,23 @@ enable_profiling: false

algorithms:
- name: "pathlinker"
params:
include: true
include: true
runs:
run1:
k: range(100,201,100)

- name: "omicsintegrator1"
params:
include: true
include: true
runs:
run1:
b: [5, 6]
w: np.linspace(0,5,2)
d: 10
dummy_mode: "file" # Or "terminals", "all", "others"

- name: "omicsintegrator2"
params:
include: true
include: true
runs:
run1:
b: 4
g: 0
Expand All @@ -85,52 +86,50 @@ algorithms:
g: 3

- name: "meo"
params:
include: true
include: true
runs:
run1:
max_path_length: 3
local_search: "Yes"
local_search: true
rand_restarts: 10

- name: "mincostflow"
params:
include: true
include: true
runs:
run1:
flow: 1 # The flow must be an int
flow: 1
capacity: 1

- name: "allpairs"
params:
include: true
include: true

- name: "domino"
params:
include: true
include: true
runs:
run1:
slice_threshold: 0.3
module_threshold: 0.05

- name: "strwr"
params:
include: true
include: true
runs:
run1:
alpha: [0.85]
threshold: [100, 200]

- name: "rwr"
params:
include: true
include: true
runs:
run1:
alpha: [0.85]
threshold: [100, 200]

- name: "bowtiebuilder"
params:
include: true
include: true

- name: "responsenet"
params:
include: true
include: true
runs:
run1:
gamma: [10]

Expand Down
108 changes: 41 additions & 67 deletions config/egfr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# The length of the hash used to identify a parameter combination
hash_length: 7

containers:
Expand Down Expand Up @@ -29,108 +28,83 @@ containers:

algorithms:
- name: pathlinker
params:
include: true
include: true
runs:
run1:
k:
- 10
- 20
- 70
- name: omicsintegrator1
params:
include: true
include: true
runs:
run1:
b:
- 0.55
- 2
- 10
d:
- 10
g:
- 1e-3
r:
- 0.01
w:
- 0.1
mu:
- 0.008
d: 10
g: 1e-3
r: 0.01
w: 0.1
mu: 0.008
dummy_mode: ["file"]
- name: omicsintegrator2
params:
include: true
include: true
runs:
run1:
b:
- 4
g:
- 0
b: 4
g: 0
run2:
b:
- 2
g:
- 3
b: 2
g: 3
- name: meo
params:
include: true
include: true
runs:
run1:
local_search:
- "Yes"
max_path_length:
- 3
rand_restarts:
- 10
local_search: true
max_path_length: 3
rand_restarts: 10
run2:
local_search:
- "No"
max_path_length:
- 2
rand_restarts:
- 10
local_search: false
max_path_length: 2
rand_restarts: 10
- name: allpairs
params:
include: true
include: true
- name: domino
params:
include: true
include: true
runs:
run1:
slice_threshold:
- 0.3
module_threshold:
- 0.05
slice_threshold: 0.3
module_threshold: 0.05
- name: mincostflow
params:
include: true
include: true
runs:
run1:
capacity:
- 15
flow:
- 80
capacity: 15
flow: 80
run2:
capacity:
- 1
flow:
- 6
capacity: 1
flow: 6
run3:
capacity:
- 5
flow:
- 60
capacity: 5
flow: 60
- name: "strwr"
params:
include: true
include: true
runs:
run1:
alpha: [0.85]
threshold: [100, 200]

- name: "rwr"
params:
include: true
include: true
runs:
run1:
alpha: [0.85]
threshold: [100, 200]

- name: "bowtiebuilder"
params:
include: false
include: false
datasets:
- data_dir: input
edge_files:
Expand Down
Loading
Loading