Skip to content

Commit

Permalink
EVM was not being re-run in predict; added --keep_evm option
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer committed Aug 2, 2019
1 parent 8ad5165 commit df4262f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
17 changes: 5 additions & 12 deletions bin/funannotate-predict.py
Expand Up @@ -1270,20 +1270,11 @@ def which_path(file_name):
lib.print_table(InputListCounts)

if args.keep_evm and os.path.isfile(EVM_out):
lib.log.info("Using existing EVM predictions")
lib.log.info("Using existing EVM predictions: {:}".format(EVM_out))
else:
#setup EVM run
EVM_script = os.path.join(parentdir, 'bin', 'funannotate-runEVM.py')

#check if EVM input is identical as before
if os.path.isfile(Predictions+'.old'):
if not lib.sha256_check(Predictions, Predictions+'.old'):
#need to run EVM again, so delete output
if os.path.isfile(EVM_out):
os.remove(EVM_out)
else:
lib.log.info("Using existing EVM run data")

#get absolute paths for everything
Weights = os.path.abspath(Weights)
EVM_out = os.path.abspath(EVM_out)
Expand All @@ -1307,8 +1298,10 @@ def which_path(file_name):
#add output to command
evm_cmd = base_evm + ['--min_intron_length', str(args.min_intronlen), EVM_out]
#run EVM
if not os.path.isfile(EVM_out):
subprocess.call(evm_cmd)
lib.log.debug(' '.join(evm_cmd))
subprocess.call(evm_cmd)

#check output
try:
total = lib.countGFFgenes(EVM_out)
except IOError:
Expand Down
1 change: 1 addition & 0 deletions funannotate.py
Expand Up @@ -264,6 +264,7 @@ def fmtcols(mylist, cols):
--repeats2evm Use repeats in EVM consensus model building
--repeat_filter Repetitive gene model filtering. Default: overlap blast [overlap,blast,none]
--keep_no_stops Keep gene models without valid stops
--keep_evm Keep existing EVM results (for rerunning pipeline)
--SeqCenter Sequencing facilty for NCBI tbl file. Default: CFMR
--SeqAccession Sequence accession number for NCBI tbl file. Default: 12345
--force Annotated unmasked genome
Expand Down

0 comments on commit df4262f

Please sign in to comment.