# HG changeset patch # User melissacline # Date 1407353644 25200 # Node ID f1929875b1b3005c8658adced0ef572a4bf82c73 # Parent 895f0a636f378f422ba8a4c31103f7ee4894efea 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 diff -r 895f0a636f37 -r f1929875b1b3 ttest/stats.py --- 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)