Skip to content
Snippets Groups Projects
Commit 7016c403 authored by cramakri's avatar cramakri
Browse files

CCS-39 SP-699 : Accept 'Spot-ID' as the first column to support 2d gel proteomics data

SVN: 29348
parent 63fe0461
No related branches found
No related tags found
No related merge requests found
...@@ -5,9 +5,12 @@ def validate_data(time_series_data, errors): ...@@ -5,9 +5,12 @@ def validate_data(time_series_data, errors):
dataLines = time_series_data.getRawDataLines() dataLines = time_series_data.getRawDataLines()
lineCount = 0 lineCount = 0
for line in dataLines: for line in dataLines:
# The header needs to be GeneLocus # The fist header needs to be GeneLocus or Spot-ID
if lineCount is 0: if lineCount is 0:
if line[0] != "GeneLocus": first_col = line[0]
is_gene_locus = first_col == "GeneLocus"
is_spot_id = first_col == "Spot-ID"
if not (is_gene_locus or is_spot_id):
errors.append(createFileValidationError("The first data column must be 'GeneLocus'")) errors.append(createFileValidationError("The first data column must be 'GeneLocus'"))
break break
lineCount = lineCount + 1 lineCount = lineCount + 1
...@@ -23,10 +26,11 @@ def validate_data(time_series_data, errors): ...@@ -23,10 +26,11 @@ def validate_data(time_series_data, errors):
continue continue
# The compound id should be one of these forms # The compound id should be one of these forms
gene_locus = line[0] if is_gene_locus:
if not gene_locus_regex.match(gene_locus): gene_locus = line[0]
errors.append(createFileValidationError("Line " + str(lineCount + 1) + ", column 1 must be of the format 'BSU#', 'BSU_misc_RNA_#', 'VMG_#_#', or 'VMG_#_#_c' (instead of " + gene_locus + ").")) if not gene_locus_regex.match(gene_locus):
lineCount = lineCount + 1 errors.append(createFileValidationError("Line " + str(lineCount + 1) + ", column 1 must be of the format 'BSU#', 'BSU_misc_RNA_#', 'VMG_#_#', or 'VMG_#_#_c' (instead of " + gene_locus + ")."))
lineCount = lineCount + 1
def validate_metadata(time_series_data, errors): def validate_metadata(time_series_data, errors):
metadata = time_series_data.getMetadataMap() metadata = time_series_data.getMetadataMap()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment