yjwtheonly commited on
Commit
1507317
β€’
1 Parent(s): 6ebf426
Files changed (3) hide show
  1. Parameters.py +28 -0
  2. README.md +2 -1
  3. requirements.txt +158 -0
Parameters.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from audioop import reverse
2
+
3
+ GNBRfile = '../GNBRdata/'
4
+ PubTatorfile = '../pubtator/'
5
+ UMLSfile = '../umls/META/'
6
+ Pubmedfile = '../pubmed/'
7
+
8
+ edge_type_dict = {
9
+ 'chemical-gene':(['A+', 'A-', 'B', 'E+', 'E-', 'E', 'N', 'O', 'K', 'Z'],
10
+ ['agonism, activation', 'antagonism, blocking', 'binding, ligand', 'increases expression/production', 'decreases expression/production', 'affects expression/production', 'inhibits', 'transport, channels', 'metabolism, pharmacokinetics', 'enzyme activity']),
11
+ 'chemical-disease':(['T', 'C', 'Sa', 'Pr', 'Pa', 'J', 'Mp'],
12
+ ['treatment/therapy', 'inhibits cell growth', 'side effect/adverse event', 'prevents, suppresses', 'alleviates, reduces', 'role in disease pathogenesis', 'biomarkers']),
13
+ 'gene-disease':(['U', 'Ud', 'D', 'J', 'Te', 'Y', 'G', 'Md', 'X', 'L'],
14
+ ['causal mutations', 'mutations affecting disease course', 'drug targets', 'role in pathogenesis', 'possible therapeutic effect', 'polymorphisms alter risk', 'promotes progression', 'biomarkers', 'overexpression in disease', 'improper regulation linked to disease']),
15
+ 'gene-gene':(['B', 'W', 'V+', 'E+', 'E', 'I', 'H', 'Rg', 'Q'],
16
+ ['binding, ligand', 'enhances response', 'activates, stimulates', 'increases expression/production', 'affects expression/production', 'signaling pathway', 'same protein or complex', 'regulation', 'production by cell population'])
17
+ }
18
+
19
+ reverse_mask = {
20
+ 'chemical-gene':[0, 0, 0, 0, 0, 0, 0, 1, 1, 1],
21
+ 'chemical-disease':[0, 0, 0, 0, 0, 0, 1],
22
+ 'gene-disease': [0, 0, 0, 0, 0, 0, 0, 1, 1, 1],
23
+ 'gene-gene': [0, 0, 0, 0, 0, 0, 0, 0, 0]
24
+ }
25
+
26
+ edge_id_to_type = ['chemical-gene:agonism, activation', 'chemical-gene:antagonism, blocking', 'chemical-gene:binding, ligand', 'chemical-gene:increases expression/production', 'chemical-gene:decreases expression/production', 'chemical-gene:affects expression/production', 'chemical-gene:inhibits', 'chemical-gene:transport, channels', 'chemical-gene:metabolism, pharmacokinetics', 'chemical-gene:enzyme activity', 'chemical-disease:treatment/therapy', 'chemical-disease:inhibits cell growth', 'chemical-disease:side effect/adverse event', 'chemical-disease:prevents, suppresses', 'chemical-disease:alleviates, reduces', 'chemical-disease:role in disease pathogenesis', 'chemical-disease:biomarkers', 'gene-disease:causal mutations', 'gene-disease:mutations affecting disease course', 'gene-disease:drug targets', 'gene-disease:role in pathogenesis', 'gene-disease:possible therapeutic effect', 'gene-disease:polymorphisms alter risk', 'gene-disease:promotes progression', 'gene-disease:biomarkers', 'gene-disease:overexpression in disease', 'gene-disease:improper regulation linked to disease', 'gene-gene:binding, ligand', 'gene-gene:enhances response', 'gene-gene:activates, stimulates', 'gene-gene:increases expression/production', 'gene-gene:affects expression/production', 'gene-gene:signaling pathway', 'gene-gene:same protein or complex', 'gene-gene:regulation', 'gene-gene:production by cell population']
27
+
28
+ edge_type_to_id = {'chemical-gene': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'chemical-disease': [10, 11, 12, 13, 14, 15, 16], 'gene-disease': [17, 18, 19, 20, 21, 22, 23, 24, 25, 26], 'gene-gene': [27, 28, 29, 30, 31, 32, 33, 34, 35]}
README.md CHANGED
@@ -4,8 +4,9 @@ emoji: πŸ‘€
4
  colorFrom: red
5
  colorTo: gray
6
  sdk: gradio
 
7
  sdk_version: 3.41.2
8
- app_file: app.py
9
  pinned: false
10
  license: mit
11
  ---
 
4
  colorFrom: red
5
  colorTo: gray
6
  sdk: gradio
7
+ python_version: 3.8.12
8
  sdk_version: 3.41.2
9
+ app_file: server/server.py
10
  pinned: false
11
  license: mit
12
  ---
requirements.txt ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.2.1
2
+ aiohttp==3.8.5
3
+ aiosignal==1.3.1
4
+ altair==5.0.1
5
+ annotated-types==0.5.0
6
+ anyio==3.7.1
7
+ argon2-cffi==20.1.0
8
+ async-generator==1.10
9
+ async-timeout==4.0.3
10
+ attrs==21.2.0
11
+ backcall==0.2.0
12
+ backports.functools-lru-cache==1.6.4
13
+ bleach==4.0.0
14
+ blis==0.7.10
15
+ Bottleneck==1.3.2
16
+ brotlipy==0.7.0
17
+ catalogue==2.0.9
18
+ certifi==2022.12.7
19
+ cffi==1.14.6
20
+ charset-normalizer==2.0.4
21
+ click==8.1.7
22
+ confection==0.1.1
23
+ cryptography==37.0.1
24
+ cycler==0.11.0
25
+ cymem==2.0.7
26
+ debugpy==1.5.1
27
+ decorator==5.1.0
28
+ defusedxml==0.7.1
29
+ dill==0.3.7
30
+ en-core-web-md==3.6.0
31
+ en-core-web-sm==3.6.0
32
+ entrypoints==0.3
33
+ exceptiongroup==1.1.3
34
+ fastapi==0.102.0
35
+ ffmpy==0.3.1
36
+ filelock==3.12.2
37
+ flit_core==3.6.0
38
+ fonttools==4.25.0
39
+ frozenlist==1.4.0
40
+ fsspec==2023.6.0
41
+ gradio==3.41.2
42
+ gradio_client==0.5.0
43
+ h11==0.14.0
44
+ httpcore==0.17.3
45
+ httpx==0.24.1
46
+ huggingface-hub==0.16.4
47
+ idna==3.3
48
+ importlib-metadata==4.8.2
49
+ importlib-resources==6.0.1
50
+ ipykernel==6.6.0
51
+ ipython==7.30.1
52
+ ipython-genutils==0.2.0
53
+ ipywidgets==7.6.5
54
+ jedi==0.18.1
55
+ Jinja2==3.0.2
56
+ joblib==1.3.2
57
+ jsonschema==3.2.0
58
+ jupyter==1.0.0
59
+ jupyter-client==7.1.0
60
+ jupyter-console==6.4.0
61
+ jupyter-core==4.9.1
62
+ jupyterlab-pygments==0.1.2
63
+ jupyterlab-widgets==1.0.0
64
+ kiwisolver==1.3.1
65
+ langcodes==3.3.0
66
+ MarkupSafe==2.0.1
67
+ matplotlib==3.5.0
68
+ matplotlib-inline==0.1.3
69
+ mistune==0.8.4
70
+ mkl-fft==1.3.1
71
+ mkl-random==1.2.2
72
+ mkl-service==2.4.0
73
+ multidict==6.0.4
74
+ munkres==1.1.4
75
+ murmurhash==1.0.9
76
+ nbclient==0.5.3
77
+ nbconvert==6.3.0
78
+ nbformat==5.1.3
79
+ nest-asyncio==1.5.4
80
+ networkx==2.6.3
81
+ notebook==6.4.6
82
+ numexpr==2.8.1
83
+ numpy==1.21.5
84
+ olefile==0.46
85
+ openai==0.27.6
86
+ orjson==3.9.5
87
+ packaging==21.3
88
+ pandas==1.3.4
89
+ pandocfilters==1.4.3
90
+ parso==0.8.3
91
+ pathy==0.10.2
92
+ pexpect==4.8.0
93
+ pickleshare==0.7.5
94
+ Pillow==8.4.0
95
+ pip==21.2.4
96
+ preshed==3.0.8
97
+ prometheus-client==0.12.0
98
+ prompt-toolkit==3.0.20
99
+ ptyprocess==0.7.0
100
+ pycparser==2.21
101
+ pydantic==2.3.0
102
+ pydantic_core==2.6.3
103
+ pydub==0.25.1
104
+ Pygments==2.11.1
105
+ pyOpenSSL==22.0.0
106
+ pyparsing==3.0.4
107
+ pyrsistent==0.18.0
108
+ PySocks==1.7.1
109
+ python-dateutil==2.8.2
110
+ python-multipart==0.0.6
111
+ pytz==2021.3
112
+ PyYAML==6.0.1
113
+ pyzmq==19.0.2
114
+ qtconsole==5.1.1
115
+ QtPy==1.10.0
116
+ regex==2023.8.8
117
+ requests==2.28.1
118
+ sacremoses==0.0.46
119
+ scipy==1.7.3
120
+ seaborn==0.11.2
121
+ semantic-version==2.10.0
122
+ Send2Trash==1.8.0
123
+ setuptools==58.0.4
124
+ shadowsocks==3.0.0
125
+ sip==4.19.13
126
+ six==1.16.0
127
+ smart-open==6.3.0
128
+ sniffio==1.3.0
129
+ spacy==3.6.1
130
+ spacy-legacy==3.0.12
131
+ spacy-loggers==1.0.4
132
+ srsly==2.4.7
133
+ starlette==0.27.0
134
+ terminado==0.9.4
135
+ testpath==0.5.0
136
+ thinc==8.1.12
137
+ tokenizers==0.13.3
138
+ toolz==0.12.0
139
+ torch==1.12.1
140
+ torchaudio==0.12.1
141
+ torchvision==0.13.1
142
+ tornado==6.1
143
+ tqdm==4.62.3
144
+ traitlets==5.7.1
145
+ transformers==4.26.0
146
+ typer==0.4.2
147
+ typing_extensions==4.7.1
148
+ urllib3==1.26.11
149
+ uvicorn==0.23.2
150
+ wasabi==0.10.1
151
+ wcwidth==0.2.5
152
+ webencodings==0.5.1
153
+ websockets==11.0.3
154
+ wheel==0.37.0
155
+ widgetsnbextension==3.5.1
156
+ xlwt==1.3.0
157
+ yarl==1.9.2
158
+ zipp==3.6.0