diff tools/plotting/venn_list.py @ 4:29fcd027d67a draft

Uploaded v0.0.6 take 1, simple test (which currently fails)
author peterjc
date Thu, 16 May 2013 12:43:57 -0400
parents aefc86eda5f6
children
line wrap: on
line diff
--- a/tools/plotting/venn_list.py	Thu May 16 12:43:20 2013 -0400
+++ b/tools/plotting/venn_list.py	Thu May 16 12:43:57 2013 -0400
@@ -5,7 +5,7 @@
 (formerly SCRI), UK. All rights reserved.
 See accompanying text file for licence details (MIT/BSD style).
 
-This is version 0.0.3 of the script.
+This is version 0.0.4 of the script.
 """
 
 
@@ -46,8 +46,9 @@
 def load_ids(filename, filetype):
     if filetype=="tabular":
         for line in open(filename):
-            if not line.startswith("#"):
-                yield line.rstrip("\n").split("\t",1)[0]
+            line = line.rstrip("\n")
+            if line and not line.startswith("#"):
+                yield line.split("\t",1)[0]
     elif filetype=="fasta":
         for line in open(filename):
             if line.startswith(">"):