errors.append(createFileValidationError("The first data column must be 'Locustag' (not "+line[0]+")."))
errors.append(createFileValidationError("The first data column must be 'Locustag' (not "+line[0]+")."))
returnFalse
returnFalse
header_regex=re.compile("^.+-[0-9][0-9]+")
header_regex=re.compile("^(.+)-([0-9]) ([0-9]+)")
foriinrange(first_data_col,len(line)):
foriinrange(first_data_col,len(line)):
match=header_regex.match(line[i])
match=header_regex.match(line[i])
ifmatchisNone:
ifmatchisNone:
errors.append(createFileValidationError("The column header + "+str(i)+" must be of the form [STRAIN]-[BIOLOGICAL REPLICATE] [HYBRIDIZATION NUMBER]"))
errors.append(createFileValidationError("The column header + "+str(i)+" must be of the form [STRAIN]-[BIOLOGICAL REPLICATE] [HYBRIDIZATION NUMBER]. "+line[i]+" is not."))
continue
strainName=match.group(1)
ifisStrainIdValid(strainName)isFalse:
errors.append(createFileValidationError("The column header + "+str(i)+" must be of the form [STRAIN]-[BIOLOGICAL REPLICATE] [HYBRIDIZATION NUMBER]. "+strainName+" is not a recognized strain."))