changeset 4:8fe04662585c draft

Uploaded
author greg
date Tue, 29 Aug 2023 01:23:22 +0000
parents 5a27ac020c9e
children 5aa8560d9d91
files lrn_risk.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lrn_risk.py	Tue Jun 27 14:02:05 2023 +0000
+++ b/lrn_risk.py	Tue Aug 29 01:23:22 2023 +0000
@@ -82,7 +82,7 @@
 def gene_dist(f, blast, gtdb):
     # get within-species prevalence of genes
     # for virulence factors (VFs): uses VFDB VFs detected via ABRicate's VFDB db
-    # for AMR genes: uses AMR genes detected via ABRicate's ResFinder db
+    # for AMR genes: uses AMR genes detected via ABRicate + PIMA db
     # for VFs and AMR genes: genes were detected via ABRicate XXX
     # minimum nucleotide identity and coverage values >=80%
     # total of 61,161 genomes queried
@@ -132,12 +132,12 @@
                 ann = items[-1]
                 freetext = '{0}/{1} ({2}%)'.format(pres, denom, perc)
             elif gtdb != '(Unknown Species)':
-                ann = annd[key]
+                ann = 'NA'
                 denom = gtdbd[gtdb]
                 freetext = "*WARNING"
                 warnings.append("*WARNING: This gene has never been detected in this species! Interpret with caution!")
             else:
-                ann = annd[key]
+                ann = 'NA'
                 freetext = "**WARNING"
                 warnings.append("**WARNING: This genome belongs to an undescribed species. Interpret with caution!")
             finallines.append('%s\t%s\t%s' % (bv, ann, freetext))