# HG changeset patch # User greg # Date 1568983353 14400 # Node ID 7f95329251f02d7be35e4f4661a3b9e6cf7d2ede # Parent 72e79ed7ca41b6884718ba893c9c1d519c6ad54f Uploaded diff -r 72e79ed7ca41 -r 7f95329251f0 validate_affy_metadata.py --- 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.