Accurate genetic and environmental covariance estimation with composite likelihood in genome-wide association studies
To install the GECKO, it's easiest to use the 'devtools' package.
#install.packages("devtools")
library(devtools)
install_github("borangao/GECKO")
The following help page will provide quick references for GECKO package, an example data is provided with the package.
library(GECKO)
package?GECKO
sumstat_1 and sumstat_2 are the files of the summary statistics with column name chr, bp, SNP, A1, A2, N, Z, P representing chromosome, base pair position, SNP iD, major allele, minor allele, number of individuals in the study, Z score, P value. ldscore is the LD score file generated by LDSC software using 1000 genome reference panel. The example data and LD score could be accessed using the code below.
data(sumstat_1)
data(sumstat_2)
data(ldscore)
There are 6 arguments needed to be specified by GECKO including number of observation of the both studies, number of overlapped samples, whether to use weighted composite-lieklihood (usually is specified TRUE to increase estimation accuracy), whether fix environmental covariance to be zero if it's known that there is no overlapped sample, whether testing for the genetic and envrionmental covariance (It takes more time to test for the significant genetic and envrionmental covariance).GECKO_R is the function to calculate genetic and environmental covariance. The example code of analysis is listed below.
n1in<-round(mean(sumstat_1$N))
n2in<-round(mean(sumstat_2$N))
nsin<-0
Weightin = T #is always set for GECKO to improve the efficiency
Fix_Vein = T #(if two studies have non-overlapped samples, otherwise false)
Test = T #Test for significance or not
###Need to specify the number of individuals within each study: n1,n2, and number of the overlapping individuals in the two studies:nsin
###if the two samples are from the separate studies, nsin = 0, and Fix_Vein = 1
###if the two samples are from the same study, nsin need to be specified
Result<-GECKO_R(sumstat_1,sumstat_2,n1in,n2in,nsin,ldscore,Weightin,Fix_Vein,Test)
This package is developed and maintained by Boran Gao ([email protected]).