Skip to content

Commit 3205ba5

Browse files
committed
fix issue where tscore and covariance were producing bic values instead
1 parent d43eba4 commit 3205ba5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

analysis/workflow/rules/plots.smk

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ rule midway:
206206
),
207207
sim_mode="{"+",".join(switch_sim_mode[wildcards.switch])+"}",
208208
allow_missing=True,
209-
)[0]
209+
)[0],
210+
bic=lambda wildcards: "--bic " if wildcards.switch == "bic" else "",
210211
output:
211212
png=out + "/midway_summary.{switch}.pdf",
212213
metrics=out+"/midway_summary_metrics.{switch}.tsv",
@@ -219,7 +220,7 @@ rule midway:
219220
conda:
220221
"../envs/default.yml"
221222
shell:
222-
"workflow/scripts/midway_manhattan_summary.py --bic "
223+
"workflow/scripts/midway_manhattan_summary.py {params.bic}"
223224
"-o {output.png} --verbosity DEBUG --pos-type {params.pos_type} "
224225
"-f <(ls -1 {params.linears_glob}) --color locus "
225226
"{params.linears} {params.causal_hap} {params.case_type} >{output.metrics} 2>{log}"
@@ -242,7 +243,8 @@ rule midway_beta:
242243
),
243244
sim_mode="{"+",".join(switch_sim_mode[wildcards.switch])+"}",
244245
allow_missing=True,
245-
)[0]
246+
)[0],
247+
bic=lambda wildcards: "--bic " if wildcards.switch == "bic" else "",
246248
output:
247249
png=out + "/beta_{beta}/midway_summary.{switch}.pdf",
248250
metrics=out+"/beta_{beta}/midway_summary_metrics.{switch}.tsv",
@@ -255,7 +257,7 @@ rule midway_beta:
255257
conda:
256258
"../envs/default.yml"
257259
shell:
258-
"workflow/scripts/midway_manhattan_summary.py --bic "
260+
"workflow/scripts/midway_manhattan_summary.py {params.bic}"
259261
"-o {output.png} --verbosity DEBUG --pos-type {params.pos_type} "
260262
"-f <(ls -1 {params.linears_glob}) --color locus "
261263
"{params.linears} {params.causal_hap} {params.case_type} >{output.metrics} 2>{log}"

analysis/workflow/scripts/midway_manhattan.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ if [ "$condition" -eq 2 ] || [ "$condition" -eq 3 ] || [ "$condition" -eq 4 ]; t
161161
fi
162162
# now, convert the plink2 --glm results into t-test p-values
163163
"$SCRIPT_DIR"/linear2ttest.py \
164-
--bic \
164+
$extra_flag \
165165
-i "$hap_id" \
166166
--verbosity DEBUG \
167167
-o "$out_prefix".ttest.linear \

0 commit comments

Comments
 (0)