From 6ae98f0859554e2718aa8b4f57e352b73b85691a Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Tue, 10 Jul 2012 11:38:28 +0000
Subject: [PATCH] MINOR : Make an exception to the validation for JJS-MGP254.
 It is not in the UChicago database, but many people want to upload data for
 it.

SVN: 26053
---
 eu_basynthec/dist/etc/shared/shared-classes.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eu_basynthec/dist/etc/shared/shared-classes.py b/eu_basynthec/dist/etc/shared/shared-classes.py
index b502be6edf4..054c4992814 100644
--- a/eu_basynthec/dist/etc/shared/shared-classes.py
+++ b/eu_basynthec/dist/etc/shared/shared-classes.py
@@ -142,7 +142,7 @@ class ValidationHelper:
 #
 # Strain validation stuff
 #
-strainIdRegex = re.compile("^ms|chassis\s*[1-3]|wt 168 trp\+")
+strainIdRegexMin = re.compile("^ms|chassis\s*[1-3]|wt 168 trp\+|jjs-mgp254")
 strainIdRegexFull = re.compile("^jjs-mgp[0-9]{1,3}|^jjs-din[0-9]{1,3}|^ms|chassis\s*[1-3]|wt 168 trp\+")
 strainIds = {}
 home_dir = os.environ.get('HOME', '')
@@ -160,7 +160,7 @@ def isStrainIdValid(strainId):
   """Return true if the strain id passes validation (has the form specified in the regex and is in Chris' strain db)"""
   strainIdLower = strainId.lower()
   if len(strainIds) > 0:
-    return strainIds.has_key(strainIdLower) or _match(strainIdRegex, strainIdLower)
+    return strainIds.has_key(strainIdLower) or _match(strainIdRegexMin, strainIdLower)
   else:
     return _match(strainIdRegexFull, strainIdLower)
   
-- 
GitLab