diff validate_affy_metadata.py @ 21:90688364136c draft

Uploaded
author greg
date Thu, 14 Feb 2019 13:13:33 -0500
parents 38166b76f47a
children 84478b80cc47
line wrap: on
line diff
--- a/validate_affy_metadata.py	Tue Jan 22 13:57:09 2019 -0500
+++ b/validate_affy_metadata.py	Thu Feb 14 13:13:33 2019 -0500
@@ -76,8 +76,8 @@
             accumulated_msgs = add_error_msg(accumulated_msgs, "The input file contains more than 97 lines (must be 1 header line and no more than 96 data lines).")
             stop_error(accumulated_msgs)
         items = line.split("\t")
-        if len(items) != 28:
-            accumulated_msgs = add_error_msg(accumulated_msgs, "Line %d contains %s columns, (must be 28)." % (i, len(items)))
+        if len(items) != 30:
+            accumulated_msgs = add_error_msg(accumulated_msgs, "Line %d contains %s columns, (must be 30)." % (i, len(items)))
             stop_error(accumulated_msgs)
         # Required and validated.
         # Required.
@@ -155,6 +155,12 @@
         # Optional.
         public_after_date = items[27]
         accumulated_msga = validate_date_string(i, public_after_date, accumulated_msgs)
+        # Required and validated.
+        sperm_motility = items[28]
+        accumulated_msgs = validate_decimal(i, sperm_motility, accumulated_msgs)
+        # Required and validated.
+        healing_time = items[29]
+        accumulated_msgs = validate_decimal(i, healing_time, accumulated_msgs)
 
 if len(accumulated_msgs) > 0:
     stop_error(accumulated_msgs)