Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
CSP_Rank/runDP.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
29 lines (25 sloc)
1.26 KB
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
import os | |
import subprocess | |
import sys | |
from paths import * | |
from tqdm import tqdm | |
if len(sys.argv) < 2: | |
print("Usage: python getDP.py <pdb>") | |
sys.exit(1) | |
pdb = sys.argv[1].upper() | |
directory = f"/home/tiburon/Desktop/ROT4/CSPRank_ES_Processing/PDB_FILES/{pdb}_RPF/" | |
# check to see if we have a conversion to RPF format (single chain, correct residue numbering) | |
if not os.path.exists(f"/home/tiburon/Desktop/ROT4/CSPRank_ES_Processing/PDB_FILES/{pdb}_RPF/"): | |
os.makedirs(f"/home/tiburon/Desktop/ROT4/CSPRank_ES_Processing/PDB_FILES/{pdb}_RPF/") | |
print("RUN one_chain.py") | |
raise | |
for root, dirs, files in os.walk(directory): | |
for filename in tqdm(files): | |
print(filename) | |
if not os.path.exists(f"/home/tiburon/Desktop/ROT4/CSPRank_ES_Processing/RPF_AFS/{pdb}/"): | |
os.makedirs(f"/home/tiburon/Desktop/ROT4/CSPRank_ES_Processing/RPF_AFS/{pdb}/") | |
fn = os.path.abspath(os.path.join(root, filename)) | |
cmd = f"/home/tiburon/Desktop/ASDP_public-main/ASDP_develop-2.2-alpha/bin/asdp -c /home/tiburon/Desktop/ROT4/CSPRank_ES_Processing/RPF_AFS/control_{pdb.lower()} -o /home/tiburon/Desktop/ROT4/CSPRank_ES_Processing/RPF_AFS/{pdb}/" + filename + " -q " + fn | |
print(cmd) | |
subprocess.call([cmd], shell = True) | |
raise |