Python functions for opentargets.org API

Overview

What is opy_Targets?

Opentargets.org uses GraphQL API to explore it's content via coding. This ensemble of functions aim is to make it easy to use the API via our beloved coding language - python <3

Python dependencies

(requires Python 3)

  • pandas
  • requests
  • json

Usage

Example:

Lets say you want to get SNPS of gene you think is related to a disease

import opy_targets as opy

ENDOMETRIOSIS_EFO_ID = 'EFO_0001065'
SNP_ESNG_ID = ENSG00000196208

opy.get_snp_data(SNP_ESNG_ID,ENDOMETRIOSIS_ID).head(4)

output:

variantRsId variantId studyId studySampleSize publicationFirstAuthor label chr location disease_ID gene_related
0 rs11674184 2_11581409_T_G GCST004549 208903 Sapkota Y intron_variant 2 11581409 EFO_0001065 ENSG00000196208
1 rs11674184 2_11581409_T_G GCST004549_2 208903 Sapkota Y intron_variant 2 11581409 EFO_0001065 ENSG00000196208
2 rs13394619 2_11587381_G_A GCST001720 13997 Nyholt DR intron_variant 2 11587381 EFO_0001065 ENSG00000196208
3 rs77294520 2_11520829_G_C GCST004549_2 208903 Sapkota Y intergenic_variant 2 11520829 EFO_0001065 ENSG00000196208

Most of the chances you don't know the genes related to the disease. NO PROBLEM!

Lets say you want to know which SNP associate with a disease you study

import opy_targets as opy

#

ENDOMETRIOSIS_EFO_ID = 'EFO_0001065'

opy.get_SNP_df(ENDOMETRIOSIS_ID).head()

output:

variantRsId variantId studyId studySampleSize publicationFirstAuthor label chr location disease_ID gene_related
0 rs11674184 2_11581409_T_G GCST004549 208903 Sapkota Y intron_variant 2 11581409 EFO_0001065 ENSG00000196208
1 rs13394619 2_11587381_G_A GCST001720 13997 Nyholt DR intron_variant 2 11587381 EFO_0001065 ENSG00000196208
2 rs77294520 2_11520829_G_C GCST004549_2 208903 Sapkota Y intergenic_variant 2 11520829 EFO_0001065 ENSG00000196208
3 rs58502716 2_11592421_G_GAATCAC FINNGEN_R5_N14_ENDOMETRIOSIS 77257 FINNGEN_R5 intron_variant 2 11592421 EFO_0001065 ENSG00000196208

You can change parameters such as the amount of genes retrived for each disease (25 default) and the sorting method of them (genetic association). check the functions docstring.

Enjoy ;)

471 Dec 24, 2022
Pycardano - A lightweight Cardano client in Python

PyCardano PyCardano is a standalone Cardano client written in Python. The librar

151 Dec 31, 2022
Projeto do segundo módulo da Resilia

@ Projeto Resilia : Módulo 2 Vamos jogar Forca ! O jogo da forca é um jogo em que o jogador tem que acertar qual é a palavra proposta, tendo como dica

Mateus Sartorio 2 Feb 24, 2022
A file-based quote bot written in Python

Let's Write a Python Quote Bot! This repository will get you started with building a quote bot in Python. It's meant to be used along with the Learnin

1 Feb 23, 2022
Asynchronous multi-platform robot framework written in Python

NoneBot ✨ 跨平台 Python 异步机器人框架 ✨ 文档 · 安装 · 开始使用 · 文档打不开? 简介 NoneBot2 是一个现代、跨平台、可扩展的 Python 聊天机器人框架,它基于 Python 的类型注解和异步特性,能够为你的需求实现提供便捷灵活的支持。

NoneBot 3.1k Jan 04, 2023
A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API

PytomicDEX Makerbot A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API Install sudo apt install wget curl jq g

6 Aug 25, 2022
A userbot made for telegram

𝚃𝙷𝙴 𝙼𝙰𝙵𝙸𝙰𝙱𝙾𝚃 This is a userbot made for telegram. I made this userbot with help of all other userbots available in telegram. All credits go

MafiaBotOP 8 Apr 08, 2022
Aio-binance-library - Async library for connecting to the Binance API on Python

aio-binance-library Async library for connecting to the Binance API on Python Th

GRinvest 10 Nov 21, 2022
Techie Sneh 19 Dec 03, 2021
A discord.py extension for sending, receiving and handling ui interactions in discord

discord-ui A discord.py extension for using discord ui/interaction features pip package ▪ read the docs ▪ examples Introduction This is a discord.py u

34 Dec 29, 2022
🖥️ Windows Batch and powershell Discord Token grabber. Made for Troll (lmao)

Batched-Grabber Windows Batch and powershell Discord Token grabber. Made for Troll ! Setup. 1. pip(3) install numpy colored 2. python(3) Batched.py 3.

Ѵιcнч 41 Nov 01, 2022
Google translator bot using pyTelegramBotAPI

iTranslator-bot Super google translator bot using pyTelegramBotAPI A bot is a professional bot that automatically detects a language in texts or capti

Abdulatif 6 Nov 22, 2022
A modular telegram Python bot running on python3 with an sqlalchemy database.

TG_Bot A modular telegram Python bot running on python3 with an sqlalchemy database. Originally a simple group management bot with multiple admin feat

Movindu Bandara 1 Nov 02, 2021
Hcl.py is an Amino client for Python

Hcl.py Hcl.py Hcl.py is an Amino client for Python. It provides to access aminoapps Web, app and socket servers. Developed BY Kapidev And Upgraded BY

Oustex 3 Dec 02, 2021
Collection of script to manage WLED devices

Collection of script to manage WLED devices

Daniel Poelzleithner 4 Sep 26, 2022
inventory replenishment for a hospital.

Inventory-Replenishment Inventory-Replenishment for a hospital that would like to explore how advanced anlytics may help automate their decision proce

1 Jan 09, 2022
Qbittorrent / Aria2 Mirror & Leech Telegram Bot

This is a Telegram Bot written in Python for mirroring files on the Internet to your Google Drive or Telegram. Based on python-aria-mirror-bot Feature

Hüzünlü Artemis [HuzunluArtemis] 81 Jul 15, 2022
Braintree Python library

Braintree Python library The Braintree Python library provides integration access to the Braintree Gateway. TLS 1.2 required The Payment Card Industry

Braintree 230 Dec 18, 2022
A template that everyone can use for the start of their discord bot

Python Discord Bot Template This repository is a template that everyone can use for the start of their discord bot. When I first started creating my d

2 Nov 01, 2021
Fast IP address lookup

ipscoop Fast IP Scoop Table of Contents Installation CLI Getting Started Ref Installation To install ipscoop, simply: $ python3 -m pip install -U git+

6 Mar 16, 2022