From c821d24532dd69f788dfa78227b5c7dbb79338fb Mon Sep 17 00:00:00 2001
From: tcarver <tjc>
Date: Thu, 26 Jul 2012 16:44:38 +0100
Subject: [PATCH] mark obsolete and partial features

---
 .../artemis/components/FeatureList.java       | 40 +++++++++++++++++--
 1 file changed, 37 insertions(+), 3 deletions(-)

diff --git a/uk/ac/sanger/artemis/components/FeatureList.java b/uk/ac/sanger/artemis/components/FeatureList.java
index 9eca416c6..9c938f41e 100644
--- a/uk/ac/sanger/artemis/components/FeatureList.java
+++ b/uk/ac/sanger/artemis/components/FeatureList.java
@@ -763,7 +763,11 @@ public class FeatureList extends EntryGroupPanel
       {
         try
         {
-          note = feature.getValueOfQualifier("comment");
+          if(feature.getValueOfQualifier("isObsolete") != null &&
+             feature.getValueOfQualifier("isObsolete").equals("true"))
+            note = "obsolete";
+          else
+            note = feature.getValueOfQualifier("comment");
         }
         catch(InvalidRelationException e){}
       }
@@ -786,9 +790,9 @@ public class FeatureList extends EntryGroupPanel
         description_string_buffer.append(getQualifierString(feature));
     }
 
-    final String low_pos;
-    final String high_pos;
 
+    String low_pos;
+    String high_pos;
     if(low_marker == null || high_marker == null) 
     {
       low_pos  = "unknown";
@@ -807,6 +811,36 @@ public class FeatureList extends EntryGroupPanel
         high_pos = String.valueOf(low_marker.getRawPosition());
       }
     }
+    
+
+    if(isDatabaseGroup)
+    {
+      try
+      {
+        if(feature.getQualifierByName("isFminPartial") != null)
+          low_pos = "<"+low_pos;
+        if(feature.getQualifierByName("isFmaxPartial") != null)
+          high_pos = ">"+high_pos;
+      }
+      catch (InvalidRelationException e){}
+    }
+    else
+    {
+      if(feature.getLocation().isPartial(true)) // 5prime
+      {
+        if(feature.isForwardFeature()) 
+          low_pos = "<"+low_pos;
+        else
+          high_pos = ">"+high_pos;
+      }
+      if(feature.getLocation().isPartial(false)) // 3prime
+      {
+        if(feature.isForwardFeature())
+          high_pos = ">"+high_pos;
+        else
+          low_pos = "<"+low_pos;
+      }
+    }
 
     StringBuffer new_list_line = new StringBuffer();
 
-- 
GitLab