Skip to content

Commit daa01b3

Browse files
committed
use modern version parsing
1 parent 79dec6a commit daa01b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

funannotate/aux_scripts/funannotate-p2g.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import datetime
1212
from Bio import SeqIO
1313
import funannotate.library as lib
14-
from pkg_resources import parse_version
14+
from packaging.version import Version
1515

1616
# setup menu with argparse
1717
class MyFormatter(argparse.ArgumentDefaultsHelpFormatter):
@@ -91,7 +91,7 @@ def __init__(self, prog):
9191
def runDiamond(input, query, cpus, output, premade_db=None):
9292
# create DB of protein sequences
9393
# check diamond version
94-
if parse_version(lib.getDiamondVersion()) >= parse_version('2.0.5'):
94+
if Version(lib.getDiamondVersion()) >= Version('2.0.5'):
9595
# run in frameshift mode
9696
cmd = ['diamond', 'blastx', '--threads', str(cpus), '-q', input,
9797
'--db', 'diamond', '-o', 'diamond.matches.tab', '-e', '1e-10',

0 commit comments

Comments
 (0)