Finding Genesets
Dependencies and Set Up¶
In [ ]:
Copied!
!pip install geneweaver-client
!pip install geneweaver-client
In [1]:
Copied!
from geneweaver.client.auth import login
from geneweaver.client.auth import login
In [2]:
Copied!
login()
login()
1. On your computer or mobile device navigate to: https://geneweaver.auth0.com/activate?user_code=VPPC-FWSQ 2. Enter the following code: VPPC-FWSQ Authenticated! - Id Token: eyJhbGciOi...
In [4]:
Copied!
from geneweaver.client.auth import get_access_token
from geneweaver.client.auth import get_access_token
Finding Cancer Related Genesets¶
In [6]:
Copied!
import requests
import requests
In [56]:
Copied!
result = requests.get(
"https://geneweaver.jax.org/api/genesets",
params={
"search_text": "cancer",
"curation_tier": "Tier I",
"limit": 10
},
headers={"Authorization": f"Bearer {get_access_token()}"}
)
result.ok
result = requests.get(
"https://geneweaver.jax.org/api/genesets",
params={
"search_text": "cancer",
"curation_tier": "Tier I",
"limit": 10
},
headers={"Authorization": f"Bearer {get_access_token()}"}
)
result.ok
Out[56]:
True
In [57]:
Copied!
cancer_genesets = result.json()["data"]
cancer_genesets = result.json()["data"]
In [58]:
Copied!
for i in cancer_genesets:
print(i["name"])
for i in cancer_genesets:
print(i["name"])
MP:0010337 increased chronic lymphocytic leukemia incidence MSigDB Geneset - MORF_ZNF10 MSigDB Geneset - KRAS.LUNG.BREAST_UP.V1_UP MSigDB Geneset - MORF_HDAC2 MSigDB Geneset - GCM_PTPRD GWAS Catalog Data for breast carcinoma in 10,052 European ancestry cases, 12,575 European ancestry controls MSigDB Geneset - MORF_TFDP2 GWAS Catalog Data for response to platinum based chemotherapy, non-small cell lung carcinoma in 327 European ancestry individuals MSigDB Geneset - MORF_PML MSigDB Geneset - GCM_ERCC4
Finding GWAS Cancer Related Genesets¶
In [60]:
Copied!
result = requests.get(
"https://geneweaver.jax.org/api/genesets",
params={
"search_text": "gwas & cancer",
"curation_tier": "Tier I",
"limit": 10
},
headers={"Authorization": f"Bearer {get_access_token()}"}
)
result.ok
result = requests.get(
"https://geneweaver.jax.org/api/genesets",
params={
"search_text": "gwas & cancer",
"curation_tier": "Tier I",
"limit": 10
},
headers={"Authorization": f"Bearer {get_access_token()}"}
)
result.ok
Out[60]:
True
In [61]:
Copied!
gwas_cancer_genesets = result.json()["data"]
gwas_cancer_genesets = result.json()["data"]
In [62]:
Copied!
for i in gwas_cancer_genesets:
print(i["name"])
for i in gwas_cancer_genesets:
print(i["name"])
GWAS Catalog Data for breast carcinoma in 10,052 European ancestry cases, 12,575 European ancestry controls GWAS Catalog Data for response to platinum based chemotherapy, non-small cell lung carcinoma in 327 European ancestry individuals GWAS Catalog Data for lung carcinoma in 2,331 Han Chinese ancestry lung cancer cases, 1,006 Han Chinese ancestry non-cardia gastric cancer cases, 2,031 Han Chinese ancestry esophageal squamous-cell carcinoma cases, 4,006 Han Chinese ancestry controls GWAS Catalog Data for lung carcinoma, squamous cell carcinoma, gastric carcinoma in 2,331 Han Chinese ancestry lung cancer cases, 1,006 Han Chinese ancestry non-cardia gastric cancer cases, 2,031 Han Chinese ancestry esophageal squamous-cell carcinoma cases, 4,006 Han Chinese ancestry controls GWAS Catalog Data for estrogen-receptor negative breast cancer in 4,939 European ancestry cases, 14,352 European ancestry controls GWAS Catalog Data for breast carcinoma in 899 European ancestry cases, 804 European ancestry controls GWAS Catalog Data for breast carcinoma in 1,426 European ancestry cases, 1,301 European ancestry controls GWAS Catalog Data for ovarian carcinoma in 1,817 European ancestry cases, 2,353 European ancestry controls GWAS Catalog Data for breast carcinoma in 1,367 Sardinian cases, 1,658 Sardinian controls GWAS Catalog Data for endometrial carcinoma in 4,907 European ancestry cases, 11,945 European ancestry controls
In [66]:
Copied!
for i in gwas_cancer_genesets:
print(f"GS{i['id']} has {i['count']} genes")
for i in gwas_cancer_genesets:
print(f"GS{i['id']} has {i['count']} genes")
GS267835 has 98 genes GS270261 has 1 genes GS268187 has 3 genes GS268186 has 3 genes GS271027 has 30 genes GS269914 has 1 genes GS270401 has 7 genes GS270122 has 2 genes GS267760 has 2 genes GS268492 has 8 genes
In [ ]:
Copied!