Skip to content

About

Scripts accompanying O'Connor and Sella bioRxiv

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Scripts to reproduce results from O'Connor & Sella 2025

This repository contains scripts to reproduce results from O'Connor & Sella 2025. It relies upon the Fourier Mixture Regression repository.

Installation and data download

git clone https://github.com/lukejoconnor/FMR.git
git clone https://github.com/lukejoconnor/polygenicity_scripts.git
mkdir FMR/matfiles
curl -L -o FMR/matfiles.zip https://www.dropbox.com/sh/mclm1urkxs8ga80/AADDDABQYeGtyQxmom2raMkva
unzip FMR/matfiles.zip -d FMR/matfiles

Downloading the data from Dropbox will take several minutes. The size of the download is 6GB. The larger files with LD matrices and Fourier scores are not actually required for these scripts, so you may also choose to download individual files from the Dropbox link.

Contents

The MATLAB folder contains two scripts:

  • compare_polygenicities.m reproduces Figure 1 of the paper.
  • estimate_polygenicity.m reproduces Figure 3 of the paper.

A subdirectory MATLAB/as-is contains a simulation script which was used to produce Figure 2 of the paper. This script is provided as-is; reproducing results yourself will require multiple steps of installation and manual path manipulation.

The Figure 3 analysis uses MATLAB/helpers/compute_polygenicity.m to evaluate Equation 15 directly. Its primary interface is:

Pi = compute_polygenicity(sigma2, omega, h2, measure)

Here sigma2 contains the unnormalized FMR component variances in phenotypic- variance units, each row of omega contains component heritability fractions that sum to one, and measure is entropy, effective, or softmax. The helper retains backward compatibility with the previous (x,w,f,finv) interface. See the function documentation and analysis/README.md for the equation, numerical-stability details, and verification commands.

Links and citations

About

Scripts accompanying O'Connor and Sella bioRxiv

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages