Spaces:
Sleeping
Sleeping
Commit ·
6241086
1
Parent(s): d955409
Update code/add_sasa.py
Browse files- code/add_sasa.py +7 -0
code/add_sasa.py
CHANGED
|
@@ -8,6 +8,7 @@ import os
|
|
| 8 |
from pathlib import Path
|
| 9 |
import gzip
|
| 10 |
import shutil
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
|
|
@@ -43,6 +44,12 @@ def run_freesasa(infile, outfile, include_hetatms=True, outdir=None, force_rerun
|
|
| 43 |
stderr=subprocess.PIPE,
|
| 44 |
shell=True)
|
| 45 |
out, err = command.communicate()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
return outfile
|
| 47 |
|
| 48 |
def calculate_freesasa(ID, model_num, existing_free_sasa, path_to_input,path_to_output_files, file_type = 'gzip'):
|
|
|
|
| 8 |
from pathlib import Path
|
| 9 |
import gzip
|
| 10 |
import shutil
|
| 11 |
+
from huggingface_hub import HfApi
|
| 12 |
|
| 13 |
|
| 14 |
|
|
|
|
| 44 |
stderr=subprocess.PIPE,
|
| 45 |
shell=True)
|
| 46 |
out, err = command.communicate()
|
| 47 |
+
api = HfApi()
|
| 48 |
+
api.upload_file(
|
| 49 |
+
path_or_fileobj=outfile,
|
| 50 |
+
path_in_repo="out_files/pdb/freesasa_files",
|
| 51 |
+
repo_id="fatmacankara/ASCARIS",
|
| 52 |
+
repo_type="space")
|
| 53 |
return outfile
|
| 54 |
|
| 55 |
def calculate_freesasa(ID, model_num, existing_free_sasa, path_to_input,path_to_output_files, file_type = 'gzip'):
|