Skip to content

Commit

Permalink
Add support to parse antiSMASH v6 results (#531)
Browse files Browse the repository at this point in the history
* Add support to parse antiSMASH v6 results

* antiMSASH parser simplify

If parsing v5 and v6 is the same, we can just change the logic of that one line to include all versions >5.

Co-authored-by: Jon Palmer <nextgen.usfs@gmail.com>
  • Loading branch information
reslp and nextgenusfs committed Jan 14, 2021
1 parent 2cbf7fe commit 203df27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions funannotate/library.py
Expand Up @@ -6867,7 +6867,7 @@ def ParseErrorReport(input, Errsummary, val, Discrep, output, keep_stops):


def antismash_version(input):
# choose v4 or v5 parser
# choose v4, v5 or v6 parser
version = 4
with open(input, 'r') as infile:
for rec in SeqIO.parse(infile, 'genbank'):
Expand Down Expand Up @@ -6949,7 +6949,7 @@ def ParseAntiSmash(input, tmpdir, output, annotations):
elif not i.startswith('smCOG tree'):
notes = i
smProducts[ID] = notes
elif smash_version == 5:
elif smash_version >= 5:
if f.type == "protocluster":
clusterCount += 1
chr = record.id
Expand Down Expand Up @@ -7000,6 +7000,7 @@ def ParseAntiSmash(input, tmpdir, output, annotations):
if 'biosynthetic' in v:
backboneCount += 1


# if smash_version == 4:
log.info("Found %i clusters, %i biosynthetic enyzmes, and %i smCOGs predicted by antiSMASH" % (
clusterCount, backboneCount, cogCount))
Expand Down

0 comments on commit 203df27

Please sign in to comment.