Skip to content

Commit

Permalink
support isolate mode but keep --careful as default
Browse files Browse the repository at this point in the history
  • Loading branch information
hyphaltip committed Jun 3, 2022
1 parent ceb06fa commit 526fff0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 4 additions & 3 deletions AAFTF/AAFTF_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,13 @@ def main():
parser_asm.add_argument('--merged',required=False,
help="Merged reads from flash or fastp")

parser_asm.add_argument('--careful',required=False, action='store_true',dest='isolate',
help="Run --careful mode not --isolate mode in spades (Default)")
parser_asm.add_argument('--careful',required=False, action='store_true',default=True,
help="Run --careful mode in spades (Default)")

parser_asm.add_argument('--no-careful',required=False, action='store_false',default=True,dest='careful')

parser_asm.add_argument('--isolate',required=False, action='store_true',
help="Run --isolate mode not --careful mode in spades")
parser.set_defaults(isolate=False)

parser_asm.add_argument('-v','--debug',action='store_true',
help="Print Spades stdout to terminal")
Expand Down
7 changes: 6 additions & 1 deletion AAFTF/assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ def run_spades(parser,args):
if not args.workdir:
args.workdir = 'spades_'+str(uuid.uuid4())[:8]

runcmd = ['spades.py','--threads', str(args.cpus), '--mem', args.memory, '--careful',
runcmd = ['spades.py','--threads', str(args.cpus), '--mem', args.memory,
'-o',args.workdir]

if args.isolate:
runcmd.extend(['--isolate'])
elif args.careful:
runcmd.extend(['--careful'])

if args.assembler_args:
runcmd.extend(args.assembler_args)

Expand Down

0 comments on commit 526fff0

Please sign in to comment.