Mercurial > repos > greg > lrn_risk
changeset 5:5aa8560d9d91 draft
Uploaded
author | greg |
---|---|
date | Tue, 29 Aug 2023 15:17:07 +0000 |
parents | 8fe04662585c |
children | a3799444f281 |
files | lrn_risk.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lrn_risk.py Tue Aug 29 01:23:22 2023 +0000 +++ b/lrn_risk.py Tue Aug 29 15:17:07 2023 +0000 @@ -133,11 +133,15 @@ freetext = '{0}/{1} ({2}%)'.format(pres, denom, perc) elif gtdb != '(Unknown Species)': ann = 'NA' - denom = gtdbd[gtdb] + if gtdb in gtdbd.keys(): + denom = gtdbd[gtdb] + else: + denom = 'NA' freetext = "*WARNING" - warnings.append("*WARNING: This gene has never been detected in this species! Interpret with caution!") + warnings.append("*WARNING: This gene has never been detected in this species and/or this species has not been included in the LRNRisk database! Interpret with caution!") else: ann = 'NA' + denom = '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))