Skip to content

Commit 92444a0

Browse files
author
Jon Palmer
committed
fix antismash download
1 parent fc24b02 commit 92444a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

funannotate/remote.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def __init__(self, prog):
260260
job_status = requests.get(base_address+"/api/v1.0/status/"+jobid)
261261
if job_status.json()['status'] == 'done':
262262
break
263-
time.sleep(120) # check every 2 minutes
263+
time.sleep(60) # check every minute
264264
result_url = job_status.json()['result_url']
265265
base_url = result_url.replace('index.html', '')
266266
lib.log.info("antiSMASH v%s job finished" % (as_vers))
@@ -283,12 +283,12 @@ def __init__(self, prog):
283283
download(download_url, 'antiSMASH.zip')
284284
# now unzip and move folder
285285
zipref = zipfile.ZipFile('antiSMASH.zip', 'r')
286-
zipref.extractall(outputdir)
286+
zipref.extractall(os.path.join(outputdir, jobid))
287287
zipref.close()
288288
os.remove('antiSMASH.zip')
289289
lib.log.info("Results folder: %s/%s" % (outputdir, jobid))
290290
# now grab the GBK files from folder as you will need just that for annotation, place in annotate_misc folder for auto-detection
291-
anti_GBK = os.path.join(outputdir, jobid, baselink+'.final.gbk')
291+
anti_GBK = os.path.join(outputdir, jobid, os.path.basename(genbank))
292292
final = os.path.join(outputdir, 'annotate_misc',
293293
'antiSMASH.results.gbk')
294294
shutil.copyfile(anti_GBK, final)

0 commit comments

Comments
 (0)