JAL-3187 (hacked up) show complement features on structure/Overview
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 21 Jan 2019 11:47:49 +0000 (11:47 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 21 Jan 2019 11:47:49 +0000 (11:47 +0000)
18 files changed:
src/jalview/analysis/AlignmentUtils.java
src/jalview/analysis/scoremodels/FeatureDistanceModel.java
src/jalview/api/FeatureRenderer.java
src/jalview/datamodel/AlignedCodonFrame.java
src/jalview/gui/CrossRefAction.java
src/jalview/gui/FeatureRenderer.java
src/jalview/gui/Jalview2XML.java
src/jalview/gui/JalviewChimeraBindingModel.java
src/jalview/gui/OverviewCanvas.java
src/jalview/gui/SeqPanel.java
src/jalview/project/Jalview2XML.java
src/jalview/renderer/seqfeatures/FeatureColourFinder.java
src/jalview/renderer/seqfeatures/FeatureRenderer.java
src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java
test/jalview/gui/FeatureSettingsTest.java
test/jalview/io/Jalview2xmlTests.java
test/jalview/project/Jalview2xmlTests.java
test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java

index d1217bf..7a082be 100644 (file)
@@ -1104,7 +1104,7 @@ public class AlignmentUtils
         SequenceI prot = mapping.findAlignedSequence(dnaSeq, protein);
         if (prot != null)
         {
-          Mapping seqMap = mapping.getMappingForSequence(dnaSeq);
+          Mapping seqMap = mapping.getMappingForSequence(dnaSeq, false);
           addCodonPositions(dnaSeq, prot, protein.getGapCharacter(), seqMap,
                   alignedCodons);
           unmappedProtein.remove(prot);
index e506be2..bfecd65 100644 (file)
@@ -188,7 +188,7 @@ public class FeatureDistanceModel extends DistanceScoreModel
   protected Map<SeqCigar, Set<String>> findFeatureTypesAtColumn(
           SeqCigar[] seqs, int columnPosition)
   {
-    Map<SeqCigar, Set<String>> sfap = new HashMap<SeqCigar, Set<String>>();
+    Map<SeqCigar, Set<String>> sfap = new HashMap<>();
     for (SeqCigar seq : seqs)
     {
       int spos = seq.findPosition(columnPosition);
@@ -197,9 +197,9 @@ public class FeatureDistanceModel extends DistanceScoreModel
         /*
          * position is not a gap
          */
-        Set<String> types = new HashSet<String>();
+        Set<String> types = new HashSet<>();
         List<SequenceFeature> sfs = fr.findFeaturesAtResidue(
-                seq.getRefSeq(), spos);
+                seq.getRefSeq(), spos, spos);
         for (SequenceFeature sf : sfs)
         {
           types.add(sf.getType());
index 868f196..861f337 100644 (file)
@@ -161,15 +161,16 @@ public interface FeatureRenderer
   List<SequenceFeature> findFeaturesAtColumn(SequenceI sequence, int column);
 
   /**
-   * Returns features at the specified residue position on the given sequence.
+   * Returns features at the specified residue positions on the given sequence.
    * Non-positional features are not included.
    * 
    * @param sequence
-   * @param resNo
-   *          residue position (start..)
+   * @param fromResNo
+   * @param toResNo
    * @return
    */
-  List<SequenceFeature> findFeaturesAtResidue(SequenceI sequence, int resNo);
+  List<SequenceFeature> findFeaturesAtResidue(SequenceI sequence,
+          int fromResNo, int toResNo);
 
   /**
    * get current displayed types, in ordering of rendering (on top last)
index ec11fc1..26f6e2a 100644 (file)
@@ -116,7 +116,7 @@ public class AlignedCodonFrame
    */
   public AlignedCodonFrame()
   {
-    mappings = new ArrayList<SequenceToSequenceMapping>();
+    mappings = new ArrayList<>();
   }
 
   /**
@@ -179,7 +179,7 @@ public class AlignedCodonFrame
   {
     // TODO return a list instead?
     // return dnaSeqs;
-    List<SequenceI> seqs = new ArrayList<SequenceI>();
+    List<SequenceI> seqs = new ArrayList<>();
     for (SequenceToSequenceMapping ssm : mappings)
     {
       seqs.add(ssm.fromSeq);
@@ -190,7 +190,7 @@ public class AlignedCodonFrame
   public SequenceI[] getAaSeqs()
   {
     // TODO not used - remove?
-    List<SequenceI> seqs = new ArrayList<SequenceI>();
+    List<SequenceI> seqs = new ArrayList<>();
     for (SequenceToSequenceMapping ssm : mappings)
     {
       seqs.add(ssm.mapping.to);
@@ -200,7 +200,7 @@ public class AlignedCodonFrame
 
   public MapList[] getdnaToProt()
   {
-    List<MapList> maps = new ArrayList<MapList>();
+    List<MapList> maps = new ArrayList<>();
     for (SequenceToSequenceMapping ssm : mappings)
     {
       maps.add(ssm.mapping.map);
@@ -210,7 +210,7 @@ public class AlignedCodonFrame
 
   public Mapping[] getProtMappings()
   {
-    List<Mapping> maps = new ArrayList<Mapping>();
+    List<Mapping> maps = new ArrayList<>();
     for (SequenceToSequenceMapping ssm : mappings)
     {
       maps.add(ssm.mapping);
@@ -225,7 +225,7 @@ public class AlignedCodonFrame
    * @param seq
    * @return
    */
-  public Mapping getMappingForSequence(SequenceI seq)
+  public Mapping getMappingForSequence(SequenceI seq, boolean cdsOnly)
   {
     SequenceI seqDs = seq.getDatasetSequence();
     seqDs = seqDs != null ? seqDs : seq;
@@ -234,7 +234,11 @@ public class AlignedCodonFrame
     {
       if (ssm.fromSeq == seqDs || ssm.mapping.to == seqDs)
       {
-        return ssm.mapping;
+        if (!cdsOnly || ssm.fromSeq.getName().startsWith("CDS")
+                || ssm.mapping.to.getName().startsWith("CDS"))
+        {
+          return ssm.mapping;
+        }
       }
     }
     return null;
@@ -485,7 +489,7 @@ public class AlignedCodonFrame
   {
     MapList ml = null;
     SequenceI dnaSeq = null;
-    List<char[]> result = new ArrayList<char[]>();
+    List<char[]> result = new ArrayList<>();
 
     for (SequenceToSequenceMapping ssm : mappings)
     {
@@ -524,8 +528,8 @@ public class AlignedCodonFrame
    */
   public List<Mapping> getMappingsFromSequence(SequenceI seq)
   {
-    List<Mapping> result = new ArrayList<Mapping>();
-    List<SequenceI> related = new ArrayList<SequenceI>();
+    List<Mapping> result = new ArrayList<>();
+    List<SequenceI> related = new ArrayList<>();
     SequenceI seqDs = seq.getDatasetSequence();
     seqDs = seqDs != null ? seqDs : seq;
 
index 85f2498..37f11df 100644 (file)
@@ -39,6 +39,7 @@ import jalview.util.DBRefUtils;
 import jalview.util.MapList;
 import jalview.util.MappingUtils;
 import jalview.util.MessageManager;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 import jalview.ws.SequenceFetcher;
 
 import java.util.ArrayList;
@@ -170,17 +171,17 @@ public class CrossRefAction implements Runnable
               .isShowSequenceFeatures();
       newFrame.setShowSeqFeatures(showSequenceFeatures);
       copyThis.setShowSeqFeatures(showSequenceFeatures);
-      FeatureRenderer myFeatureStyling = alignFrame.alignPanel
+      FeatureRendererModel myFeatureStyling = alignFrame.alignPanel
               .getSeqPanel().seqCanvas.getFeatureRenderer();
 
       /*
        * copy feature rendering settings to split frame
        */
-      FeatureRenderer fr1 = newFrame.alignPanel.getSeqPanel().seqCanvas
+      FeatureRendererModel fr1 = newFrame.alignPanel.getSeqPanel().seqCanvas
               .getFeatureRenderer();
       fr1.transferSettings(myFeatureStyling);
       fr1.findAllFeatures(true);
-      FeatureRenderer fr2 = copyThis.alignPanel.getSeqPanel().seqCanvas
+      FeatureRendererModel fr2 = copyThis.alignPanel.getSeqPanel().seqCanvas
               .getFeatureRenderer();
       fr2.transferSettings(myFeatureStyling);
       fr2.findAllFeatures(true);
index c2a84c6..46f574e 100644 (file)
@@ -21,9 +21,6 @@
 package jalview.gui;
 
 import jalview.api.FeatureColourI;
-import jalview.datamodel.AlignedCodonFrame;
-import jalview.datamodel.Mapping;
-import jalview.datamodel.SearchResultMatchI;
 import jalview.datamodel.SearchResults;
 import jalview.datamodel.SearchResultsI;
 import jalview.datamodel.SequenceFeature;
@@ -577,49 +574,4 @@ public class FeatureRenderer
   {
     Arrays.sort(renderOrder, order);
   }
-
-  /**
-   * Answers a (possibly empty) list of features in this alignment at a position
-   * (or range) which is mappable from the given sequence residue position in a
-   * mapped alignment.
-   * 
-   * @param sequence
-   * @param pos
-   * @return
-   */
-  public List<SequenceFeature> findComplementFeaturesAtResidue(
-          SequenceI sequence, int pos)
-  {
-    SequenceI ds = sequence.getDatasetSequence();
-    List<SequenceFeature> result = new ArrayList<>();
-    List<AlignedCodonFrame> mappings = this.av.getAlignment()
-            .getCodonFrame(sequence);
-    for (AlignedCodonFrame acf : mappings)
-    {
-      Mapping mapping = acf.getMappingForSequence(sequence);
-      if (mapping.getMap().getFromRatio() == mapping.getMap().getToRatio())
-      {
-        continue; // we are only looking for 3:1 or 1:3 mappings
-      }
-      SearchResultsI sr = new SearchResults();
-      acf.markMappedRegion(ds, pos, sr);
-      for (SearchResultMatchI match : sr.getResults())
-      {
-        for (int i = match.getStart(); i <= match.getEnd(); i++)
-        {
-          List<SequenceFeature> fs = findFeaturesAtResidue(
-                  match.getSequence(), i);
-          for (SequenceFeature sf : fs)
-          {
-            if (!result.contains(sf))
-            {
-              result.addAll(fs);
-            }
-          }
-        }
-      }
-    }
-    
-    return result;
-  }
 }
index 7f07a20..ceec19d 100644 (file)
@@ -127,6 +127,7 @@ import jalview.util.matcher.Condition;
 import jalview.viewmodel.AlignmentViewport;
 import jalview.viewmodel.PCAModel;
 import jalview.viewmodel.ViewportRanges;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 import jalview.viewmodel.seqfeatures.FeatureRendererSettings;
 import jalview.viewmodel.seqfeatures.FeaturesDisplayed;
 import jalview.ws.jws2.Jws2Discoverer;
@@ -1395,7 +1396,7 @@ public class Jalview2XML
       {
         jalview.schemabinding.version2.FeatureSettings fs = new jalview.schemabinding.version2.FeatureSettings();
 
-        FeatureRenderer fr = ap.getSeqPanel().seqCanvas
+        FeatureRendererModel fr = ap.getSeqPanel().seqCanvas
                 .getFeatureRenderer();
         String[] renderOrder = fr.getRenderOrder().toArray(new String[0]);
 
@@ -4867,7 +4868,7 @@ public class Jalview2XML
     // recover feature settings
     if (jms.getFeatureSettings() != null)
     {
-      FeatureRenderer fr = af.alignPanel.getSeqPanel().seqCanvas
+      FeatureRendererModel fr = af.alignPanel.getSeqPanel().seqCanvas
               .getFeatureRenderer();
       FeaturesDisplayed fdi;
       af.viewport.setFeaturesDisplayed(fdi = new FeaturesDisplayed());
index 2f11c30..9d63c6a 100644 (file)
@@ -27,6 +27,7 @@ import jalview.datamodel.SequenceI;
 import jalview.ext.rbvi.chimera.JalviewChimeraBinding;
 import jalview.io.DataSourceType;
 import jalview.structure.StructureSelectionManager;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 
 import javax.swing.SwingUtilities;
 
@@ -43,7 +44,7 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding
   }
 
   @Override
-  public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
+  public FeatureRendererModel getFeatureRenderer(AlignmentViewPanel alignment)
   {
     AlignmentPanel ap = (alignment == null) ? cvf.getAlignmentPanel()
             : (AlignmentPanel) alignment;
index 89088b8..0f49381 100644 (file)
@@ -25,6 +25,7 @@ import jalview.bin.Cache;
 import jalview.renderer.OverviewRenderer;
 import jalview.renderer.OverviewResColourFinder;
 import jalview.viewmodel.OverviewDimensions;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 
 import java.awt.Color;
 import java.awt.Dimension;
@@ -132,7 +133,7 @@ public class OverviewCanvas extends JComponent
    *          the renderer to transfer feature colouring from
    */
   public void draw(boolean showSequenceFeatures, boolean showAnnotation,
-          FeatureRenderer transferRenderer)
+          FeatureRendererModel transferRenderer)
   {
     miniMe = null;
 
index 6feda5a..cf0991e 100644 (file)
@@ -48,6 +48,7 @@ import jalview.util.MappingUtils;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.viewmodel.AlignmentViewport;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
@@ -859,7 +860,7 @@ public class SeqPanel extends JPanel
           AlignViewportI complement = ap.getAlignViewport()
                   .getCodingComplement();
           AlignFrame af = Desktop.getAlignFrameFor(complement);
-          FeatureRenderer fr2 = af.getFeatureRenderer();
+          FeatureRendererModel fr2 = af.getFeatureRenderer();
           features = fr2.findComplementFeaturesAtResidue(sequence, pos);
           seqARep.appendFeatures(tooltipText, pos, features, fr2);
         }
index 74b6bf0..3efc009 100644 (file)
@@ -58,7 +58,6 @@ import jalview.gui.AlignmentPanel;
 import jalview.gui.AppVarna;
 import jalview.gui.ChimeraViewFrame;
 import jalview.gui.Desktop;
-import jalview.gui.FeatureRenderer;
 import jalview.gui.Jalview2XML_V1;
 import jalview.gui.JvOptionPane;
 import jalview.gui.OOMWarning;
@@ -92,6 +91,7 @@ import jalview.util.matcher.Condition;
 import jalview.viewmodel.AlignmentViewport;
 import jalview.viewmodel.PCAModel;
 import jalview.viewmodel.ViewportRanges;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 import jalview.viewmodel.seqfeatures.FeatureRendererSettings;
 import jalview.viewmodel.seqfeatures.FeaturesDisplayed;
 import jalview.ws.jws2.Jws2Discoverer;
@@ -1488,7 +1488,7 @@ public class Jalview2XML
       {
         FeatureSettings fs = new FeatureSettings();
 
-        FeatureRenderer fr = ap.getSeqPanel().seqCanvas
+        FeatureRendererModel fr = ap.getSeqPanel().seqCanvas
                 .getFeatureRenderer();
         String[] renderOrder = fr.getRenderOrder().toArray(new String[0]);
 
@@ -5007,7 +5007,7 @@ public class Jalview2XML
     // recover feature settings
     if (jm.getFeatureSettings() != null)
     {
-      FeatureRenderer fr = af.alignPanel.getSeqPanel().seqCanvas
+      FeatureRendererModel fr = af.alignPanel.getSeqPanel().seqCanvas
               .getFeatureRenderer();
       FeaturesDisplayed fdi;
       viewport.setFeaturesDisplayed(fdi = new FeaturesDisplayed());
index cfe2735..52090e1 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.renderer.seqfeatures;
 
+import jalview.api.AlignViewportI;
 import jalview.api.FeatureRenderer;
 import jalview.api.FeaturesDisplayedI;
 import jalview.datamodel.SequenceI;
@@ -122,8 +123,12 @@ public class FeatureColourFinder
    */
   boolean noFeaturesDisplayed()
   {
-    if (featureRenderer == null
-            || !featureRenderer.getViewport().isShowSequenceFeatures())
+    AlignViewportI av = featureRenderer.getViewport();
+    if (av.isShowComplementFeatures())
+    {
+      return false;
+    }
+    if (featureRenderer == null || !av.isShowSequenceFeatures())
     {
       return true;
     }
index 795cd36..fc8731d 100644 (file)
@@ -25,6 +25,8 @@ import jalview.api.FeatureColourI;
 import jalview.datamodel.Range;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
 import jalview.util.Comparison;
 import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 
@@ -441,6 +443,30 @@ public class FeatureRenderer extends FeatureRendererModel
     updateFeatures();
 
     /*
+     * show complement features on top (if configured to show them)
+     */
+    if (av.isShowComplementFeatures())
+    {
+      AlignViewportI complement = av.getCodingComplement();
+      AlignFrame af = Desktop.getAlignFrameFor(complement);
+      FeatureRendererModel fr2 = af.getFeatureRenderer();
+      List<SequenceFeature> features = fr2.findComplementFeaturesAtResidue(
+              seq, seq.findPosition(column));
+      // todo: ensure ordered by feature render order
+      for (SequenceFeature sf : features)
+      {
+        if (!fr2.featureGroupNotShown(sf))
+        {
+          Color col = fr2.getColour(sf);
+          if (col != null)
+          {
+            return col;
+          }
+        }
+      }
+    }
+
+    /*
      * inspect features in reverse renderOrder (the last in the array is 
      * displayed on top) until we find one that is rendered at the position
      */
index 1f69776..821f7f4 100644 (file)
@@ -23,7 +23,12 @@ package jalview.viewmodel.seqfeatures;
 import jalview.api.AlignViewportI;
 import jalview.api.FeatureColourI;
 import jalview.api.FeaturesDisplayedI;
+import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Mapping;
+import jalview.datamodel.SearchResultMatchI;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.SearchResultsI;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.datamodel.features.FeatureMatcherSetI;
@@ -983,7 +988,7 @@ public abstract class FeatureRendererModel
    * @param sequenceFeature
    * @return
    */
-  protected boolean featureGroupNotShown(final SequenceFeature sequenceFeature)
+  public boolean featureGroupNotShown(final SequenceFeature sequenceFeature)
   {
     return featureGroups != null
             && sequenceFeature.featureGroup != null
@@ -998,7 +1003,7 @@ public abstract class FeatureRendererModel
    */
   @Override
   public List<SequenceFeature> findFeaturesAtResidue(SequenceI sequence,
-          int resNo)
+          int fromResNo, int toResNo)
   {
     List<SequenceFeature> result = new ArrayList<>();
     if (!av.areFeaturesDisplayed() || getFeaturesDisplayed() == null)
@@ -1016,7 +1021,7 @@ public abstract class FeatureRendererModel
     String[] visibleTypes = visibleFeatures
             .toArray(new String[visibleFeatures.size()]);
     List<SequenceFeature> features = sequence.getFeatures().findFeatures(
-            resNo, resNo, visibleTypes);
+            fromResNo, toResNo, visibleTypes);
   
     for (SequenceFeature sf : features)
     {
@@ -1150,4 +1155,53 @@ public abstract class FeatureRendererModel
     return filter == null ? true : filter.matches(sf);
   }
 
+  /**
+   * Answers a (possibly empty) list of features in this alignment at a position
+   * (or range) which is mappable from the given sequence residue position in a
+   * mapped alignment.
+   * 
+   * @param sequence
+   * @param pos
+   * @return
+   */
+  public List<SequenceFeature> findComplementFeaturesAtResidue(SequenceI sequence, int pos)
+  {
+    SequenceI ds = sequence.getDatasetSequence();
+    List<SequenceFeature> result = new ArrayList<>();
+    List<AlignedCodonFrame> mappings = this.av.getAlignment()
+            .getCodonFrame(sequence);
+
+    /*
+     * todo: direct lookup of CDS for peptide and vice-versa; for now,
+     * have to search through an unordered list of mappings for a candidate
+     */
+    for (AlignedCodonFrame acf : mappings)
+    {
+      Mapping mapping = acf.getMappingForSequence(sequence, true);
+      if (mapping == null || mapping.getMap().getFromRatio() == mapping
+              .getMap().getToRatio())
+      {
+        continue; // we are only looking for 3:1 or 1:3 mappings
+      }
+      SearchResultsI sr = new SearchResults();
+      acf.markMappedRegion(ds, pos, sr);
+      for (SearchResultMatchI match : sr.getResults())
+      {
+        int fromRes = match.getStart();
+        int toRes = match.getEnd();
+        List<SequenceFeature> fs = findFeaturesAtResidue(
+                match.getSequence(), fromRes, toRes);
+        for (SequenceFeature sf : fs)
+        {
+          if (!result.contains(sf))
+          {
+            result.add(sf);
+          }
+        }
+      }
+    }
+    
+    return result;
+  }
+
 }
index 6ddebf8..195ca87 100644 (file)
@@ -14,6 +14,7 @@ import jalview.io.DataSourceType;
 import jalview.io.FileLoader;
 import jalview.schemes.FeatureColour;
 import jalview.util.matcher.Condition;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 
 import java.awt.Color;
 import java.io.File;
@@ -49,7 +50,7 @@ public class FeatureSettingsTest
     /*
      * set colour schemes for features
      */
-    FeatureRenderer fr = af.getFeatureRenderer();
+    FeatureRendererModel fr = af.getFeatureRenderer();
 
     // type1: red
     fr.setColour("type1", new FeatureColour(Color.red));
index 3baacc8..30b6739 100644 (file)
@@ -53,7 +53,6 @@ import jalview.gui.AlignViewport;
 import jalview.gui.AlignmentPanel;
 import jalview.gui.CalculationChooser;
 import jalview.gui.Desktop;
-import jalview.gui.FeatureRenderer;
 import jalview.gui.Jalview2XML;
 import jalview.gui.JvOptionPane;
 import jalview.gui.PCAPanel;
@@ -75,6 +74,7 @@ import jalview.structure.StructureImportSettings;
 import jalview.util.matcher.Condition;
 import jalview.viewmodel.AlignmentViewport;
 import jalview.viewmodel.PCAModel;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 
 import java.awt.Color;
 import java.io.File;
@@ -929,7 +929,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     /*
      * set colour schemes for features
      */
-    FeatureRenderer fr = af.getFeatureRenderer();
+    FeatureRendererModel fr = af.getFeatureRenderer();
     fr.findAllFeatures(true);
 
     // type1: red
index 3f4ed71..1785d4a 100644 (file)
@@ -48,7 +48,6 @@ import jalview.gui.AlignFrame;
 import jalview.gui.AlignViewport;
 import jalview.gui.AlignmentPanel;
 import jalview.gui.Desktop;
-import jalview.gui.FeatureRenderer;
 import jalview.gui.JvOptionPane;
 import jalview.gui.PCAPanel;
 import jalview.gui.PopupMenu;
@@ -70,6 +69,7 @@ import jalview.schemes.TCoffeeColourScheme;
 import jalview.structure.StructureImportSettings;
 import jalview.util.matcher.Condition;
 import jalview.viewmodel.AlignmentViewport;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 
 import java.awt.Color;
 import java.io.File;
@@ -909,7 +909,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     /*
      * set colour schemes for features
      */
-    FeatureRenderer fr = af.getFeatureRenderer();
+    FeatureRendererModel fr = af.getFeatureRenderer();
     fr.findAllFeatures(true);
 
     // type1: red
index d8b905e..6fe48c4 100644 (file)
@@ -11,10 +11,10 @@ import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.gui.AlignViewport;
-import jalview.gui.FeatureRenderer;
 import jalview.io.DataSourceType;
 import jalview.io.FileLoader;
 import jalview.schemes.FeatureColour;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
 import jalview.viewmodel.seqfeatures.FeatureRendererModel.FeatureSettingsBean;
 
 import java.awt.Color;
@@ -51,7 +51,7 @@ public class FeatureColourFinderTest
 
   private AlignFrame af;
 
-  private FeatureRenderer fr;
+  private FeatureRendererModel fr;
 
   @BeforeTest(alwaysRun = true)
   public void setUp()