Running Imputation Locally

With the new Imputation Server 2 pipeline, you can conveniently run your imputation workflow locally on the commandline using Nextflow. This can be done either by setting up a local imputation server or, as in this example, by running it directly from the command line.

Prerequisites

The following software is required to set up your local imputation workflow. This has been tested on various Linux distributions as well as macOS:

  • Java 17 or higher
  • Nextflow
  • Docker or Singularity

Setup

First, download all required data:

# Create temp directory
mkdir imputationserver
cd imputationserver
# Download Input Data
wget https://genepi.i-med.ac.at/downloads/imputation/gwas.array.hapmap.chr20.vcf.gz
# Download and unzip Reference Panel
wget https://imputationserver.sph.umich.edu/resources/ref-panels/imputationserver2-hapmap2.zip
unzip imputationserver2-hapmap2.zip -d hapmap2

Next, create a configuration file named imputation.config with the following content:

params {
    project                     = "my-test-project"
    build                       = "hg19"
    files                       = "gwas.array.hapmap.chr20.vcf.gz"
    allele_frequency_population = "eur"
    mode                        = "imputation"
    refpanel_yaml               = "hapmap2/imputation-hapmap2.yaml"
    output                      = "results"
    encryption.enabled          = false
}

Run Imputation

Execute the pipeline with Nextflow:

nextflow run genepi/imputationserver2 -r v2.0.9  -c imputation.config -profile docker
Note

If you are running this on a server with Singularity, change the profile to "singularity" instead of "docker".

Results

The results can be accessed directly in the results folder.