-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheight.sh
32 lines (27 loc) · 1.14 KB
/
height.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
#!/bin/bash
# 16-1-2019 JHZ
export HEIGHT=https://portals.broadinstitute.org/collaboration/giant/images/0/01/GIANT_HEIGHT_Wood_et_al_2014_publicrelease_HapMapCeuFreq.txt.gz
# snp150.txt as described in /~https://github.com/jinghuazhao/SUMSTATS
wget -qO- $HEIGHT | \
awk 'NR>1' | \
sort -k1,1 | \
join -13 -21 snp150.txt - | \
awk '($9!="X" && $9!="Y" && $9!="Un"){if(NR==1) print "SNP CHR BP A1 A2 Z N"; else print $1,$2,$3,$4,$5,$7/$8,$10}' > height
# SNP - rs ID of the SNP (e.g. rs62442).
# CHR - Chromosome number of the SNP. This should be a number between 1 and 22.
# BP - Base pair position of the SNP.
# A1 - Effect allele of the SNP. The sign of the Z-score is with respect to this allele.
# A2 - The other allele of the SNP.
# Z - The Z-score of the SNP.
# N - Sample size of the SNP.
export HESS=/scratch/jhz22/hess
for chrom in $(seq 22)
do
python hess.py \
--local-hsqg height \
--chrom $chrom \
--bfile $hess/1kg_eur_1pct/1kg_eur_1pct_chr${chrom} \
--partition $hess/nygcresearch-ldetect-data-ac125e47bf7f/EUR/fourier_ls-chr${chrom}.bed \
--out step1
done
python hess.py --prefix step1 --out step2