#!/usr/bin/env python # coding: utf-8 # # Case study 2: Identification of potential drug targets # Systematic MR of molecular phenotypes such as proteins and expression of transcript levels offer enormous potential to prioritise drug targets for further investigation. # However, many genes and gene products are not easily druggable, so some potentially important causal genes may not offer an obvious route to intervention. # # A parallel problem is that current GWASes of molecular phenotypes have limited sample sizes and limited protein coverages. # A potential way to address both these problems is to use protein-protein interaction information to identify druggable targets which are linked to a non-druggable, but robustly causal target. # Their relationship to the causal target increases our confidence in their potential causal role even if the initial evidence of effect is below our multiple-testing threshold. # # Here in case study 2 we demonstrate an approach to use data in EpiGraphDB to # prioritise potential alternative drug targets in the same PPI network, as follows: # # - For an existing drug target of interests, we use PPI networks to search for its directly interacting genes that are evidenced to be druggable. # - We then examine the causal evidence of these candidate genes on the disease. # - We also examine the literature evidence of these candidate genes on the disease. # # The triangulation of MR evidence and literature evidence as available from EpiGraphDB regarding these candidate genes will greatly enhance our confidence in identifying potential viable drug targets. # In[1]: import pandas as pd import requests # In[2]: # Default parameters API_URL = "https://api.epigraphdb.org" # In[3]: # Parameters API_URL = "https://api.epigraphdb.org" # In[4]: print(API_URL) requests.get(f"{API_URL}/ping").json() # ## Parameters # # We illustrate this approach using IL23R, an established drug target for inflammatory bowel disease (IBD) (Duerr et al., 2006; Momozawa et al., 2011). # # While specific IL23R interventions are still undergoing trials, there is a possibility that these therapies may not be effective for all or even the majority of patients. This case study therefore explores potential alternative drug targets. # In[5]: GENE_NAME = "IL23R" OUTCOME_TRAIT = "Inflammatory bowel disease" # ## Using PPI networks for alternative drug targets search # The assumption here is that the most likely alternative targets are either directly interacting with IL23R or somewhere in the PPI network. # In this example, we consider only genes that were found to interact with IL23R via direct protein-protein interactions, and require that those **interacting proteins** should also be **druggable**. # # The thousands of genes are classified with regard to their druggability by Finan et al. 2017, where the **Tier 1** category refers to approved drugs or those in clinical testing while for other tier categories the druggability confidence drops in order **Tier 2** and then **Tier 3**. # # Here we use the # [GET /gene/druggability/ppi](http://docs.epigraphdb.org/api/api-endpoints/#get-genedruggabilityppi) # endpoint to get data on the druggable alternative genes. # In[6]: def get_drug_targets_ppi(gene_name): endpoint = "/gene/druggability/ppi" url = f"{API_URL}{endpoint}" params = {"gene_name": gene_name} r = requests.get(url, params=params) r.raise_for_status() df = pd.json_normalize(r.json()["results"]) return df ppi_df = get_drug_targets_ppi(gene_name=GENE_NAME) ppi_df # For further analysis we select the gene of interest (**IL23R**) # as well as its interacting genes with Tier 1 druggability. # In[7]: def get_gene_list(ppi_df, include_primary_gene: bool = True): if include_primary_gene: gene_list = list(ppi_df["g1.name"].drop_duplicates()) + list( ppi_df.query("`g2.druggability_tier` == 'Tier 1'")["g2.name"] ) else: gene_list = list(ppi_df.query("`g2.druggability_tier` == 'Tier 1'")["g2.name"]) return gene_list gene_list = get_gene_list(ppi_df) gene_list # ## Using Mendelian randomization results for causal effect estimation # The next step is to find out whether any of these genes have a comparable and statistically plausable effect on IBD. # # Here we search EpiGraphDB for the Mendelian randomization (MR) results for these genes and IBD from the recent study by Zheng et al, 2019 (http://epigraphdb.org/xqtl/) via the # [GET /xqtl/single-snp-mr](http://docs.epigraphdb.org/api/api-endpoints/#get-xqtlsingle-snp-mr) # endpoint. # In[8]: def extract_mr(outcome_trait, gene_list, qtl_type): endpoint = "/xqtl/single-snp-mr" url = f"{API_URL}{endpoint}" def per_gene(gene_name): params = { "exposure_gene": gene_name, "outcome_trait": outcome_trait, "qtl_type": qtl_type, "pval_threshold": 1e-5, } r = requests.get(url, params=params) try: r.raise_for_status() df = pd.json_normalize(r.json()["results"]) return df except: return None res_df = pd.concat( [per_gene(gene_name=gene_name) for gene_name in gene_list] ).reset_index(drop=True) return res_df # Search for both pqtl and eqtl xqtl_df = pd.concat( [ extract_mr( outcome_trait=OUTCOME_TRAIT, gene_list=gene_list, qtl_type=qtl_type ).assign(qtl_type=qtl_type) for qtl_type in ["pQTL", "eQTL"] ] ).reset_index(drop=True) xqtl_df # ## Using literature evidence for results enrichment and triangulation # Can we find evidence in the literature where these genes are found to be associated with IBD to increase our level of confidence in MR results or to provide alternative evidence where MR results to not exist? # # We can use the # [GET /gene/literature](http://docs.epigraphdb.org/api/api-endpoints/#get-geneliterature) # endpoint to get data on the literature evidence for the set of genes. # In[9]: def extract_literature(outcome_trait, gene_list): def per_gene(gene_name): endpoint = "/gene/literature" url = f"{API_URL}{endpoint}" params = {"gene_name": gene_name, "object_name": outcome_trait.lower()} r = requests.get(url, params=params) try: r.raise_for_status() res_df = pd.json_normalize(r.json()["results"]) if len(res_df) > 0: res_df = res_df.assign( literature_count=lambda df: df["pubmed_id"].apply(lambda x: len(x)) ) return res_df except: return None res_df = pd.concat( [per_gene(gene_name=gene_name) for gene_name in gene_list] ).reset_index(drop=True) return res_df literature_df = extract_literature(outcome_trait=OUTCOME_TRAIT, gene_list=gene_list) literature_df # ## Reference # # - Duerr RH, Taylor KD, Brant SR, Rioux JD, Silverberg MS, Daly MJ, Steinhart AH, Abraham C, Regueiro M, Griffiths A, others. 2006. A genome-wide association study identifies IL23R as an inflammatory bowel disease gene. Science 314:1461–1463. # # - Finan C, Gaulton A, Kruger FA, Lumbers RT, Shah T, Engmann J, Galver L, Kelley R, Karlsson A, Santos R, others. 2017. The druggable genome and support for target identification and validation in drug development. Science translational medicine 9:eaag1166. # # - Momozawa Y, Mni M, Nakamura K, Coppieters W, Almer S, Amininejad L, Cleynen I, Colombel J-F, De Rijk P, Dewit O, others. 2011. Resequencing of positional candidates identifies low frequency IL23R coding variants protecting against inflammatory bowel disease. Nature genetics 43:43–47. # # - Zheng J, Brumpton BM, Bronson PG, Liu Y, Haycock P, Elsworth B, Haberland V, Baird D, Walker V, Robinson JW, John S, Prins B, Runz H, Nelson MR, Hurle M, Hemani G, Asvold BO, Butterworth A, Smith GD, Scott RA, Gaunt TR. 2019. Systematic Mendelian randomization and colocalization analyses of the plasma proteome and blood transcriptome to prioritize drug targets for complex disease.