Skip to content

Commit

Permalink
finished Fox module detection rules
Browse files Browse the repository at this point in the history
  • Loading branch information
paolomanlapaz committed Dec 19, 2024
1 parent 7ed58de commit ddb5e6a
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion prepare_data/workflow/rules/module_detection.smk
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ rule module_detect_fox:
mod_detect_dir = config['mod_detect_dir'],
network = config['networks'].keys(),
wcc = config['wcc_threshold'].keys()
),
expand(
"{network_mod_dir}/{network}/MSU/fox/{wcc}/fox-module-list.tsv",
network_mod_dir = config['network_mod_dir'],
network = config['networks'].keys(),
wcc = config['wcc_threshold'].keys()
)

rule execute_fox:
Expand All @@ -59,4 +65,15 @@ rule execute_fox:
params:
wcc_val = lambda wildcards: config['wcc_threshold'][int(wildcards.wcc)]
shell:
"scripts/module_detection/execute_lazyfox.sh {input} {params.wcc_val} {output}"
"scripts/module_detection/execute_lazyfox.sh {input} {params.wcc_val} {output}"

rule get_mod_fox:
input:
fox_result = "{0}/{{network}}/temp/fox/fox-int-module-list-{{wcc}}.txt".format(config['mod_detect_dir']),
node_mapping = "{0}/{{network}}/mapping/int-edge-list-node-mapping.pickle".format(config['mod_detect_dir'])
output:
"{network_mod_dir}/{network}/MSU/fox/{wcc}/fox-module-list.tsv"
shell:
"python scripts/module_util/restore-node-labels-in-modules.py " \
"{input.fox_result} {input.node_mapping} " \
"{wildcards.network_mod_dir}/{wildcards.network}/MSU/fox/{wildcards.wcc} fox"

0 comments on commit ddb5e6a

Please sign in to comment.