ran submit and get_results for one last batch for mcsm_na and did some bash formatting to get proper filenames, etc.

This commit is contained in:
Tanushree Tunstall 2021-08-06 19:09:29 +01:00
parent 4733ec9db0
commit 50cf6ca3ac
4 changed files with 38 additions and 7 deletions

View file

@ -359,7 +359,19 @@ def format_mcsm_output(mcsm_outputcsv):
print('Raw duet scores:\n', mcsm_data['duet_stability_change']
, '\n---------------------------------------------------------------'
, '\nScaled duet scores:\n', mcsm_data['duet_scaled'])
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# additional check added
c2 = mcsm_data[mcsm_data['duet_scaled']>=0].count()
DUET_pos2 = c2.get(key = 'duet_scaled')
if DUET_pos == DUET_pos2:
print('\nPASS: DUET values scaled correctly')
else:
print('\nFAIL: DUET values scaled numbers MISmatch'
, '\nExpected number:', DUET_pos
, '\nGot:', DUET_pos2
, '\n======================================================')
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#%%=====================================================================
#############
# scale affinity values
@ -375,6 +387,22 @@ def format_mcsm_output(mcsm_outputcsv):
print('Raw affinity scores:\n', mcsm_data['ligand_affinity_change']
, '\n---------------------------------------------------------------'
, '\nScaled affinity scores:\n', mcsm_data['affinity_scaled'])
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# additional check added
c_lig = mcsm_data[mcsm_data['ligand_affinity_change']>=0].count()
Lig_pos = c_lig.get(key = 'ligand_affinity_change')
c_lig2 = mcsm_data[mcsm_data['affinity_scaled']>=0].count()
Lig_pos2 = c_lig2.get(key = 'affinity_scaled')
if Lig_pos == Lig_pos2:
print('\nPASS: Ligand affintiy values scaled correctly')
else:
print('\nFAIL: Ligand affinity values scaled numbers MISmatch'
, '\nExpected number:', Lig_pos
, '\nGot:', Lig_pos2
, '\n======================================================')
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#%%=====================================================================
#############

View file

@ -40,7 +40,7 @@ def get_results(url_file, host_url, output_dir, outfile_suffix):
txt_url = f"{host_url}/mcsm_na/static/results/" + prediction_number + '.txt'
print('CHECK txt url:', txt_url)
out_filename = mcsm_na_results_dir + '/' + outfile_suffix + '_output_' + prediction_number + '.txt'
out_filename = mcsm_na_results_dir + '/' + outfile_suffix + '_output_' + prediction_number + '.txt.gz'
response_txt = requests.get(txt_url, stream = True)
if response_txt.status_code == 200:
print('\nDownloading .txt:', txt_url

View file

@ -23,8 +23,9 @@ outdir = datadir + '/' + drug + '/output'
#==============================================================================
# batch 26: 25.txt, RETRIEVED: 16 Feb:
my_url_file = outdir + '/mcsm_na_temp/mcsm_na_result_url_gid_b26.txt'
my_suffix = 'gid_b26'
# batch 27: 26.txt, RETRIEVED: 6 Aug:
my_url_file = outdir + '/mcsm_na_temp/mcsm_na_result_url_gid_b27.txt'
my_suffix = 'gid_b27'
#==============================================================================

View file

@ -28,8 +28,10 @@ my_pdb_file = indir + '/gid_complex.pdb'
#=============================================================================
# batch 26: 25.txt # RAN: 16 Feb:
my_mutation_list = outdir + '/snp_batches/20/snp_batch_25.txt'
my_suffix = 'gid_b26'
# batch 27: 26.txt # RAN: 6 Aug:
# off by one
my_mutation_list = outdir + '/snp_batches/20/snp_batch_26.txt'
my_suffix = 'gid_b27'
#==============================================================================
#==========================