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 ;)

The successor of GeoSnipe, a pythonic Minecraft username sniper based on AsyncIO.

OneSnipe The successor of GeoSnipe, a pythonic Minecraft username sniper based on AsyncIO. Documentation View Documentation Features • Mojang & Micros

1 Jan 14, 2022
Subtitle Translater

Subtitle Translater

OshadhaVimukthi 2 Nov 29, 2021
The Python SDK for the Rackspace Cloud

pyrax Python SDK for OpenStack/Rackspace APIs DEPRECATED: Pyrax is no longer being developed or supported. See openstacksdk and the rackspacesdk plugi

PyContribs 238 Sep 21, 2022
NewpaperNews-API - Json data of the news with python

NewsAPI API Documentation BASE_URL = "https://saurav.tech/NewsAPI/" top_headline

Aryaman Prakash 2 Sep 23, 2022
A webhook API for Discord.

Webhook API A webhook API for Discord. Requirements requests Usage

1 Feb 08, 2022
Simple Discord Nuke Bot.

Discord-Nuke-Bot Simple Discord Nuke Bot. Simple Discord Nuke Bot Python 3.6 - 3.8 Features Delete Channels Ban All Members Delete Roles Create Channe

9X4N 6 Aug 16, 2022
Telegram Remote Administration Tool

Telegram Remote Administration Tool DISCLAIMER | Telegram Remote Administration Tool can only be used at your PC. Do not be evil! Читайте на Русском |

13 Nov 12, 2022
This is a discord token generator(requests) which works and makes 200 tokens per minute

Discord Email verified token generator Creates email verified discord accounts (unlocked) Report Bug · Discord server Features Profile pictures and na

131 Dec 10, 2022
Creates Spotify playlists from Spinitron playlists.

spin2spot Creates Spotify playlists from Spinitron playlists. Quick Start You can use spin2spot as a command-line tool: Erik Didriksen 1 Aug 28, 2021

Powerful Telegram Members Scraping and Adding Toolkit

🔥 Genisys V2.1 Powerful Telegram Members Scraping and Adding Toolkit 🔻 Features 🔺 ADDS IN BULK[by user id, not by username] Scrapes and adds to pub

The Cryptonian 16 Mar 01, 2022
Get an SNS alert for High Severity GuardDuty findings

Automation AWS-GuardDuty findings Get an SNS alert for High Severity GuardDuty findings Problem: Getting notified when there is Red finding in AWS Gua

Giten Mitra 4 Nov 18, 2022
Signs API calls to SberCloud.Advanced with AK/SK

sbercloud-api-aksk Signs API calls to SberCloud.Advanced with AK/SK This script is a courtesy of @sadpdtchr Description Sometimes there is a need to m

Peter Predtechensky 1 Nov 30, 2021
PokemonGo-Bot - The Pokemon Go Bot, baking with community.

PokemonGo-Bot PokemonGo-Bot is a project created by the PokemonGoF team. Since no public API available for now, a patch to use HASH-Server was applied

3.8k Jan 08, 2023
A simple worker for OpenClubhouse to sync data.

OpenClubhouse-Worker This is a simple worker for OpenClubhouse to sync CH channel data.

100 Dec 17, 2022
Retrieves GitHub Stats via `git_api` and flask.

GitHub User Search Created using Python3 and git_api, coded by JBYT27. About This is a project I decided to make for Kajam, but I decided to choose a

an aspirin 4 May 11, 2022
→ Comando Básico para Python Discord

Discord.py · Código @client.event async def on_ready(): print('He iniciado sessión en: {0.user}'.format(client)) @client.event async def on_messa

Panda.xyz 4 Mar 12, 2022
The program for obtaining a horoscope in Python using API from rapidapi.com site.

Python horoscope The program allows you to get a horoscope for your zodiac sign and immediately translate it into almost any language. Step 1 The firs

Architect 0 Dec 25, 2021
Script to get a notification when a product, on Amazon Warehouse, is available within a target price

Amazon_Warehouse_Scraping This script aims to scrape Amazon Warehouse and send an email back if there are products whose price matches with the target

2 Oct 25, 2021
Discord bot for playing Werewolf game on League of Legends.

LoLWolf LoL人狼をプレイするときのDiscord用botです。 (Discord bot for playing Werewolf game on League of Legends.) 以下のボタンを押してbotをあなたのDiscordに招待することで誰でも簡単に使用することができます。

Hatsuka 4 Oct 18, 2021
Pure Python 3 MTProto API Telegram client library, for bots too!

Telethon ⭐️ Thanks everyone who has starred the project, it means a lot! Telethon is an asyncio Python 3 MTProto library to interact with Telegram's A

LonamiWebs 7.3k Jan 01, 2023