Skip to content

Commit

Permalink
fix busco call for annotate
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer committed Dec 29, 2019
1 parent b2315c9 commit d6b4aa4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 2 additions & 4 deletions funannotate/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def MEROPSBlast(input, cpus, evalue, tmpdir, output, diamond=True):
cmd = ['blastp', '-db', blastdb, '-outfmt', '5', '-out', blast_tmp, '-num_threads', str(cpus),
'-max_target_seqs', '1', '-evalue', str(evalue), '-query', input]
if not os.path.isfile(blast_tmp):
lib.runSubprocess(cmd, '.', lib.log)
lib.runSubprocess4(cmd, '.', lib.log)
# parse results
with open(output, 'w') as out:
with open(blast_tmp, 'r') as results:
Expand Down Expand Up @@ -62,7 +62,7 @@ def SwissProtBlast(input, cpus, evalue, tmpdir, GeneDict, diamond=True):
cmd = ['blastp', '-db', blastdb, '-outfmt', '5', '-out', blast_tmp, '-num_threads', str(cpus),
'-max_target_seqs', '1', '-evalue', str(evalue), '-query', input]
if not lib.checkannotations(blast_tmp):
lib.runSubprocess(cmd, '.', lib.log)
lib.runSubprocess4(cmd, '.', lib.log)
# parse results
counter = 0
total = 0
Expand Down Expand Up @@ -293,8 +293,6 @@ def __init__(self, prog):
'--antismash', help='antiSMASH results in genbank format')
parser.add_argument('--force', action='store_true',
help='Over-write output folder')
parser.add_argument('--AUGUSTUS_CONFIG_PATH',
help='Path to Augustus config directory, $AUGUSTUS_CONFIG_PATH')
parser.add_argument('--phobius', help='Phobius results')
parser.add_argument('--eggnog', help='EggNog Mapper annotations')
parser.add_argument('--busco_db', default='dikarya',
Expand Down
9 changes: 5 additions & 4 deletions funannotate/aux_scripts/funannotate-BUSCO2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,7 @@ def _parse_args():
optional.add_argument('--stopCodon', default='False', dest='stopCodon', choices=['True', 'False'],
help='stop codon option for augustus, --stopCodonExcludedFromCDS=')

required.add_argument('--local_augustus', required=True, dest='local_augustus',
optional.add_argument('--local_augustus', required=False, dest='local_augustus',
help='local augustus folder')

optional.add_argument('--augustus_parameters', required=False, default='', dest='augustus_parameters',
Expand Down Expand Up @@ -3178,8 +3178,10 @@ def _define_parameters(args):
except IOError:
_logger.error('Impossible to read the fasta file %s ' % args['in'])
raise SystemExit

augustus_config_path = args['local_augustus']
if 'local_augustus' in args:
augustus_config_path = args['local_augustus']
else:
augustus_config_path = os.environ["AUGUSTUS_CONFIG_PATH"]
try:
if augustus_config_path[-1] != '/':
augustus_config_path += '/'
Expand Down Expand Up @@ -3269,7 +3271,6 @@ def main(show_thread=False):
_check_path_exist(args['in'])
_check_path_exist(args['clade'])
params = _define_parameters(args)
print(params)
_set_rerun_busco_command(params)

_logger.info('To reproduce this run: %s' % _rerun_cmd)
Expand Down

0 comments on commit d6b4aa4

Please sign in to comment.