Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 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
3a76af4
feat: json schema
tristan-f-r Jul 28, 2025
e8d2e63
Merge branch 'main' into schemaa
tristan-f-r Aug 14, 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
3ed974f
docs: cmt on schema
tristan-f-r Sep 6, 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
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
fb3fa0e
Merge branch 'container-schema-use' into config-args
tristan-f-r Nov 7, 2025
313fac2
Merge branch 'umain' into config-args
tristan-f-r Nov 8, 2025
a50c181
Merge remote-tracking branch 'upstream/main' into config-args
tristan-f-r Nov 8, 2025
c3be550
docs: update contributing
tristan-f-r Nov 8, 2025
830b07c
chore: drop directed info
tristan-f-r Nov 10, 2025
b2d4239
Merge branch 'config-args' of https://github.com/tristan-f-r/spras in…
tristan-f-r Nov 10, 2025
3b84e8f
docs: typo?
tristan-f-r Nov 21, 2025
33a85d8
chore: apply suggestions, fix meo param
tristan-f-r Nov 21, 2025
81a16fe
docs: move domino cmt
tristan-f-r Nov 21, 2025
25e8b67
docs: more suggestions
tristan-f-r Nov 21, 2025
dce8e42
docs: more cmts
tristan-f-r Nov 21, 2025
df25d11
Merge branch 'config-args' into schemaa
tristan-f-r Nov 21, 2025
2bbdb80
chore: update schema
tristan-f-r Nov 21, 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
17 changes: 6 additions & 11 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ _config.init_global(config)

out_dir = _config.config.out_dir
algorithm_params = _config.config.algorithm_params
algorithm_directed = _config.config.algorithm_directed
pca_params = _config.config.pca_params
hac_params = _config.config.hac_params
container_settings = _config.config.container_settings
Expand Down Expand Up @@ -273,16 +272,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_settings'] = container_settings
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
50 changes: 26 additions & 24 deletions config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Specify the schema:
# yaml-language-server: $schema=schema.json

# Global workflow control

# 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 Down Expand Up @@ -60,23 +64,23 @@ containers:

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 +89,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