changeset 3:7f95329251f0 draft

Uploaded
author greg
date Fri, 20 Sep 2019 08:42:33 -0400
parents 72e79ed7ca41
children 9d5a14c913b1
files validate_affy_metadata.py
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/validate_affy_metadata.py	Tue Sep 17 12:45:57 2019 -0400
+++ b/validate_affy_metadata.py	Fri Sep 20 08:42:33 2019 -0400
@@ -63,14 +63,6 @@
     return accumulated_msgs
 
 
-def validate_integer(line_no, integer_string, column, accumulated_msgs):
-    try:
-        integer_string.isdigit()
-        return accumulated_msgs
-    except Exception:
-        return add_error_msg(accumulated_msgs, "Line %d contains an incorrect integer value (%s) for column %s." % (line_no, integer_string, column))
-
-
 accumulated_msgs = ""
 # Parse the input file, skipping the header, and validating
 # that each data line consists of 31 comma-separated items.
@@ -116,9 +108,9 @@
         # Optional.
         colony_location = items[9]
         depth = items[10]
-        # If depth has a value, then it must be integer.
+        # If depth has a value, then it must be a decimal.
         if len(depth) > 0:
-            accumulated_msgs = validate_integer(line_no, depth, "depth", accumulated_msgs)
+            accumulated_msgs = validate_decimal(line_no, depth, "depth", accumulated_msgs)
         # Optional.
         disease_resist = items[11]
         # Optional.