logo

Baptiste Couvy-Duchesne, Futao Zhang, Kathryn E. Kemper, Julia Sidorenko, Naomi R. Wray, Peter M. Visscher, Olivier Colliot, Jian Yang

The code is presented in a serie of Rmarkdown files with corresponding html knitted files that compose this website. It presents the code allowing the perform all analyses and generate plots presented in the manuscript.

1 Dependencies

qsubshcom
Sections of the code in bash may be run directly on a high performance cluster thanks to the qsubshcom piece of software. (https://github.com/zhilizheng/qsubshcom)
In short, qsubshcom is a job submission wrapper that adapts automatically to the cluster system, which makes our code highly portable: you only need to set up a few paths (see below) and run on you cluster.

Steps that do not require much time/memory were sometimes run in an interactive session (they come without the qsubshcom syntax)

FreeSurfer 6.0
Image processing required FreeSurfer 6.0 (https://surfer.nmr.mgh.harvard.edu/) - NB: the UKB now processed the images for you.

ENIGMA-shape
Subcortical processing relied on scripts developped by Boris Gutman for the ENIGMA consortium (http://enigma.ini.usc.edu/protocols/imaging-protocols/).

OSCA
Most of the mixed model analyses were performed using the OSCA software (https://cnsgenomics.com/software/osca/#Overview).

R
Plots and some data management were performed using R version 4.0. See manuscript (or code) for the full list of packages used.

2 Atlas files

We created a bunch of files to facilitate the analysis. They may be used to prune out vertices outside of the cortex or to relate each vertex to a cortical/subcortical region. They are available in the atlas folder of this repository.

3 General organisation of the working directory ${wd}

Input folders

/${wd}  
    /00_BodFiles                            *Binary vertex-files - see OSCA for format description*
                                            *- see https://baptistecd.github.io/Brain-LMM/ for the*
                                            *code used to process MRI images and create tables*
    /UKB_phenotypes_15K                     *Folder containing individual phenotype files*
                                            *( format : eid eid phenotype)*  
        

Output folders

/${wd}  
    /01_vertexSelection                     *List of vertices (randomly) selected to be associated*  
    /02_phenotypesSimul                     *Simulated phenotypes*  
    /03_BWAS_uncorrected_allModa            *Output folder for model "GLM without covariates"*
                                            *- on simulated phenotypes*  
    /03_BWAS_uncorrected_realPheno          *Output folder of the GLM on real UKB phenotypes*  
    /03_BWAS_uncorrected_allModa_clusterFWER    *List and description of significant clusters*
                                            *(simulated and real phenotypes)*  
    /[...]                                  *Similar naming for the other models*   
    /15_BWAS_prediction                     *Results of prediction accuracy (simulated and real phenotypes)*  
 




A work by by [Baptiste Couvy-Duchesne] - 13 June 2022