Skip to content

S PrediXcan on Windows

Alvaro Barbeira edited this page Mar 2, 2020 · 3 revisions

Setting up MetaXcan and running the example

S-PrediXcan stands on the shoulders of giants: it is built upon Python 3.5, pandas, numpy, and scipy. The easiest way to install these prerequisites in Windows is via Conda.

The following explains how to install and run S-Predixcan using conda on a clean system; you can skip any steps that you have completed in the past.

Conda

You can install Anaconda, a flavor of Conda, with the appropriate installer from this site (at the end, it will prompt for adding anaconda software to the system path and making it the default system python; leave both checked).

If you are using Power Shell instead of Command Prompt, you need to use scripts from this project

Create a python environment with required libraries

Open a Command Prompt/Power Shell window and execute the following commands:

conda create --name basic python=3.5
activate basic
conda install --name basic numpy
conda install --name basic scipy

Check out MetaXcan software

The official MetaXcan project lies at this url There are two options: either using git versioning software, that allows for easier updates, or downloading a zip package from the website.

The first option is favored, and can be achieved at the command prompt by typing:

git clone https://github.com/hakyimlab/MetaXcan

S-PrediXcan Example

Download example data, into \software subfolder in the metaxcan folder, and uncompress it (for example, by using 7-zip)

You can then run it by typing the following command at the MetaXcan project folder:

python .\SPrediXcan.py `
--model_db_path data\DGN-WB_0.5.db `
--covariance data\covariance.DGN-WB_0.5.txt.gz `
--gwas_folder data\GWAS `
--gwas_file_pattern ".*gz" `
--beta_column BETA `
--pvalue_column P `
--output_file results\test.csv