-
Notifications
You must be signed in to change notification settings - Fork 0
/
calc_prs_cv_pt3.sh
33 lines (27 loc) · 970 Bytes
/
calc_prs_cv_pt3.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
source constants_.sh
source parse_args.sh "$@"
source init_args_pt.sh
source init_args_cv.sh
prs_prefix="prs.cv.pt3_${pheno}_${pop}"
ds_prefix="ds__" # ds_${pheno}_${pop}"
if [[ ${stage} -le 1 ]]; then
sub_tmp=${sub}
sub=""
source pt3.sh
sub=${sub_tmp}
fi
if [[ ${stage} -le 3 ]]; then
if [[ -f "${datasets_path}${target}/pheno${sub}" ]]; then
if [[ ${continuous} == "false" ]]; then
echo Finding the best-fit PRS with binary phenotypes
Rscript calc_metrics_cv_pt3.R --discovery=${discovery} --target=${target} --imp=${imp} \
--suffix=${test_suffix} --rep=${rep} --sub=${sub} --analysis_type="cv";
else
echo Finding the best-fit PRS with continuous phenotypes
Rscript best_fit_prs_continuous.R ${discovery} ${target} ${imp} ${hp} ${sub};
fi
else
echo "No pheno named pheno${sub} was found under ${target}"
fi
fi