-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_imputation_panel_from_unphased.sh
31 lines (20 loc) · 1.33 KB
/
generate_imputation_panel_from_unphased.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
#!/bin/bash
set -e
source constants_.sh
source parse_args.sh "$@"
# Parse input
if [[ -z ${chr} ]]; then echo "Please specify chr index"; exit 1; fi
if [[ -z ${panel} ]]; then echo "Please specify panel"; exit 1; fi
if [[ -z ${thread} ]]; then thread=30; fi
# shapeit -convert \
# --input-haps ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/chr${chr}.ref.haps ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/chr${chr}.ref.sample \
# --output-haps ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/phased/chr${chr}.phased \
# --thread ${thread}
echo shapeit -convert \
--input-haps ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/phased/chr${chr}.phased \
--output-ref ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/chr${chr}.ref.hap ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/chr${chr}.ref.legend.gz ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/chr${chr}.ref.sample \
--thread ${thread}
shapeit -convert \
--input-haps ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/phased/chr${chr}.phased \
--output-ref ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/chr${chr}.ref.hap ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/chr${chr}.ref.legend.gz ${PRS_DATASETS}/${panel%_*}/imputation_panels/${panel#*_}/chr${chr}.ref.sample \
--thread ${thread}