X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fvarna%2FVarnaCommands.java;fp=src%2Fjalview%2Fext%2Fvarna%2FVarnaCommands.java;h=d65f1d585b6b40637daf47b70a34344fa318db6a;hb=d5bcc3830eab04e6db816e1c2ad8fce1dc189612;hp=a41e10e9f3305736887e1f0295f464d52e51d5fb;hpb=3ebdd4e28382e38a181aae1eed71549f603f9025;p=jalview.git diff --git a/src/jalview/ext/varna/VarnaCommands.java b/src/jalview/ext/varna/VarnaCommands.java index a41e10e..d65f1d5 100644 --- a/src/jalview/ext/varna/VarnaCommands.java +++ b/src/jalview/ext/varna/VarnaCommands.java @@ -20,10 +20,10 @@ */ package jalview.ext.varna; -import jalview.api.FeatureRenderer; import jalview.api.SequenceRenderer; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; +import jalview.renderer.seqfeatures.FeatureColourFinder; import jalview.structure.StructureMapping; import jalview.structure.StructureSelectionManager; @@ -47,7 +47,8 @@ public class VarnaCommands */ public static String[] getColourBySequenceCommand( StructureSelectionManager ssm, String[] files, - SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr, + SequenceI[][] sequence, SequenceRenderer sr, + FeatureColourFinder finder, AlignmentI alignment) { ArrayList str = new ArrayList(); @@ -58,7 +59,9 @@ public class VarnaCommands StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]); if (mapping == null || mapping.length < 1) + { continue; + } int lastPos = -1; for (int s = 0; s < sequence[pdbfnum].length; s++) @@ -79,14 +82,15 @@ public class VarnaCommands int pos = mapping[m].getPDBResNum(asp.findPosition(r)); if (pos < 1 || pos == lastPos) + { continue; + } lastPos = pos; - Color col = sr.getResidueBoxColour(sequence[pdbfnum][s], r); + Color col = sr.getResidueColour(sequence[pdbfnum][s], r, + finder); - if (fr != null) - col = fr.findFeatureColour(col, sequence[pdbfnum][s], r); String newSelcom = (mapping[m].getChain() != " " ? ":" + mapping[m].getChain() : "") + "/"