Giter Club home page Giter Club logo

spagrm's Introduction

SPAGRM introduction

SPAGRM is a scalable, accurate, and universal analysis framework to control for sample relatedness in large-scale genome-wide association studies (GWAS). In the paper A scalable, accurate, and universal analysis framework to control for sample relatedness in large-scale genome-wide association studies and its application to 79 longitudinal traits in UK Biobank (to be updated), we applied SPAGRM to analyze 79 longitudinal traits extracted from UK Biobank primary care data. As a universal analysis framework, we also evaluated SPAGRM's performance in quantitative and binary trait analysis.

SPAGRM is now implemented in the GRAB package. Please click here to download.

Detailed documentation about how to use SPAGRM is available at SPAGRM documentation.

Summary statistics of 79 longitudinal traits extracted from UK Biobank primary care data is available at here.

About this repository

This repository contains:

  1. old version of SPAGRM;
  2. figures of GWAS results of 79 longitudinal traits;
  3. materials for reproducing the experiments.

SPAGRM reproducibility

Scripts to reproduce the experiments performed for the SPAGRM manuscript:

A scalable, accurate, and universal analysis framework to control for sample relatedness in large-scale genome-wide association studies and its application to 79 longitudinal traits in UK Biobank (to be updated)

Real data analysis

  1. extract longitudinal traits from UK Biobank primary care data
In real_data\1.extract_pheno:
# phecode-2023-05-10XH.R defines the Read v2 and CTV3 code terms for 79 longitudinal traits.
# real_data_extra-2023-05-01XH.R preprocesses the gp_clinical table.
  1. preprocess longitudinal traits
In real_data\2.preprocess:
# XXX_preprocess.R extracts longitudinal traits from gp_clinical table and preprocesses each longitudinal traits.
  1. fit the null model via WiSER package
In real_data\3.null_fitter:
# XXX_null_fitter.jl fits the null model and obtains model residuals for each longitudinal trait.
  1. GWAS analysis
  • SPAGRM analysis
In real_data\4.1.SPAGRM:
# XXX_SPAGRM.R conducts the SPAGRM analysis with two parts: 1). pre-calculate of the joint distribution of genotypes and 2). conduct genome-wide association studies for each SNP.
  • TrajGWAS analysis
In real_data\4.2.TrajGWAS:
# XXX_TrajGWAS.jl conducts the TrajGWAS analysis.
  1. PRS adjustment (optional)
In real_data\5.PRS_adjustment (optional):
# 1.select_index_SNPs_from_results_of_SPAGRM.R selects independent SNPs that pass the given p value threshold based on the GWAS results of SPAGRM.
# 2.estimate_effect_sizes_XXX.jl estimate the effect sizes of index SNPs via WiSER package.
# 3.construct_LOCO-PRS.R constructs the Leave One Chromosome Out Polygenic Risk Scores (LOCO-PRS).
# 4.adjust_PRS_in_null_model_fitting_XXX.jl adds the PRS into the null model fitting.
# 5.second_round_of_GWAS_via_SPAGRM.R conducts the second round of GWAS via SPAGRM.

Simulation study

In simulation:
# 1.simupheno contains R script to simulate longitudinal data.
# 2.typeIerror contains scripts to conduct 1e9 type I error simulations.
# 3.power contains scripts to conduct 1e3 power simulations.

spagrm's People

Contributors

hexupku avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.