-
Notifications
You must be signed in to change notification settings - Fork 7
An exposition with GIANT data
The example shows details of the implementation (see giant.sh
). The GIANT consortium study of BMI on Europeans led to the following tab-delimited summary statistics, sorted by SNPs, as in Locke, et al. (2015), called
BMI-EUR.gz in brief,
SNP A1 A2 Freq1.Hapmap b se p N
rs1000000 G A 0.6333 1e-04 0.0044 0.9819 231410
rs10000010 T C 0.575 -0.0029 0.003 0.3374 322079
rs10000012 G C 0.1917 -0.0095 0.0054 0.07853 233933
rs10000013 A C 0.8333 -0.0095 0.0044 0.03084 233886
...
from which we generated the following z-score file EUR/bmi.txt
:
rs10 C A -0.571429
rs1000000 G A 0.0227273
rs10000010 T C -0.966667
rs10000012 G C -1.75926
rs10000013 A C -2.15909
...
Now that the GWAS summary statistics file contains no SNP positions, but has already been sorted by SNP id and aligned by strand, we can then call twas2.sh
as follows,
mkdir -p EUR/MET
ln -sf EUR/bmi.txt EUR/MET/twas2.txt
dir=`pwd`
twas2.sh $TWAS $TWAS2 $dir/EUR MET 1
where MET specifies weights from METSIM population as in Gusev et al. (2016) and we start from block 1 of the gene list involving 25 genes.
Again we resort to parallel computing for all blocks,
parallel -j8 twas2.sh {1} {2} {3} {4} {5} ::: $TWAS ::: $TWAS2 ::: $dir/EUR ::: MET ::: $(seq 1000)
where we iterate through all sets of weight (MET, NTR and YFS) using 8 CPUs.
If we provide ALL/bmi.txt
based on all population results, called BMI-ALL.gz in brief, and create all the necessary links as bove, then we simply replace $dir/EUR with $dir/EUR $dir/ALL in the call to parallel above.
The imputation resuls are available from
twas2-collect.sh EUR
twas2-collect.sh ALL
In particular, imputation can also be done for a specific gene, e.g., BRCA1 and YFS:
twas2-1.sh $TWAS $TWAS2 $dir/EUR YFS BRCA1
so the results are written into BRCA1/YFS/BRCA1.imp. Note that by doing so, intermediate files with extensions .join
, .sort
, .zscore
are available for check
Reference
Locke AM, et al.(2015). Genetic studies of body mass index yield new insights for obesity biology. Nature, 518, 197-206