Mercurial > repos > greg > validate_affy_metadata
diff validate_affy_metadata.py @ 23:84478b80cc47 draft
Uploaded
author | greg |
---|---|
date | Fri, 15 Feb 2019 08:57:22 -0500 |
parents | 90688364136c |
children | 8a826d1afe69 |
line wrap: on
line diff
--- a/validate_affy_metadata.py Thu Feb 14 13:28:26 2019 -0500 +++ b/validate_affy_metadata.py Fri Feb 15 08:57:22 2019 -0500 @@ -76,7 +76,7 @@ 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) != 30: + if len(items) != 32: 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. @@ -161,6 +161,14 @@ # Required and validated. healing_time = items[29] accumulated_msgs = validate_decimal(i, healing_time, accumulated_msgs) + # Optional. + dna_extraction_method = items[9] + # Optional. + dna_concentration = items[31] + # If dna_concentration has a value, then it must be decimal. + if len(dna_concentration) > 0: + accumulated_msgs = validate_decimal(i, dna_concentration, accumulated_msgs) + if len(accumulated_msgs) > 0: stop_error(accumulated_msgs)