Skip to content

Commit

Permalink
[stability-pipeline] update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
j0kaso committed Jul 27, 2022
1 parent 2e0a8f7 commit 522434d
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#SBATCH --job-name=6xro_final_renum_p-ddg
#SBATCH --array=1
#SBATCH --nodes=1
#SBATCH --time=0:10:00
#SBATCH --time=10:00:00
#SBATCH --partition=sbinlab

#This sbatch script launches the parse parse_rosetta_ddgs function, from the parse_cartesian_ddgs
python3XXXtagvXXX1
python3 /parser_ddg_v2.py 6xro_final_renum A ERAGPVTWVMMIACVVVFIAMQILGDQEVMLWLAWPFDPTLKFEFWRYFTHALMHFSLMHILFNLLWWWYLGGAVEKRLGSGKLIVITLISALLSGYVQQKFSGPWFGGLSGVVYALMGYVWLRGERDPQSGIYLQRGLIIFALIWIVAGWFDLFGMSMANGAHIAGLAVGLAMAFVDSLNA /ddG/run /ddG/output /prepare/checking/structure_input.json /ddG/input /output /prepare/checking False True XXXtagvXXX /prepare/cleaning True 1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#SBATCH --job-name=homodimer-1afo_renum_uniquechain_p-ddg
#SBATCH --array=1
#SBATCH --nodes=1
#SBATCH --time=0:10:00
#SBATCH --time=10:00:00
#SBATCH --partition=sbinlab

#This sbatch script launches the parse parse_rosetta_ddgs function, from the parse_cartesian_ddgs
python3XXXtagvXXX1
python3 /parser_ddg_v2.py homodimer-1afo_renum_uniquechain A VQLAHHFSEPEITLIIFGVMAGVIGTILLISYGIRRLIKKVQLAHHFSEPEITLIIFGVMAGVIGTILLISYGIRRLIKK /ddG/run /ddG/output /prepare/checking/structure_input.json /ddG/input /output /prepare/checking False True XXXtagvXXX /prepare/cleaning True 1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#SBATCH --job-name=6xro_final_renum_p-ddg
#SBATCH --array=1
#SBATCH --nodes=1
#SBATCH --time=0:10:00
#SBATCH --time=10:00:00
#SBATCH --partition=sbinlab

#This sbatch script launches the parse parse_rosetta_ddgs function, from the parse_cartesian_ddgs
python3XXXtagvXXX1
python3 /parser_ddg_v2.py 6xro_final_renum A ERAGPVTWVMMIACVVVFIAMQILGDQEVMLWLAWPFDPTLKFEFWRYFTHALMHFSLMHILFNLLWWWYLGGAVEKRLGSGKLIVITLISALLSGYVQQKFSGPWFGGLSGVVYALMGYVWLRGERDPQSGIYLQRGLIIFALIWIVAGWFDLFGMSMANGAHIAGLAVGLAMAFVDSLNA /ddG/run /ddG/output /prepare/checking/structure_input.json /ddG/input /output /prepare/checking False True XXXtagvXXX /prepare/cleaning True 1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#SBATCH --job-name=6xro_final_renum_p-ddg
#SBATCH --array=1
#SBATCH --nodes=1
#SBATCH --time=0:10:00
#SBATCH --time=10:00:00
#SBATCH --partition=sbinlab

#This sbatch script launches the parse parse_rosetta_ddgs function, from the parse_cartesian_ddgs
python3XXXtagvXXX1
python3 /parser_ddg_v2.py 6xro_final_renum A ERAGPVTWVMMIACVVVFIAMQILGDQEVMLWLAWPFDPTLKFEFWRYFTHALMHFSLMHILFNLLWWWYLGGAVEKRLGSGKLIVITLISALLSGYVQQKFSGPWFGGLSGVVYALMGYVWLRGERDPQSGIYLQRGLIIFALIWIVAGWFDLFGMSMANGAHIAGLAVGLAMAFVDSLNA /ddG/run /ddG/output /prepare/checking/structure_input.json /ddG/input /output /prepare/checking False True XXXtagvXXX /prepare/cleaning True 1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#SBATCH --job-name=6xro_final_renum_p-ddg
#SBATCH --array=1
#SBATCH --nodes=1
#SBATCH --time=0:10:00
#SBATCH --time=10:00:00
#SBATCH --partition=sbinlab

#This sbatch script launches the parse parse_rosetta_ddgs function, from the parse_cartesian_ddgs
python3XXXtagvXXX1
python3 /parser_ddg_v2.py 6xro_final_renum A ERAGPVTWVMMIACVVVFIAMQILGDQEVMLWLAWPFDPTLKFEFWRYFTHALMHFSLMHILFNLLWWWYLGGAVEKRLGSGKLIVITLISALLSGYVQQKFSGPWFGGLSGVVYALMGYVWLRGERDPQSGIYLQRGLIIFALIWIVAGWFDLFGMSMANGAHIAGLAVGLAMAFVDSLNA /ddG/run /ddG/output /prepare/checking/structure_input.json /ddG/input /output /prepare/checking False True XXXtagvXXX /prepare/cleaning True 1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#SBATCH --job-name=4M6J_p-ddg
#SBATCH --array=1
#SBATCH --nodes=1
#SBATCH --time=0:10:00
#SBATCH --time=10:00:00
#SBATCH --partition=sbinlab

#This sbatch script launches the parse parse_rosetta_ddgs function, from the parse_cartesian_ddgs
python3XXXtagvXXX2.9
python3 /parser_ddg_v2.py 4M6J A SLNCIVAVSQNMGIGKNGDLPWPPLRNEFRYFQRMTTTSSVEGKQNLVIMGKKTWFSIPEKNRPLKGRINLVLSRELKEPPQGAHFLSRSLDDALKLTEQPELANKVDMVWIVGGSSVYKEAMNHPGHLKLFVTRIMQDFESDTFFPEIDLEKYKLLPEYPGVLSDVQEEKGIKYKFEVYEKND /ddG/run /ddG/output /prepare/checking/structure_input.json /ddG/input /output /prepare/checking False True XXXtagvXXX /prepare/cleaning False 2.9
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#SBATCH --job-name=4M6J_p-ddg
#SBATCH --array=1
#SBATCH --nodes=1
#SBATCH --time=0:10:00
#SBATCH --time=10:00:00
#SBATCH --partition=sbinlab

#This sbatch script launches the parse parse_rosetta_ddgs function, from the parse_cartesian_ddgs
python3XXXtagvXXX2.9
python3 /parser_ddg_v2.py 4M6J A SLNCIVAVSQNMGIGKNGDLPWPPLRNEFRYFQRMTTTSSVEGKQNLVIMGKKTWFSIPEKNRPLKGRINLVLSRELKEPPQGAHFLSRSLDDALKLTEQPELANKVDMVWIVGGSSVYKEAMNHPGHLKLFVTRIMQDFESDTFFPEIDLEKYKLLPEYPGVLSDVQEEKGIKYKFEVYEKND /ddG/run /ddG/output /prepare/checking/structure_input.json /ddG/input /output /prepare/checking False True XXXtagvXXX /prepare/cleaning False 2.9
88 changes: 44 additions & 44 deletions software/rosetta_ddG_pipeline/test/test_mp_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def clean_reference_from_local_path(dir_name, local_path):
fp.write(s)


def clean_version(dir_name, new_val='XXXtagvXXX', old_val=' .*tagv.* '):
def clean_version(dir_name, new_val=' XXXtagvXXX ', old_val=r'\s?.\S+tagv.*?\s'):
for dname, dirs, files in os.walk(dir_name):
for fname in files:
if (not fname.startswith('.')) and (not fname.endswith('.png')):
Expand Down Expand Up @@ -164,9 +164,9 @@ def test_create_rosettamutfile_prov_flag(self):
]

today = date.today()
clean_version(self.output_dir, new_val='XXXtagvXXX')
clean_version(self.output_dir)
clean_version(self.output_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.output_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.output_dir, new_val='\n', old_val=r'VERSION.*\n')
output_dic = {}
for r, d, f in os.walk(self.output_dir):
for file in f:
Expand Down Expand Up @@ -195,11 +195,11 @@ def test_create_rosettamutfile_prov_flag(self):
rosetta_paths.Rosetta_database_path, rosetta_paths.Rosetta_extension]
clean_reference_from_local_path(
self.reference_dir, elem)
clean_version(self.reference_dir, new_val='XXXtagvXXX')
clean_version(self.reference_dir, new_val='\n', old_val='HEADER .*\n')
clean_version(self.reference_dir, new_val='\n', old_val='REMARK .*\n')
clean_version(self.reference_dir)
clean_version(self.reference_dir, new_val='\n', old_val=r'HEADER .*\n')
clean_version(self.reference_dir, new_val='\n', old_val=r'REMARK .*\n')
clean_version(self.reference_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.reference_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.reference_dir, new_val='\n', old_val=r'VERSION.*\n')

for r, d, f in os.walk(self.reference_dir):
for file in f:
Expand All @@ -217,10 +217,10 @@ def test_create_rosettamutfile_prov_flag(self):
reference_dic[os.path.join(
parent_directory, file)] = fp.read()
self.maxDiff = None
print('test_create_rosettamutfile_prov_flag')
for key in output_dic.keys():
if output_dic[key]!=reference_dic[key]:
print(key)
# print('test_create_rosettamutfile_prov_flag')
# for key in output_dic.keys():
# if output_dic[key]!=reference_dic[key]:
# print(key)
self.assertDictEqual(output_dic, reference_dic)


Expand Down Expand Up @@ -292,9 +292,9 @@ def test_create_pipemut_prov_flag(self):
]

today = date.today()
clean_version(self.output_dir, new_val='XXXtagvXXX')
clean_version(self.output_dir)
clean_version(self.output_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.output_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.output_dir, new_val='\n', old_val=r'VERSION.*\n')
output_dic = {}
for r, d, f in os.walk(self.output_dir):
for file in f:
Expand Down Expand Up @@ -323,9 +323,9 @@ def test_create_pipemut_prov_flag(self):
rosetta_paths.Rosetta_database_path, rosetta_paths.Rosetta_extension]
clean_reference_from_local_path(
self.reference_dir, elem)
clean_version(self.reference_dir, new_val='XXXtagvXXX')
clean_version(self.reference_dir)
clean_version(self.reference_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.reference_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.reference_dir, new_val='\n', old_val=r'VERSION.*\n')
for r, d, f in os.walk(self.reference_dir):
for file in f:
file_join = os.path.join(r, file)
Expand All @@ -342,10 +342,10 @@ def test_create_pipemut_prov_flag(self):
reference_dic[os.path.join(
parent_directory, file)] = fp.read()
self.maxDiff = None
print('test_create_pipemut_prov_flag')
for key in output_dic.keys():
if output_dic[key]!=reference_dic[key]:
print(key)
# print('test_create_pipemut_prov_flag')
# for key in output_dic.keys():
# if output_dic[key]!=reference_dic[key]:
# print(key)
self.assertDictEqual(output_dic, reference_dic)


Expand Down Expand Up @@ -419,9 +419,9 @@ def test_create_mutdir_prov_flag(self):
]

today = date.today()
clean_version(self.output_dir, new_val='XXXtagvXXX')
clean_version(self.output_dir)
clean_version(self.output_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.output_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.output_dir, new_val='\n', old_val=r'VERSION.*\n')
output_dic = {}
for r, d, f in os.walk(self.output_dir):
for file in f:
Expand Down Expand Up @@ -450,9 +450,9 @@ def test_create_mutdir_prov_flag(self):
rosetta_paths.Rosetta_database_path, rosetta_paths.Rosetta_extension]
clean_reference_from_local_path(
self.reference_dir, elem)
clean_version(self.reference_dir, new_val='XXXtagvXXX')
clean_version(self.reference_dir)
clean_version(self.reference_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.reference_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.reference_dir, new_val='\n', old_val=r'VERSION.*\n')
for r, d, f in os.walk(self.reference_dir):
for file in f:
file_join = os.path.join(r, file)
Expand All @@ -469,10 +469,10 @@ def test_create_mutdir_prov_flag(self):
reference_dic[os.path.join(
parent_directory, file)] = fp.read()
self.maxDiff = None
print('test_create_mutdir_prov_flag')
for key in output_dic.keys():
if output_dic[key]!=reference_dic[key]:
print(key)
# print('test_create_mutdir_prov_flag')
# for key in output_dic.keys():
# if output_dic[key]!=reference_dic[key]:
# print(key)
self.assertDictEqual(output_dic, reference_dic)


Expand Down Expand Up @@ -544,9 +544,9 @@ def test_create_homodimer_prov_flag(self):
'input_mp_aligned_atm',
]
today = date.today()
clean_version(self.output_dir, new_val='XXXtagvXXX')
clean_version(self.output_dir)
clean_version(self.output_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.output_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.output_dir, new_val='\n', old_val=r'VERSION.*\n')
output_dic = {}
for r, d, f in os.walk(self.output_dir):
for file in f:
Expand Down Expand Up @@ -575,9 +575,9 @@ def test_create_homodimer_prov_flag(self):
rosetta_paths.Rosetta_database_path, rosetta_paths.Rosetta_extension]
clean_reference_from_local_path(
self.reference_dir, elem)
clean_version(self.reference_dir, new_val='XXXtagvXXX')
clean_version(self.reference_dir)
clean_version(self.reference_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.reference_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.reference_dir, new_val='\n', old_val=r'VERSION.*\n')
for r, d, f in os.walk(self.reference_dir):
for file in f:
file_join = os.path.join(r, file)
Expand All @@ -594,10 +594,10 @@ def test_create_homodimer_prov_flag(self):
reference_dic[os.path.join(
parent_directory, file)] = fp.read()
self.maxDiff = None
print('test_create_homodimer_prov_flag')
for key in output_dic.keys():
if output_dic[key]!=reference_dic[key]:
print(key)
# print('test_create_homodimer_prov_flag')
# for key in output_dic.keys():
# if output_dic[key]!=reference_dic[key]:
# print(key)
self.assertDictEqual(output_dic, reference_dic)


Expand All @@ -618,7 +618,7 @@ def test_create_deepTMHMM_prov_flag(self):
'RUN_STRUC': None,
'LIGAND': None,
'OVERWRITE_PATH': True,
'SLURM_PARTITION': 'sbinlab_ib',
'SLURM_PARTITION': 'sbinlab',
'GAPS_OUTPUT': False,
'DUMP_PDB': 0,
'DO_CHECKING': True,
Expand Down Expand Up @@ -664,9 +664,9 @@ def test_create_deepTMHMM_prov_flag(self):
'mutation_clean.txt',
]
today = date.today()
clean_version(self.output_dir, new_val='XXXtagvXXX')
clean_version(self.output_dir)
clean_version(self.output_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.output_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.output_dir, new_val='\n', old_val=r'VERSION.*\n')
output_dic = {}
for r, d, f in os.walk(self.output_dir):
for file in f:
Expand Down Expand Up @@ -694,9 +694,9 @@ def test_create_deepTMHMM_prov_flag(self):
rosetta_paths.Rosetta_main_path, rosetta_paths.Rosetta_tools_path,
rosetta_paths.Rosetta_database_path, rosetta_paths.Rosetta_extension]
clean_reference_from_local_path(self.reference_dir, elem)
clean_version(self.reference_dir, new_val='XXXtagvXXX')
clean_version(self.reference_dir)
clean_version(self.reference_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
clean_version(self.reference_dir, new_val='\n', old_val='VERSION.*\n')
clean_version(self.reference_dir, new_val='\n', old_val=r'VERSION.*\n')
for r, d, f in os.walk(self.reference_dir):
for file in f:
file_join = os.path.join(r, file)
Expand All @@ -713,9 +713,9 @@ def test_create_deepTMHMM_prov_flag(self):
reference_dic[os.path.join(
parent_directory, file)] = fp.read()
self.maxDiff = None
print('test_create_deepTMHMM_prov_flag')
for key in output_dic.keys():
if output_dic[key]!=reference_dic[key]:
print(key)
# print('test_create_deepTMHMM_prov_flag')
# for key in output_dic.keys():
# if output_dic[key]!=reference_dic[key]:
# print(key)
self.assertDictEqual(output_dic, reference_dic)

10 changes: 5 additions & 5 deletions software/rosetta_ddG_pipeline/test/test_sp_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def clean_reference_from_local_path(dir_name, local_path):
fp.write(s)


def clean_version(dir_name, new_val='XXXtagvXXX', old_val=' .*tagv.* '):
def clean_version(dir_name, new_val=' XXXtagvXXX ', old_val=r'\s?.\S+tagv.*?\s'):
for dname, dirs, files in os.walk(dir_name):
for fname in files:
if not fname.startswith('.'):
Expand Down Expand Up @@ -157,7 +157,7 @@ def test_create_rosettamutfile_prov_flag(self):
]

today = date.today()
clean_version(self.output_dir, new_val='XXXtagvXXX')
clean_version(self.output_dir)
clean_version(self.output_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
output_dic = {}
for r, d, f in os.walk(self.output_dir):
Expand Down Expand Up @@ -187,7 +187,7 @@ def test_create_rosettamutfile_prov_flag(self):
rosetta_paths.Rosetta_database_path, rosetta_paths.Rosetta_extension]
clean_reference_from_local_path(
self.reference_dir, elem)
clean_version(self.reference_dir, new_val='XXXtagvXXX')
clean_version(self.reference_dir)
clean_version(self.reference_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())

for r, d, f in os.walk(self.reference_dir):
Expand Down Expand Up @@ -275,7 +275,7 @@ def test_create_ligand_prov_flag(self):
]

today = date.today()
clean_version(self.output_dir, new_val='XXXtagvXXX')
clean_version(self.output_dir)
clean_version(self.output_dir, new_val='', old_val=today.strftime("%d-%b-%y").upper())
output_dic = {}
for r, d, f in os.walk(self.output_dir):
Expand Down Expand Up @@ -305,7 +305,7 @@ def test_create_ligand_prov_flag(self):
rosetta_paths.Rosetta_database_path, rosetta_paths.Rosetta_extension]
clean_reference_from_local_path(
self.reference_dir, elem)
clean_version(self.reference_dir, new_val='XXXtagvXXX')
clean_version(self.reference_dir)
clean_version(self.reference_dir, new_val='\n', old_val=today.strftime("%d-%b-%y").upper())

for r, d, f in os.walk(self.reference_dir):
Expand Down

0 comments on commit 522434d

Please sign in to comment.