From: gmungoc Date: Mon, 21 Jan 2019 11:47:49 +0000 (+0000) Subject: JAL-3187 (hacked up) show complement features on structure/Overview X-Git-Tag: Release_2_11_1_0~75 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3740241b6d0dfa109dc81847afe58f17497c39e8;p=jalview.git JAL-3187 (hacked up) show complement features on structure/Overview --- diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index d1217bf..7a082be 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -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); diff --git a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java index e506be2..bfecd65 100644 --- a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java +++ b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java @@ -188,7 +188,7 @@ public class FeatureDistanceModel extends DistanceScoreModel protected Map> findFeatureTypesAtColumn( SeqCigar[] seqs, int columnPosition) { - Map> sfap = new HashMap>(); + Map> 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 types = new HashSet(); + Set types = new HashSet<>(); List sfs = fr.findFeaturesAtResidue( - seq.getRefSeq(), spos); + seq.getRefSeq(), spos, spos); for (SequenceFeature sf : sfs) { types.add(sf.getType()); diff --git a/src/jalview/api/FeatureRenderer.java b/src/jalview/api/FeatureRenderer.java index 868f196..861f337 100644 --- a/src/jalview/api/FeatureRenderer.java +++ b/src/jalview/api/FeatureRenderer.java @@ -161,15 +161,16 @@ public interface FeatureRenderer List 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 findFeaturesAtResidue(SequenceI sequence, int resNo); + List findFeaturesAtResidue(SequenceI sequence, + int fromResNo, int toResNo); /** * get current displayed types, in ordering of rendering (on top last) diff --git a/src/jalview/datamodel/AlignedCodonFrame.java b/src/jalview/datamodel/AlignedCodonFrame.java index ec11fc1..26f6e2a 100644 --- a/src/jalview/datamodel/AlignedCodonFrame.java +++ b/src/jalview/datamodel/AlignedCodonFrame.java @@ -116,7 +116,7 @@ public class AlignedCodonFrame */ public AlignedCodonFrame() { - mappings = new ArrayList(); + mappings = new ArrayList<>(); } /** @@ -179,7 +179,7 @@ public class AlignedCodonFrame { // TODO return a list instead? // return dnaSeqs; - List seqs = new ArrayList(); + List 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 seqs = new ArrayList(); + List seqs = new ArrayList<>(); for (SequenceToSequenceMapping ssm : mappings) { seqs.add(ssm.mapping.to); @@ -200,7 +200,7 @@ public class AlignedCodonFrame public MapList[] getdnaToProt() { - List maps = new ArrayList(); + List maps = new ArrayList<>(); for (SequenceToSequenceMapping ssm : mappings) { maps.add(ssm.mapping.map); @@ -210,7 +210,7 @@ public class AlignedCodonFrame public Mapping[] getProtMappings() { - List maps = new ArrayList(); + List 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 result = new ArrayList(); + List result = new ArrayList<>(); for (SequenceToSequenceMapping ssm : mappings) { @@ -524,8 +528,8 @@ public class AlignedCodonFrame */ public List getMappingsFromSequence(SequenceI seq) { - List result = new ArrayList(); - List related = new ArrayList(); + List result = new ArrayList<>(); + List related = new ArrayList<>(); SequenceI seqDs = seq.getDatasetSequence(); seqDs = seqDs != null ? seqDs : seq; diff --git a/src/jalview/gui/CrossRefAction.java b/src/jalview/gui/CrossRefAction.java index 85f2498..37f11df 100644 --- a/src/jalview/gui/CrossRefAction.java +++ b/src/jalview/gui/CrossRefAction.java @@ -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); diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java index c2a84c6..46f574e 100644 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -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 findComplementFeaturesAtResidue( - SequenceI sequence, int pos) - { - SequenceI ds = sequence.getDatasetSequence(); - List result = new ArrayList<>(); - List 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 fs = findFeaturesAtResidue( - match.getSequence(), i); - for (SequenceFeature sf : fs) - { - if (!result.contains(sf)) - { - result.addAll(fs); - } - } - } - } - } - - return result; - } } diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 7f07a20..ceec19d 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -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()); diff --git a/src/jalview/gui/JalviewChimeraBindingModel.java b/src/jalview/gui/JalviewChimeraBindingModel.java index 2f11c30..9d63c6a 100644 --- a/src/jalview/gui/JalviewChimeraBindingModel.java +++ b/src/jalview/gui/JalviewChimeraBindingModel.java @@ -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; diff --git a/src/jalview/gui/OverviewCanvas.java b/src/jalview/gui/OverviewCanvas.java index 89088b8d..0f49381 100644 --- a/src/jalview/gui/OverviewCanvas.java +++ b/src/jalview/gui/OverviewCanvas.java @@ -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; diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 6feda5a..cf0991e 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -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); } diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index 74b6bf0..3efc009 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -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()); diff --git a/src/jalview/renderer/seqfeatures/FeatureColourFinder.java b/src/jalview/renderer/seqfeatures/FeatureColourFinder.java index cfe2735..52090e1 100644 --- a/src/jalview/renderer/seqfeatures/FeatureColourFinder.java +++ b/src/jalview/renderer/seqfeatures/FeatureColourFinder.java @@ -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; } diff --git a/src/jalview/renderer/seqfeatures/FeatureRenderer.java b/src/jalview/renderer/seqfeatures/FeatureRenderer.java index 795cd36..fc8731d 100644 --- a/src/jalview/renderer/seqfeatures/FeatureRenderer.java +++ b/src/jalview/renderer/seqfeatures/FeatureRenderer.java @@ -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 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 */ diff --git a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java index 1f69776..821f7f4 100644 --- a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java +++ b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java @@ -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 findFeaturesAtResidue(SequenceI sequence, - int resNo) + int fromResNo, int toResNo) { List 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 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 findComplementFeaturesAtResidue(SequenceI sequence, int pos) + { + SequenceI ds = sequence.getDatasetSequence(); + List result = new ArrayList<>(); + List 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 fs = findFeaturesAtResidue( + match.getSequence(), fromRes, toRes); + for (SequenceFeature sf : fs) + { + if (!result.contains(sf)) + { + result.add(sf); + } + } + } + } + + return result; + } + } diff --git a/test/jalview/gui/FeatureSettingsTest.java b/test/jalview/gui/FeatureSettingsTest.java index 6ddebf8..195ca87 100644 --- a/test/jalview/gui/FeatureSettingsTest.java +++ b/test/jalview/gui/FeatureSettingsTest.java @@ -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)); diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 3baacc8..30b6739 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -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 diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index 3f4ed71..1785d4a 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -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 diff --git a/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java b/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java index d8b905e..6fe48c4 100644 --- a/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java +++ b/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java @@ -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()