testing dynamut script
This commit is contained in:
parent
bcf4467c44
commit
0c95b3a512
1 changed files with 15 additions and 11 deletions
|
@ -19,13 +19,17 @@ import pandas as pd
|
|||
from pandas.api.types import is_string_dtype
|
||||
from pandas.api.types import is_numeric_dtype
|
||||
#%%============================================================================
|
||||
#streptomycin/gid_complex.pdb
|
||||
host_dynamut = 'http://biosig.unimelb.edu.au/dynamut'
|
||||
pred_dynamut_batch = '/results_prediction/161287964015'
|
||||
result_id = re.search( r"([0-9]+)$", pred_dynamut).group(0)
|
||||
|
||||
batch_result_url = 'http://biosig.unimelb.edu.au/dynamut/results_prediction/15955901077'
|
||||
|
||||
mut = 'S104R'
|
||||
single_result_url = 'http://biosig.unimelb.edu.au/dynamut/single_results/15955901077' + '/' + mut
|
||||
|
||||
batch_result_url = host_dynamut + pred_dynamut_batch
|
||||
|
||||
mut = 'S2C'
|
||||
single_url = host_dynamut + '/single_results/' + str(result_id)
|
||||
single_result_url = host_dynamut + '/single_results/' + str(result_id) + '/' + mut
|
||||
print(single_result_url)
|
||||
|
||||
#%%============================================================================
|
||||
param_dict = {}
|
||||
|
@ -54,20 +58,20 @@ if result_response.status_code == 200:
|
|||
}
|
||||
results_df = pd.DataFrame.from_dict(param_dict, orient = "index").T
|
||||
|
||||
#%% for loop
|
||||
#%%
|
||||
host_dynamut = 'http://biosig.unimelb.edu.au/dynamut'
|
||||
batch_url_number = re.search(r'([0-9]+)$', batch_result_url).group(0)
|
||||
single_url = host_dynamut + '/single_results/' + batch_url_number
|
||||
print(results_df)
|
||||
|
||||
muts = ["S104R", "G24R"]
|
||||
#%% for loop
|
||||
|
||||
single_url = host_dynamut + '/single_results/' + str(result_id)
|
||||
|
||||
muts = ["S2C", "S2F"]
|
||||
|
||||
# initilialise empty df
|
||||
dynamut_results_df = pd.DataFrame()
|
||||
|
||||
for i, mut in enumerate(muts):
|
||||
#param_dict = {}
|
||||
print('Running mutation', i, ':', mut)
|
||||
print('Running mutation', i+1, ':', mut)
|
||||
snp = mut
|
||||
single_result_url = single_url + '/' + snp
|
||||
print('Getting results from:', single_result_url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue