PYPE: A Python pipeline for phenome-wide association (PheWAS) and mendelian randomization in investigator-driven phenotypes and genotypes of biobank data

Motivation Phenome-wide association studies (PheWASs) serve as a way of documenting the relationship between genotypes and multiple phenotypes, helping to uncover new and unexplored genotype-phenotype associations (known as pleiotropy). Secondly, Mendelian Randomization (MR) can be harnessed to make causal statements about a pair of phenotypes (e.g., does one phenotype cause the other?) by comparing the genetic architecture of the phenotypes in question. Thus, approaches that automate both PheWAS and MR can enhance biobank scale analyses, circumventing the need for multiple bespoke tools for each task by providing a comprehensive, end-to-end pipeline to drive scientific discovery. Results We present PYPE, a Python pipeline for running, visualizing, and interpreting PheWAS. Our pipeline allows the researcher to input genotype or phenotype files from the UK Biobank (UKBB) and automatically estimate associations between the chosen independent variables and the phenotypes. PYPE also provides a variety of visualization options including Manhattan and volcano plots and can be used to identify nearby genes and functional consequences of the significant associations. PYPE additionally provides the user with the ability to run Mendelian Randomization (MR) under a variety of causal effect modeling scenarios (e.g., Inverse Variance Weighted Regression, Egger Regression, and Weighted Median Estimation) to identify possible causal relationships between phenotypes. Availability and Implementation PYPE is a free, open-source project developed entirely in Python and can be found at https://github.com/TaykhoomDalal/pype. PYPE is published under the Apache 2.0 license and supporting documentation can be found at the aforementioned link. Contact Chirag_Patel@hms.harvard.edu