Skip to content

Commit

Permalink
changed from -a to --daa because the way command is printed does not …
Browse files Browse the repository at this point in the history
…handle short args. TODO
  • Loading branch information
necrolyte2 committed Aug 31, 2015
1 parent 2084553 commit 4c5ab46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bio_pieces/parallel_blast.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def parallel_diamond(inputfile, outfile, ninst, db, task, diamondoptions):
# format of the file
diamond_cmd = [
dmnd_path, task, '--threads', str(ninst), '--db', db, '--query', '{}',
'-a', '{}.{#}', ';', dmnd_path, 'view', '{}.{#}.daa'
'--daa', '{}.{#}', ';', dmnd_path, 'view', '--daa', '{}.{#}.daa'
]
if len(sshlogins) > 2:
args = ['-u', '--pipe', '--block', '10', '--recstart', '>', '--cat']
Expand All @@ -143,10 +143,10 @@ def parallel_diamond(inputfile, outfile, ninst, db, task, diamondoptions):
if diamondoptions:
args += shlex.split(diamondoptions)
p = run(
dcmd, *args, threads=ninst, db=db, query=inputfile, a=outfile
dcmd, *args, threads=ninst, db=db, query=inputfile, daa=outfile
)
p = run(
dcmd, 'view', a=outfile+'.daa', _out=open(outfile,'w')
dcmd, 'view', daa=outfile+'.daa', _out=open(outfile,'w')
)

def run(cmd, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parallel_blast.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@ def test_local_runs_diamond_cmd_directly(self):
self.assertEqual(5, r1k['threads'])
self.assertEqual(self.infile, r1k['query'])
self.assertEqual('/path/to/dmd', r1k['db'])
self.assertEqual(self.outfile, r1k['a'])
self.assertEqual(self.outfile, r1k['daa'])
self.assertEqual('foox', r1a[0])
self.assertEqual(('-bar','foo'), r1a[1:])

r2a,r2k = r2
self.assertEqual('view', r2a[0])
self.assertEqual(self.outfile+'.daa', r2k['a'])
self.assertEqual(self.outfile+'.daa', r2k['daa'])
self.assertEqual(self.mock_open.return_value, r2k['_out'])
self.mock_open.assert_called_once_with(self.outfile,'w')

Expand Down

0 comments on commit 4c5ab46

Please sign in to comment.