Kipoi-GWAS: Streamlined Variant Analysis Workflow with UK BioBank Data, Kipoi.

public public 1yr ago 0 bookmarks

Kipoi-GWAS is a snakemake pipeline which

  • downloads UK BioBank association files

  • merges the annotation files with variant effect predictions using Kipoi

  • runs FGWAS to fine-map variants

  • generates a report

A sample report can be found here: src/fgwas_plot.ipynb .

General workflow of Kipoi-GWAS

Installation

  1. Clone the git repo.
git clone https://github.com/NCBI-Hackathons/Kipoi-GWAS
  1. Install conda environment.
conda env create -f environment.yml
  1. Install the python package
cd Kipoi-GWAS; pip install .

Folder structure

Here is the complete folder structure.

input/
 UKBB/ # UK-biobank phenotypes downloaded from the UK Biobank site. Select phenotypes of interest. TODO
 {phenotype}.gwas.imputed_v3.both_sexes.tsv.bgz	{phenotype}.gwas.imputed_v3.both_sexes.tsv # after untarring the .bgz file
 anno/ # variant annotation of the phenotypes found in UKBB
 kipoi/ # annotated variants using `kipoi veff score_variants`
 subset/
 {chr}/
 {model}.tsv.gz
output/
 {phenotype}/
 subset/
 {chr}/
 {run-id}/
 metadata.json # information about the run
 fgwas/
 input/ # input tables for fgwas
 output/ # output of fgwas, includes default outputs
 report/ # reports
 fig1.ipynb
 fig1.html

Placeholders

  • {phenotype} - the UKBB phenotype code goes here

  • {chr} - results are generated for associations in a particular chromosome. Example: chr12

  • {run-id} - this is a manually selected placeholder which allows for the pipeline to be run for different combinations of variant annotations

Code Snippets

13
14
shell:
    "my_command -i {input.tsv} -type {params.study_type} -o {params.prefix}"
58
59
60
61
62
63
run:
    render_ipynb(input.ipynb, output.ipynb,
                 params=dict(fgwas_output=input.fgwas,
                             gwas=input.tsv,
                             chr=wildcards.chr))
    jupyter_nbconvert(output.ipynb)
16
17
shell:
    "wget {params.url} -O {output.bgz}"
SnakeMake From line 16 of rules/ukbb.smk
25
26
shell:
    "zcat {input.bgz} > {output.tsv}"
SnakeMake From line 25 of rules/ukbb.smk
35
36
37
run:
    study = config['study_hash'][wildcards.phenotype]
    prepare(wildcards.phenotype, input.tsv, study, input.phenotype_tsv, output.tsv)
SnakeMake From line 35 of rules/ukbb.smk
ShowHide 5 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://github.com/NCBI-Hackathons/Kipoi-GWAS
Name: kipoi-gwas
Version: 1
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Downloaded: 0
Copyright: Public Domain
License: MIT License
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...