bug correction master
authorW-WN\william.ngom <william.ngom@auf.org>
Thu, 21 Sep 2017 19:48:49 +0000 (15:48 -0400)
committerW-WN\william.ngom <william.ngom@auf.org>
Thu, 21 Sep 2017 19:48:49 +0000 (15:48 -0400)
convert_vcf.py

index a5588f2..54f977f 100644 (file)
@@ -109,7 +109,7 @@ class VcfToCsvConverter:
                                if self.verbose:
                                        print ("Processing .... %s\n" % NewFileName)
 
-                               inFile = codecs.open(NewFileName, mode='r', encoding='utf-8')
+                               inFile = codecs.open(NewFileName, mode='rb', encoding='utf-8')
                                theLine = inFile.readline()
                                for theLine in inFile:
                                        self.__parseLine(theLine)
@@ -295,6 +295,13 @@ class VcfToCsvConverter:
                        ( ln, fn, mi, pr) = p.split(";")
                elif part>=5:
                        ( ln, fn, mi, pr, po ) = p.split(";")
+               elif part>5:
+                       x=p.split(";")
+                       ln = x[1]
+                       fn = x[2]
+                       mi = x[3]
+                       pr = x[4]
+                       po = x[5]
 
                self.data['NAME PREFIX'] = pr
                self.data['NAME FIRST'] = fn