JAL-629 example files from nf-core
[jalview.git] / src / jalview / bin / Commands.java
index 61ee1be..2d7f02b 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
 {
@@ -338,9 +340,6 @@ public class Commands
           Console.error("Could not open any files in headless mode");
           System.exit(1);
         }
-        // TOREMOVE COMMENT
-        // @Ben assumed this was the GUI version of above, rather then the
-        // first==false state
         else
         {
           Console.warn("No more files to open");
@@ -412,7 +411,9 @@ public class Commands
           {
             Console.warn("Could not find sequence for argument --"
                     + Arg.STRUCTURE + "=" + val);
-            break STRUCTURE;
+            // you probably want to continue here, not break
+            // break;
+            continue;
           }
           File structureFile = null;
           if (subId.content != null && subId.content.length() != 0)
@@ -454,6 +455,21 @@ public class Commands
         }
       }
     }
+
+    boolean doShading = ArgParser.getBoolean(m, Arg.TEMPFAC_SHADING);
+    if (doShading)
+    {
+      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)