Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -8,9 +8,15 @@ from functools import lru_cache
|
|
8 |
from mtdna_classifier import classify_sample_location
|
9 |
import subprocess
|
10 |
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
13 |
os.environ["PATH"] += f":{os.environ['HOME']}/edirect"
|
|
|
14 |
|
15 |
|
16 |
@lru_cache(maxsize=128)
|
|
|
8 |
from mtdna_classifier import classify_sample_location
|
9 |
import subprocess
|
10 |
|
11 |
+
import shutil
|
12 |
+
|
13 |
+
if not shutil.which("esummary"):
|
14 |
+
subprocess.run(
|
15 |
+
'yes | sh -c "$(wget -q https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/install-edirect.sh -O -)"',
|
16 |
+
shell=True
|
17 |
+
)
|
18 |
os.environ["PATH"] += f":{os.environ['HOME']}/edirect"
|
19 |
+
print("EDirect esummary found at:", shutil.which("esummary"))
|
20 |
|
21 |
|
22 |
@lru_cache(maxsize=128)
|