How to prepare an input file for MMP

See a tutorial video on how to use the Multiple Manhattan Plot (MMP) tool from the 27th September 2022 Users' Meeting video.

Prepare an input file for the Multiple Manhattan Plot (MMP) tool on your local machine. MMP uses GWAS summary data that is available in Green Library for FinnGen core analysis GWAS results and for Custom GWAS tools results. You can also use your own or external summary stats as input. For summary stats created with other tools (e.g. Pipelines) make a data download request to get the summary data out of the Sandbox and into the Green Downloads bucket. Do not use FinnGen Sandbox for MMP input file preparation as it will slow down your analysis due to the need for data download requests and cause extra admin work.

The program MMP::io that creates the input file for MMP is available at: https://github.com/FINNGEN/mmpio/#readme

See also a presentation of New FinGen tools and their application to example diseases from User's meeting 28th March 2023 recording (at 25min 23sec) including usage of Multiple Manhattan Plot tool.

Step 1: Download the program

Download the MMP::io binary program from GitHub:

  1. Go to MMP::io release page: https://github.com/FINNGEN/mmpio/releases

  2. Download the program matching your platform

  3. Extract this .tar file (e.g. tar -xf mmpio-linux-x86-64.tar)

  4. You should now have a mmpio file and a config.json.sample file in your working directory

Step 2: Configure your input GWAS summary stats

MMP::io needs to know where to find your GWAS summary stats, and what column names are used for chromosome, reference, etc.

This is done by:

  1. Copying the file config.json.sample to config.json

  2. Editing this config.json with the paths to the GWAS summary stats and info about the column names

Here is an example of what the config.json file can look like once correctly edited:

{
  "inputs":
    [
      {
        "tag": "FGFractCountAllAges",
        "filepath": "gwas/FRACTURECOUNT/FRACTURECOUNT.gz",
        "col_chrom": "#chrom",
        "col_pos": "pos",
        "col_ref": "ref",
        "col_alt": "alt",
        "col_pval": "pval",
        "col_beta": "beta",
        "col_af": "af_alt",
        "pval_threshold": 1e-06, 
        "fine_mapping_filepath": null
      },
      {
        "tag": "FGFractCountBin18Y1998",
        "filepath": "gwas/FRACTBIN18Y1998/finngen_R9_sandbox_custom_gwas_FRACTBIN18Y1998_FRACTBIN18Y1998.gz",
        "col_chrom": "#chrom",
        "col_pos": "pos",
        "col_ref": "ref",
        "col_alt": "alt",
        "col_pval": "pval",
        "col_beta": "beta",
        "col_af": "af_alt",
        "pval_threshold": 1e-06,
        "fine_mapping_filepath": null
      }
    ],
  "heterogeneity_tests": []
}

Step 3: Run the program

On the common line, go to the directory containing the files mmpio and config.json. Then run the program:

./mmpio

The program will read all variants below the given significance threshold in each configured summary stat file. It will then take the union of these variants and print out stats from each summary stat file for the union of the variants (NA will be printed if a variant is missing in a summary stat).

While MMP::io is running it will output something like this:

[1/3] Checking variant selection...
- processing FGFractCountAllAges
- processing FGFractCountBin18Y1998
* done FGFractCountBin18Y1998
* done FGFractCountAllAges
[2/3] Getting variant statistics...
- processing FGFractCountAllAges
- processing FGFractCountBin18Y1998
* done FGFractCountBin18Y1998
* done FGFractCountAllAges
[3/3] Writing output to mmp.tsv ...

When the program is finnished you will have a mmp.tsv file that ready for use in MMP.

If you needed you can change the configuration in config.json and run MMP::io again with ./mmp

Last updated