testing dynamut script
This commit is contained in:
parent
aec61e2c1f
commit
d77491b507
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_string_dtype
|
||||||
from pandas.api.types import is_numeric_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'
|
batch_result_url = host_dynamut + pred_dynamut_batch
|
||||||
|
|
||||||
mut = 'S104R'
|
|
||||||
single_result_url = 'http://biosig.unimelb.edu.au/dynamut/single_results/15955901077' + '/' + mut
|
|
||||||
|
|
||||||
|
|
||||||
|
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 = {}
|
param_dict = {}
|
||||||
|
@ -54,20 +58,20 @@ if result_response.status_code == 200:
|
||||||
}
|
}
|
||||||
results_df = pd.DataFrame.from_dict(param_dict, orient = "index").T
|
results_df = pd.DataFrame.from_dict(param_dict, orient = "index").T
|
||||||
|
|
||||||
#%% for loop
|
print(results_df)
|
||||||
#%%
|
|
||||||
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
|
|
||||||
|
|
||||||
muts = ["S104R", "G24R"]
|
#%% for loop
|
||||||
|
|
||||||
|
single_url = host_dynamut + '/single_results/' + str(result_id)
|
||||||
|
|
||||||
|
muts = ["S2C", "S2F"]
|
||||||
|
|
||||||
# initilialise empty df
|
# initilialise empty df
|
||||||
dynamut_results_df = pd.DataFrame()
|
dynamut_results_df = pd.DataFrame()
|
||||||
|
|
||||||
for i, mut in enumerate(muts):
|
for i, mut in enumerate(muts):
|
||||||
#param_dict = {}
|
#param_dict = {}
|
||||||
print('Running mutation', i, ':', mut)
|
print('Running mutation', i+1, ':', mut)
|
||||||
snp = mut
|
snp = mut
|
||||||
single_result_url = single_url + '/' + snp
|
single_result_url = single_url + '/' + snp
|
||||||
print('Getting results from:', single_result_url)
|
print('Getting results from:', single_result_url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue