changeset 2:f1929875b1b3

Bug fix: added support for the condition that the clinical vector (from which the two categorical values are drawn) might be empty for some rows
author melissacline
date Wed, 06 Aug 2014 12:34:04 -0700
parents 895f0a636f37
children 4b6698f49617
files ttest/stats.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ttest/stats.py	Mon Aug 04 13:44:46 2014 -0700
+++ b/ttest/stats.py	Wed Aug 06 12:34:04 2014 -0700
@@ -72,7 +72,10 @@
     fp.readline()
     for row in fp:
         tokens = row.rstrip().split("\t")
-        clinicalVector[tokens[0]] = tokens[1]
+        if len(tokens) > 1:
+            clinicalVector[tokens[0]] = tokens[1]
+        else:
+            clinicalVector[tokens[0]] = None
     fp.close()
     return(clinicalVector)