changeset 4:429a6b4df5e5

Restrict to info items that are key=value pairs
author Jim Johnson <jj@umn.edu>
date Wed, 24 Apr 2013 08:00:04 -0500
parents 57edf4d08816
children 85b933b7d231
files snpEff_cds_report.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/snpEff_cds_report.py	Sun Apr 21 14:18:21 2013 -0500
+++ b/snpEff_cds_report.py	Wed Apr 24 08:00:04 2013 -0500
@@ -743,6 +743,8 @@
               print >> sys.stdout, "only simple variant currently supported, ignoring: %s:%s  %s\n" % (chrom,pos,alt)
             for info_item in info.split(';'):
               try:
+                if info_item.find('=') < 0:
+                  continue
                 (key,val) = info_item.split('=',1)  
                 if key == 'SAF':   # Usually a SAF for each variant: if  A,AG   then SAF=0.333333333333333,SAF=0.333333333333333;
                   freqs = info_item.split(',')