-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
53 additions
and
4,492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pdb |
1,087 changes: 0 additions & 1,087 deletions
1,087
backend/src/data/pdbAlphaFold/Gh_comp271_c0_seq1.pdb
This file was deleted.
Oops, something went wrong.
1,646 changes: 0 additions & 1,646 deletions
1,646
backend/src/data/pdbAlphaFold/Lb17_comp535_c2_seq1.pdb
This file was deleted.
Oops, something went wrong.
1,709 changes: 0 additions & 1,709 deletions
1,709
backend/src/data/pdbAlphaFold/Lh14_comp2336_c0_seq1.pdb
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import requests | ||
import os | ||
|
||
DIR = "./master_venom_galaxy" | ||
|
||
|
||
def unzip_box(): | ||
os.system(f"unzip {DIR}.zip") | ||
|
||
|
||
def remove_box(): | ||
os.system(f"rm -rf {DIR}") | ||
|
||
|
||
def upload_protein_file(path, name, species_name, content="", refs=""): | ||
with open(path, "r") as f: | ||
pdb_file_str = f.read() | ||
|
||
payload = { | ||
"name": name, | ||
"species_name": species_name, | ||
"content": content, | ||
"refs": refs, | ||
"pdb_file_str": pdb_file_str, | ||
} | ||
out = requests.post("http://localhost:8000/protein-upload", json=payload) | ||
return out | ||
|
||
|
||
def upload_all(): | ||
unzip_box() | ||
available_species = { | ||
"Gh": "ganaspis hookeri", | ||
"Lb": "leptopilina boulardi", | ||
"Lh": "leptopilina heterotoma", | ||
"*": "unknown", | ||
} | ||
for fn in os.listdir(DIR): | ||
if fn.endswith(".pdb"): | ||
full_path = os.path.join(DIR, fn) | ||
name = fn.split(".")[0].replace("_", " ") | ||
species_name = available_species[fn[:2]] | ||
upload_protein_file(full_path, name, species_name) | ||
print("uploaded", full_path, name, species_name) | ||
remove_box() | ||
|
||
|
||
upload_all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters