-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathconstants.py
More file actions
339 lines (318 loc) 路 11.5 KB
/
Copy pathconstants.py
File metadata and controls
339 lines (318 loc) 路 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
from __future__ import annotations
import uuid
# Default (connect, read) timeout in seconds for HTTP requests issued via the
# `requests` library. Centralized so callers without their own retry/timeout
# strategy avoid hanging indefinitely on slow upstreams.
DEFAULT_REQUESTS_TIMEOUT = (10, 60)
# Ensembl REST API server for gget seq and info
ENSEMBL_REST_API = "http://rest.ensembl.org/"
ENSEMBL_FTP_URL = "http://ftp.ensembl.org/pub/"
ENSEMBL_FTP_URL_GRCH37 = "http://ftp.ensembl.org/pub/grch37/"
# Non-vertebrate server
ENSEMBL_FTP_URL_NV = "http://ftp.ensemblgenomes.org/pub/"
# GENCODE FTP root for gget ref (human and mouse reference GTFs/FASTAs)
GENCODE_FTP_URL = "https://ftp.ebi.ac.uk/pub/databases/gencode/"
# NCBI URL for gget info
NCBI_URL = "https://www.ncbi.nlm.nih.gov"
# NCBI VIRUS REST API URL for gget virus - Version 2 API endpoint
NCBI_API_BASE = "https://api.ncbi.nlm.nih.gov/datasets/v2"
# NCBI E-utilities URL for gget virus
NCBI_EUTILS_BASE_EFETCH = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi"
NCBI_EUTILS_BASE_ESEARCH = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi"
# UniProt REST API server for gget seq and info
UNIPROT_REST_API = "https://rest.uniprot.org/uniprotkb/search?query="
UNIPROT_IDMAPPING_API = "https://rest.uniprot.org/idmapping"
# RCSB PDB API for gget pdb
RCSB_PDB_API = "https://data.rcsb.org/rest/v1/core/"
# Genomics 2 Proteins (G2P) portal REST API for gget g2p
G2P_API = "https://g2p.broadinstitute.org/api"
# API to get PDB entries from Ensembl IDs
ENS_TO_PDB_API = "https://www.ebi.ac.uk/pdbe/aggregated-api/mappings/ensembl_to_pdb/"
# BLAST API endpoints
BLAST_URL = "https://blast.ncbi.nlm.nih.gov/Blast.cgi"
# Generate a random UUID
BLAST_CLIENT = "gget_client-" + str(uuid.uuid4())
# MUSCLE Github repo
MUSCLE_GITHUB_LINK = "https://github.com/rcedgar/muscle.git"
# Enrichr API endpoints
POST_ENRICHR_URL = "https://maayanlab.cloud/speedrichr/api/addList"
GET_ENRICHR_URL = "https://maayanlab.cloud/speedrichr/api/enrich"
POST_BACKGROUND_ID_ENRICHR_URL = "https://maayanlab.cloud/speedrichr/api/addbackground"
GET_BACKGROUND_ENRICHR_URL = "https://maayanlab.cloud/speedrichr/api/backgroundenrich"
POST_ENRICHR_URLS = {
f"{typ}": f"https://maayanlab.cloud/{typ.capitalize()}Enrichr/addList" for typ in ["fly", "yeast", "worm", "fish"]
}
POST_ENRICHR_URLS["human"] = POST_ENRICHR_URL
GET_ENRICHR_URLS = {
f"{typ}": f"https://maayanlab.cloud/{typ.capitalize()}Enrichr/enrich" for typ in ["fly", "yeast", "worm", "fish"]
}
GET_ENRICHR_URLS["human"] = GET_ENRICHR_URL
# ARCHS4 API endpoints
GENECORR_URL = "https://maayanlab.cloud/matrixapi/coltop"
EXPRESSION_URL = "https://maayanlab.cloud/archs4/search/loadExpressionTissue.php?"
# Download links for ELM database
ELM_INSTANCES_FASTA_DOWNLOAD = "http://elm.eu.org/instances.fasta?q=*&taxon=&instance_logic="
ELM_INSTANCES_TSV_DOWNLOAD = "http://elm.eu.org/instances.tsv?q=*&taxon=&instance_logic="
ELM_CLASSES_TSV_DOWNLOAD = "http://elm.eu.org/elms/elms_index.tsv"
ELM_INTDOMAINS_TSV_DOWNLOAD = "http://elm.eu.org/interactiondomains.tsv"
# COSMIC API endpoint
COSMIC_GET_URL = "https://cancer.sanger.ac.uk/cosmic/search/"
COSMIC_RELEASE_URL = "https://cancer.sanger.ac.uk/cosmic/release_notes"
# OpenTargets API endpoint
OPENTARGETS_GRAPHQL_API = "https://api.platform.opentargets.org/api/v4/graphql"
# CBIO data
CBIO_CANCER_TYPE_TO_TISSUE_DICTIONARY = {
"Acute Leukemias of Ambiguous Lineage": "leukemia",
"Acute Myeloid Leukemia": "leukemia",
"Acute myeloid leukemia": "leukemia",
"Adenosarcoma": "mixed",
"Adrenal Tumor": "adrenal_gland",
"Adrenocortical Adenoma": "adrenal_gland",
"Adrenocortical Carcinoma": "adrenal_gland",
"Adrenocortical carcinoma": "adrenal_gland",
"Ampullary Cancer": "ampulla",
"Ampullary Carcinoma": "ampulla",
"Anal Cancer": "intestine",
"Appendiceal Cancer": "appendix",
"B-Lymphoblastic Leukemia/Lymphoma": "lymphoma",
"Biliary Tract": "biliary_tract",
"Biliary Tract Cancer, NOS": "biliary_tract",
"Bladder Cancer": "bladder",
"Bladder/Urinary Tract Cancer, NOS": "bladder",
"Blastic Plasmacytoid Dendritic Cell Neoplasm": "immune",
"Blood Cancer, NOS": "leukemia",
"Bone Cancer": "bone",
"Bone Sarcoma": "bone",
"Bowel Cancer, NOS": "intestine",
"Brain Cancer": "brain",
"Breast Cancer": "breast",
"Breast Carcinoma": "breast",
"Breast Sarcoma": "breast",
"CNS Cancer": "brain",
"Cancer of Unknown Primary": "mixed",
"Carcinoma of Uterine Cervix": "cervix",
"Cervical Cancer": "cervix",
"Cholangiocarcinoma": "biliary_tract",
"Choroid Plexus Tumor": "brain",
"Colorectal Cancer": "intestine",
"Colorectal Carcinoma": "intestine",
"Cutaneous malignancy of hair matrix cells": "skin",
"Diffuse Glioma": "brain",
"Embryonal Tumor": "mixed",
"Encapsulated Glioma": "brain",
"Endometrial Cancer": "uterus",
"Endometrial Carcinoma": "uterus",
"Ependymomal Tumor": "brain",
"Esophageal Carcinoma": "esophagus",
"Esophagogastric Cancer": "esophagus",
"Essential Thrombocythemia": "plasma",
"Extrahepatic Cholangiocarcinoma": "biliary_tract",
"Fibrosarcoma": "soft_tissue",
"Gallbladder Carcinoma": "gallbladder",
"Gastric Cancer": "stomach",
"Gastrointestinal Neuroendocrine Tumor": "intestine",
"Gastrointestinal Stromal Tumor": "intestine",
"Germ Cell Tumor": "testicle",
"Gestational Trophoblastic Disease": "uterus",
"Glioblastoma": "brain",
"Glioma": "brain",
"Head and Neck Cancer": "head_neck",
"Head and Neck Cancer, NOS": "head_neck",
"Head and Neck Carcinoma": "head_neck",
"Hepatobiliary Cancer": "liver",
"High-grade glioma/astrocytoma": "brain",
"Histiocytosis": "immune",
"Hodgkin Lymphoma": "lymphoma",
"Hodgkin Lymphoma-like PTLD": "lymphoma",
"Intraductal Papillary Mucinous Neoplasm": "pancreas",
"Intrahepatic Cholangiocarcinoma": "biliary_tract",
"Invasive Breast Carcinoma": "breast",
"Kidney Renal Cell Carcinoma": "kidney",
"Leukemia": "leukemia",
"Liver Hepatocellular Carcinoma": "liver",
"Liver Tumor": "liver",
"Low-grade glioma/astrocytoma": "brain",
"Lung Adenocarcinoma": "lung",
"Lung Cancer": "lung",
"Lung Cancer, NOS": "lung",
"Lung cancer": "lung",
"Lymphoid Neoplasm": "lymph",
"Malignant Rhabdoid Tumor of the Liver": "liver",
"Mastocytosis": "immune",
"Mature B-Cell Neoplasms": "lymphoma",
"Mature B-cell lymphoma": "lymphoma",
"Mature T and NK Neoplasms": "immune",
"Medulloblastoma": "brain",
"Melanoma": "skin",
"Meningioma": "brain",
"Mesothelioma": "soft_tissue",
"Miscellaneous Brain Tumor": "brain",
"Miscellaneous Neuroepithelial Tumor": "brain",
"Mucinous Adenocarcinoma Lymph Node": "lymph",
"Myelodysplastic Syndromes": "plasma",
"Myelodysplastic/Myeloproliferative Neoplasms": "plasma",
"Myeloproliferative Neoplasms": "plasma",
"Nerve Sheath Tumor": "soft_tissue",
"Nested stromal epithelial tumor of the liver": "liver",
"Non Small Cell Lung Cancer": "lung",
"Non-Germinomatous Germ Cell Tumor": "testicle",
"Non-Hodgkin Lymphoma": "lymphoma",
"Non-Seminomatous Germ Cell Tumor": "testicle",
"Non-Small Cell Lung Cancer": "lung",
"Ocular Melanoma": "eye",
"Other": "mixed",
"Ovarian Cancer": "ovary",
"Ovarian Carcinoma": "ovary",
"Ovarian Epithelial Tumor": "ovary",
"Ovarian Germ Cell Tumor": "ovary",
"Ovarian/Fallopian Tube Cancer, NOS": "ovary",
"Pancreatic Cancer": "pancreas",
"Penile Cancer": "intestine",
"Peripheral Nervous System": "soft_tissue",
"Pheochromocytoma": "adrenal_gland",
"Pineal Tumor": "brain",
"Pleural Mesothelioma": "soft_tissue",
"Posttransplant Lymphoproliferative Disorders": "lymphoma",
"Prostate Cancer": "prostate",
"Prostate Cancer, NOS": "prostate",
"Renal Cell Carcinoma": "kidney",
"Renal Clear Cell Carcinoma": "kidney",
"Renal Non-Clear Cell Carcinoma": "kidney",
"Renal cancer": "kidney",
"Retinoblastoma": "eye",
"Rhabdoid Cancer": "soft_tissue",
"Salivary Cancer": "head_neck",
"Salivary Gland Cancer": "head_neck",
"Salivary Gland-Type Tumor of the Lung": "lung",
"Sarcoma": "soft_tissue",
"Sellar Tumor": "brain",
"Seminoma": "testicle",
"Sex Cord Stromal Tumor": "testicle",
"Skin Cancer, Non-Melanoma": "skin",
"Small Bowel Cancer": "intestine",
"Small Bowel Carcinoma": "intestine",
"Small Cell Lung Cancer": "lung",
"Soft Tissue Myoepithelial Carcinoma": "soft_tissue",
"Soft Tissue Sarcoma": "soft_tissue",
"Soft Tissue Tumor": "soft_tissue",
"T-Lymphoblastic Leukemia/Lymphoma": "leukemia",
"Teratoma with Malignant Transformation": "testicle",
"Thymic Epithelial Tumor": "thymus",
"Thymic Tumor": "thymus",
"Thyroid Cancer": "thyroid",
"Thyroid Carcinoma": "thyroid",
"Urothelial Carcinoma": "bladder",
"Uterine Corpus Endometrial Carcinoma": "uterus",
"Uterine Endometrioid Carcinoma": "uterus",
"Uterine Sarcoma": "uterus",
"Vaginal Cancer": "intestine",
"Wilms Tumor": "kidney",
}
CBIO_CANCER_TYPE_ACRONYM_TO_TISSUE_DICTIONARY = {
"acbc": "breast",
"acc": "adrenal_gland",
"acyc": "adenoid",
"aml": "leukemia",
"ampca": "ampulla",
"angs": "endothelial",
"apad": "appendix",
"bcc": "skin",
"bfn": "breast",
"biliary_tract": "biliary_tract",
"blca": "bladder",
"bll": "leukemia",
"bowel": "intestine",
"brain": "brain",
"brca": "breast",
"breast": "breast",
"ccrcc": "kidney",
"cervix": "cervix",
"cesc": "cervix",
"chol": "biliary_tract",
"chrcc": "kidney",
"cllsll": "leukemia",
"coad": "intestine",
"coadread": "intestine",
"cscc": "skin",
"desm": "skin",
"difg": "brain",
"dlbclnos": "lymphoma",
"egc": "esophagus",
"es": "bone",
"esca": "esophagus",
"escc": "esophagus",
"gbc": "gallbladder",
"gbm": "brain",
"gist": "stomach",
"hcc": "liver",
"hccihch": "liver",
"hdcn": "immune",
"head_neck": "head_neck",
"hgsoc": "ovary",
"hnsc": "head_neck",
"ihch": "liver",
"lgsoc": "ovary",
"liad": "liver",
"luad": "lung",
"lung": "lung",
"lusc": "lung",
"lymph": "lymph",
"mbc": "breast",
"mbl": "brain",
"mbn": "lymphoma",
"mcl": "lymphoma",
"mds": "leukemia",
"mel": "skin",
"mixed": "mixed",
"mng": "head_neck",
"mnm": "leukemia",
"mpn": "leukemia",
"mpnst": "soft_tissue",
"mrt": "kidney",
"mtnn": "lymphoma",
"myeloid": "leukemia",
"nbl": "adrenal_gland",
"nccrcc": "kidney",
"nhl": "lymphoma",
"npc": "head_neck",
"nsclc": "lung",
"nsgct": "testicle",
"nst": "brain",
"odg": "brain",
"ovary": "ovary",
"paac": "pancreas",
"paad": "pancreas",
"pact": "pancreas",
"pancreas": "pancreas",
"panet": "pancreas",
"past": "brain",
"pcm": "plasma",
"pcnsl": "lymphoma", # brain?
"plmeso": "lung",
"prad": "prostate",
"prcc": "kidney",
"prostate": "prostate",
"rbl": "eye",
"rms": "muscle",
"scco": "ovary",
"sclc": "lung",
"skcm": "skin",
"soft_tissue": "soft_tissue",
"stad": "stomach",
"stmyec": "soft_tissue",
"stomach": "stomach",
"testis": "testicle",
"tet": "thymus",
"thpa": "thyroid",
"thym": "thymus",
"thyroid": "thyroid",
"uccc": "uterus",
"ucec": "uterus",
"ucs": "uterus",
"um": "eye",
"urcc": "kidney",
"usarc": "uterus",
"utuc": "bladder",
"vsc": "cervix",
"wt": "kidney",
}