JAL-629 hacked in --tempfac-shading - hardcoded to use existing colours in per-sequen...
[jalview.git] / src / jalview / bin / Commands.java
index 0c34a16..5f40ba6 100644 (file)
@@ -30,6 +30,7 @@ import jalview.io.FileFormatI;
 import jalview.io.FileLoader;
 import jalview.io.HtmlSvgOutput;
 import jalview.io.IdentifyFile;
+import jalview.schemes.AnnotationColourGradient;
 import jalview.structure.StructureImportSettings;
 import jalview.structure.StructureImportSettings.TFType;
 import jalview.structure.StructureSelectionManager;
@@ -37,6 +38,7 @@ import jalview.util.HttpUtils;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.ws.dbsources.EBIAlfaFold;
+import mc_view.PDBChain;
 
 public class Commands
 {
@@ -456,6 +458,23 @@ public class Commands
         }
       }
     }
+    String shading = ArgParser.getValue(m, Arg.TEMPFAC_SHADING);
+    if (shading != null)
+    {
+      Console.debug(
+              "Annotation colour scheme : " + shading + " (ignored value)");
+      AlignFrame af = afMap.get(id);
+      for (AlignmentAnnotation aa : af.alignPanel.getAlignment()
+              .findAnnotation(PDBChain.class.getName().toString()))
+      {
+        AnnotationColourGradient acg = new AnnotationColourGradient(aa,
+                af.alignPanel.av.getGlobalColourScheme(), 0);
+        acg.setSeqAssociated(true);
+        af.changeColour(acg);
+        Console.info("Changed colour " + acg.toString());
+      }
+
+    }
   }
 
   protected void processImages(String id)