diff tools/plotting/venn_list.py @ 3:6aae6bc0802d draft

Uploaded v0.0.6, basic unit test, MIT licence, RST README, citation information, development moved to GitHub
author peterjc
date Wed, 18 Sep 2013 06:19:51 -0400
parents baf7031d470e
children
line wrap: on
line diff
--- a/tools/plotting/venn_list.py	Mon May 06 14:05:13 2013 -0400
+++ b/tools/plotting/venn_list.py	Wed Sep 18 06:19:51 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(">"):