Skip to content

Commit

Permalink
Add in association-only flag in rule config. Add in rule evaluate to …
Browse files Browse the repository at this point in the history
…complete cv-training-association-testing pipeline.
  • Loading branch information
meyerkm committed May 2, 2024
1 parent 26ae231 commit 45064d8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pipelines/cv_training/cv_training.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ use rule config from deeprvat_workflow as deeprvat_config with:
for b in input.baseline
]) if wildcards.phenotype in training_phenotypes else ' ',
baseline_out = lambda wildcards: f'--baseline-results-out cv_split{wildcards.cv_split}/deeprvat/{wildcards.phenotype}/deeprvat/baseline_results.parquet' if wildcards.phenotype in training_phenotypes else ' ',
seed_genes_out = lambda wildcards: f'--seed-genes-out cv_split{wildcards.cv_split}/deeprvat/{wildcards.phenotype}/deeprvat/seed_genes.parquet' if wildcards.phenotype in training_phenotypes else ' '

seed_genes_out = lambda wildcards: f'--seed-genes-out cv_split{wildcards.cv_split}/deeprvat/{wildcards.phenotype}/deeprvat/seed_genes.parquet' if wildcards.phenotype in training_phenotypes else ' ',
association_only = lambda wildcards: f'--association-only' if wildcards.phenotype not in training_phenotypes else ' '



Expand Down
11 changes: 9 additions & 2 deletions pipelines/cv_training/cv_training_association_testing.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,21 @@ wildcard_constraints:
cv_splits = config.get("n_folds", 5)
cv_exp = True



include: "cv_training.snakefile"
include: "cv_burdens.snakefile"
include: "../association_testing/burdens.snakefile"
include: "../association_testing/regress_eval.snakefile"


rule all_evaluate: #regress_eval.snakefile
input:
significant=expand(
"{phenotype}/deeprvat/eval/significant.parquet", phenotype=phenotypes
),
results=expand(
"{phenotype}/deeprvat/eval/all_results.parquet", phenotype=phenotypes
),


rule all_regression: #regress_eval.snakefile
input:
Expand Down
6 changes: 5 additions & 1 deletion pipelines/training/config.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ rule config:
baseline_out=lambda wildcards: f"--baseline-results-out {wildcards.phenotype}/deeprvat/baseline_results.parquet"
if wildcards.phenotype in training_phenotypes
else " ",
association_only=lambda wildcards: f"--association-only"
if wildcards.phenotype not in training_phenotypes
else " ",
shell:
(
"deeprvat_config update-config "
"--phenotype {wildcards.phenotype} "
"{params.baseline_results}"
"{params.association_only} "
"{params.baseline_results} "
"{params.baseline_out} "
"{params.seed_genes_out} "
"{input.config} "
Expand Down

0 comments on commit 45064d8

Please sign in to comment.