This repository is an implementation of MuGLasso applied to GWAS, the method is presented in the paper Multitask group Lasso for Genome Wide association Studies in diverse populations.
We used GWAsimulator tool to generate simulated GWAS data of diverse populations (CEU and YRI) in plink format. Here are the following steps:
- Prepare the input control files, we used
Files/control_CEU.txtandFiles/control_YRI.txtto obtain the used dataset in the paper. - Prepare the input reference data in phased format (to specify in the first line in the controls file). In our case, we used HapMap3 for both subpopulations (CEU and YRI) as input reference for GWAsimulator, it could be downloaded in: https://ftp.ncbi.nlm.nih.gov/hapmap/genotypes/2010-05_phaseIII/. You can use other reference dataset of your choice.
- Generate two subsets for each subpopulation:
GWAsimulator control_ceu.txt [seed number]
GWAsimulator control_yri.txt [seed number]
The obtained output data is in plink format, we merge both populations using plink software (with --bmerge flag). Please make sure that you change the Individual IDs for one subpopulation, as both subpopulations files contains the same IDs, this can be handled in plink using the flag --update-ids.
Quality control steps are required to remove poorly performing SNPs, the following filters were used to obtain the data in the paper:
plink --bfile [data] --maf 0.05 --hwe 1e-4 --make-bed --out [data_qc]
We also did Linkage Disequilibrium pruning to remove strong correlation between SNPs:
plink --bfile [data_qc] --indep-pairwise 50 5 0.85 --out tmp
plink --bfile [data_qc] --extract tmp.prune.in --make-bed --out [data_qc_ld]
More details about how to use GWAsimulator in the github repository: GWAS-admixed-population-simulator.
Hierarchical clustering was used to partitionnate the SNPs in blocks following LD patterns.
To obtain the LD-groups for each subpopulation, we used Adjclust software.
The R code is given in adjclust.R
We then combine those LD-groups into common shared LD-groups for both subpopulations using get_shared_groups.py.
MuGLasso is a multitask approach that performs feature selection at the LD-groups level using group Lasso. The input tasks correspond to subpopulations (two tasks in our simulations case: for CEU and YRI).
The problem is reformulated as a group Lasso with G groups each containing T copies (one per task) of the features of SNPs group.
The reformulated data is obtained in input_matrix.py.
The model is implemented in MuGLasso.py and it is an adaptation of the sparse group Lasso of Gap_safe_rules package, it is a sparse group Lasso with squared loss.
In our implementation, we extend it for a group Lasso with logistic loss as the phenotype in our dataset is categorical (case-control study). Gap safe screening rules make the solvers faster and avoid memory errors by discarding useless coefficients in the optimization procedure. More details in their paper: Gap Safe screening rules for sparsity enforcing penalties.
To improve the stability of the model, we integrate subsampling following Meinshausen procedure. Code in stab_sel.py.
Pearson's stability index: we estimate the stability of the selection of MuGLasso by computing Pearson's stability index implemented in get_stability.py .
Note that a tutorial will be made shortly available in a notebook.
