From: James Procter Date: Tue, 24 Jan 2023 08:18:39 +0000 (+0000) Subject: JAL-629 hacked in --tempfac-shading - hardcoded to use existing colours in per-sequen... X-Git-Tag: Release_2_11_4_0~491 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3cea1ee2c1c9a2ad0a3b2c76bac165b1b6a3ff2a;p=jalview.git JAL-629 hacked in --tempfac-shading - hardcoded to use existing colours in per-sequence annotation --- diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 0c34a16..5f40ba6 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -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) diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java index 4e9a26d..f1e8402 100644 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -20,15 +20,6 @@ */ package jalview.gui; -import jalview.bin.Cache; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.GraphLine; -import jalview.datamodel.SequenceGroup; -import jalview.gui.JalviewColourChooser.ColourChooserListener; -import jalview.schemes.AnnotationColourGradient; -import jalview.schemes.ColourSchemeI; -import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -48,6 +39,14 @@ import javax.swing.JInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JPanel; +import jalview.bin.Cache; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.GraphLine; +import jalview.datamodel.SequenceGroup; +import jalview.gui.JalviewColourChooser.ColourChooserListener; +import jalview.schemes.AnnotationColourGradient; +import jalview.schemes.ColourSchemeI; +import jalview.util.MessageManager; import net.miginfocom.swing.MigLayout; @SuppressWarnings("serial")