Skip to content

Commit fc54451

Browse files
committed
BUG fix sensitivity of diamond
1 parent 037def4 commit fc54451

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

gmsc_mapper/main.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,9 @@ def mapdb_diamond(args,queryfile):
392392
diamond = './bin/diamond'
393393

394394
database = path.join(args.dbdir, "diamond_targetdb.dmnd")
395-
396-
diamond_cmd = [diamond,'blastp',
395+
396+
if args.sensitivity != '--default':
397+
diamond_cmd = [diamond,'blastp',
397398
'-q',queryfile,
398399
'-d',database,
399400
'-o',resultfile,
@@ -404,6 +405,14 @@ def mapdb_diamond(args,queryfile):
404405
'--subject-cover',str(float(args.coverage)*100),
405406
'-p',str(args.threads),
406407
'--outfmt'] + outfmt.split(',')
408+
else:
409+
diamond_cmd = [diamond,'blastp',
410+
'-q',queryfile,
411+
'-d',database,
412+
'-o',resultfile,
413+
'-e',str(args.evalue),
414+
'--id',str(float(args.identity)*100), '--query-cover',str(float(args.coverage)*100),
415+
'--subject-cover',str(float(args.coverage)*100), '-p',str(args.threads), '--outfmt'] + outfmt.split(',')
407416
if args.quiet:
408417
diamond_cmd.append('--quiet')
409418

@@ -545,8 +554,8 @@ def main(args=None):
545554
args.sensitivity = {
546555
None: '--more-sensitive',
547556
'1': '--fast',
548-
'2': '--mid-sensitive',
549-
'3': '--default',
557+
'2': '--default',
558+
'3': '--mid-sensitive',
550559
'4': '--sensitive',
551560
'5': '--more-sensitive',
552561
'6': '--very-sensitive',

0 commit comments

Comments
 (0)