R-package which allows the user to fit structural equation models based on the summary statistics obtained from genome wide association studies (GWAS). Until explicitly stated otherwise the code on this github is an alpha version (now on version 0.0.2) and under active development. The code may thus produce undesired results on certain operating systems or when run concurrently with specific packages or R versions. Feel free to raise issues if (or when...) the package produces undesired results, we will attempt to swiftly deal with known issues. Please visit the wiki to get started, or check out the paper. If you are having issues and not finding the answers anywhere on the wiki or FAQs page, we encourage you to post your question on the google group.
Code Update: On December 4th, 2019 we combined the addSNPs and multivariate GWAS functions and their parallel counterparts into a single function to reduce memory load and the number of steps in the analytic pipeline. Previous pipelines using addSNPs output can still be used, but the user will need to be sure to specify the correct arguments for the GWAS functions in the subsequent step.
CODE UPDATE 2 On January 8th, 2020 we corrected a bug in sumstats, which prepares summary statistics for GWAS, Prior to this fix, a small proportion of SNPs were omitted erroneously. In some GWAS of rigourously cleaned SNPs we found no SNPs affected at all, but from all SNP (i.e. analyses that retain low MAF and low INFO SNPs) more SNPs are affected (1-5%). Specifically the code removed SNPs with duplicate basepair positions, but did not consider chromosome when doing so. This bug did not affect Genomic SEM models without SNPs, and did not affect estimates for SNPs that were included in GWAS. The bug simply resulted in a small proportion of SNPs being arbitrarily removed from consideration.
PGC worldwide lab meeting on genomicSEM
Click below for a video which provides a very clear introduction to the method/paper:
Contents of the wiki:
Learn how to install GenomicSEM
Consider some of the nuances of summary data, and know where to find summary data.
Fit SEM models to GWAS summary data without a SNP.
Run a GWAS where the SNP is included in the structural equation model.
Combine GenomicSEM and OpenMX.
Installation:
We assume you are running R 3.4.1 or newer. We guarantee no backward or forward comparability. If something breaks please raise the issue on GitHub and we will try and fix it ASAP.
First, you need to install the devtools package. You can do this from CRAN, launch R and then type
install.packages("devtools")
Load the devtools package.
library(devtools)
Now you are ready to install the latest version of GenomicSEM
install_github("MichelNivard/GenomicSEM")
That's it! You are ready to start using GenomicSEM
License
Copyright (C) 2018 Andrew Grotzinger, Mijke Rhemtulla, Hill F. Ip, Michel Nivard, & Elliot Tucker-Drob
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
