From 6f3bb49c0b32d4593d20db78bd5a1edea0b864de Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Fri, 22 May 2015 14:24:45 +0000
Subject: [PATCH] SSDM-1922: CORE - YEASTLAB: Delete repeated annotations

SVN: 34028
---
 .../1/dss/drop-boxes/stellingconsistency/consistency.py   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/plasmid/source/core-plugins/stellingmigration/1/dss/drop-boxes/stellingconsistency/consistency.py b/plasmid/source/core-plugins/stellingmigration/1/dss/drop-boxes/stellingconsistency/consistency.py
index 54f7eab8754..81827ef3a74 100644
--- a/plasmid/source/core-plugins/stellingmigration/1/dss/drop-boxes/stellingconsistency/consistency.py
+++ b/plasmid/source/core-plugins/stellingmigration/1/dss/drop-boxes/stellingconsistency/consistency.py
@@ -103,6 +103,8 @@ def verify(tr, sample):
     requiredAnnotationsFromParents = getRequiredAnnotationsFromParents(sample) #To detect case 5
     if annotationsRoot is not None:
         for annotation in annotationsRoot:
+            if getValueOrNull(annotation.attrib, "PLASMID_RELATIONSHIP") == "LOT": #Skip auto generated
+                continue;
             annotatedSampleIdentifier = annotation.attrib["identifier"] #Identifier from annotated sample
             requiredAnnotationsFound[annotatedSampleIdentifier] = True
             requiredAnnotationsFromParents[annotatedSampleIdentifier] = True
@@ -150,9 +152,9 @@ def verify(tr, sample):
         logManualFix("Case 5 - Missing Parents present in Contained: ", sample.getSample().getRegistrator().getUserId(), sample.getSampleIdentifier(), str(lostParents), "?", "?")
         newAnnotationsReady = False
     #5 Check repeated parents in annotations
-    if areAnnotationDuplicated(sample):
-        logManualFix("Case 6 - Same annotation coming from different parents: ", sample.getSample().getRegistrator().getUserId(), sample.getSampleIdentifier(), "?", "?", "?")
-        newAnnotationsReady = False
+#     if areAnnotationDuplicated(sample):
+#         logManualFix("Case 6 - Same annotation coming from different parents: ", sample.getSample().getRegistrator().getUserId(), sample.getSampleIdentifier(), "?", "?", "?")
+#         newAnnotationsReady = False
     global UPDATES_ENABLED;
     if newAnnotationsReady and UPDATES_ENABLED:
         global numberOfCanBeUpdated;
-- 
GitLab