ran b9 and b10 for gid after Dynamut team reran due to server issues

This commit is contained in:
Tanushree Tunstall 2021-08-12 10:06:43 +01:00
parent 96277d78f6
commit e48f215227
2 changed files with 11 additions and 10 deletions

View file

@ -86,7 +86,7 @@ def get_results(url_file, host_url, output_dir, outfile_suffix):
# Download .tar.gz file # Download .tar.gz file
prediction_number = re.search(r'([0-9]+$)', line).group(0) prediction_number = re.search(r'([0-9]+$)', line).group(0)
tgz_url = f"{host_url}/dynamut/results_file/results_" + prediction_number + '.tar.gz' tgz_url = f"{host_url}/dynamut/results_file/results_" + prediction_number + '.tar.gz'
tgz_filename = dynamut_results_dir + '/' + outfile_suffix + '_results_' + prediction_number + '.tar.gz' tgz_filename = dynamut_results_dir + outfile_suffix + '_results_' + prediction_number + '.tar.gz'
response_tgz = requests.get(tgz_url, stream = True) response_tgz = requests.get(tgz_url, stream = True)
if response_tgz.status_code == 200: if response_tgz.status_code == 200:
print('\nDownloading tar.gz file:', tgz_url print('\nDownloading tar.gz file:', tgz_url

View file

@ -22,24 +22,25 @@ drug = 'streptomycin'
datadir = homedir + '/git/Data/' datadir = homedir + '/git/Data/'
indir = datadir + drug + '/input/' indir = datadir + drug + '/input/'
outdir = datadir + drug + '/output/' outdir = datadir + drug + '/output/'
outdir_dynamut_temp = datadir + drug + '/output/dynamut_results/dynamut_temp/' outdir_dynamut_temp = outdir + 'dynamut_results/dynamut_temp/'
#============================================================================== #==============================================================================
# batch 8: 08.txt, # RETRIEVED 23 Feb 08:54 # batch 8: 08.txt, # RETRIEVED 23 Feb 08:54
#my_url_file = outdir + '/dynamut_temp/dynamut_result_url_gid_b8.txt' #my_url_file = outdir + '/dynamut_temp/dynamut_result_url_gid_b8.txt'
#my_suffix = 'gid_b7' #my_suffix = 'gid_b7'
#b09 and b10 failed! #b09 and b10 failed, ran by Carlos, and returned results on 12 Aug
# batch 9: 09.txt, # batch 9 and 10: RETRIEVED 12 Aug 09:25
my_url_file = outdir_dynamut_temp + 'dynamut_result_url_gid_b10_ab.txt' my_url_file = outdir_dynamut_temp + 'dynamut_result_url_gid_b10.txt'
my_suffix = 'gid_b10_ab' my_suffix = 'gid_b10'
#============================================================================== #==============================================================================
#========================== #==========================
# CALL: get_results() # CALL: get_results()
# Data: gid+streptomycin # Data: gid+streptomycin
#========================== #==========================
print(my_url_file, 'suffix:', my_suffix) # output file saves in dynamut_results/ (created if it doesn't exist) inside outdir
print('Fetching results from url file :', my_url_file, '\nsuffix:', my_suffix)
get_results(url_file = my_url_file get_results(url_file = my_url_file
, host_url = my_host , host_url = my_host