Skip to content

Commit

Permalink
improve modularity
Browse files Browse the repository at this point in the history
  • Loading branch information
bfclarke committed Apr 11, 2024
1 parent b964fda commit dd41088
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
22 changes: 22 additions & 0 deletions pipelines/association_testing/regress_eval.snakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
configfile: 'config.yaml'

debug_flag = config.get('debug', False)
debug = '--debug ' if debug_flag else ''

phenotypes = config['phenotypes']
phenotypes = list(phenotypes.keys()) if type(phenotypes) == dict else phenotypes

n_burden_chunks = config.get('n_burden_chunks', 1) if not debug_flag else 2
n_regression_chunks = config.get('n_regression_chunks', 40) if not debug_flag else 2
n_avg_chunks = config.get('n_avg_chunks', 40)

do_scoretest = '--do-scoretest ' if config.get('do_scoretest', False) else ''

cv_exp = config.get("cv_exp", False)
config_file_prefix = (
"cv_split0/deeprvat/" if cv_exp else ""
)
########### Average regression
rule all_evaluate:
input:
expand("{phenotype}/deeprvat/eval/significant.parquet",
phenotype=phenotypes),
expand("{phenotype}/deeprvat/eval/all_results.parquet",
phenotype=phenotypes),

rule evaluate:
input:
associations ='{phenotype}/deeprvat/average_regression_results/burden_associations.parquet',
Expand Down
8 changes: 4 additions & 4 deletions pipelines/association_testing/regress_eval_regenie.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ rule regenie_step2:
bgen = "regenie_input/deeprvat_pseudovariants.bgen",
covariate_file = "regenie_input/covariates.txt",
phenotype_file = "regenie_input/phenotypes.txt",
step1_loco = expand("regenie_output/step1/deeprvat_{pheno_num}.loco",
pheno_num=range(1, len(phenotypes) + 1)),
# step1_loco = expand("regenie_output/step1/deeprvat_{pheno_num}.loco",
# pheno_num=range(1, len(phenotypes) + 1)),
step1_predlist = "regenie_output/step1/deeprvat_pred.list"
# step1_loco = expand("regenie_output/step1/deeprvat_l1_{pheno_number}.loco",
# pheno_number=range(len(phenotypes))),
Expand Down Expand Up @@ -110,8 +110,8 @@ rule regenie_step1:
covariate_file = "regenie_input/covariates.txt",
phenotype_file = "regenie_input/phenotypes.txt",
output:
expand("regenie_output/step1/deeprvat_{pheno_num}.loco",
pheno_num=range(1, len(phenotypes) + 1)),
# expand("regenie_output/step1/deeprvat_{pheno_num}.loco",
# pheno_num=range(1, len(phenotypes) + 1)),
"regenie_output/step1/deeprvat_pred.list"
threads: 24
resources:
Expand Down

0 comments on commit dd41088

Please sign in to comment.