</tr>
<tr valign="top">
- <td><code>‑‑title <em>"string""</em></code></td>
+ <td><code>‑‑title <em>"string"</em></code></td>
<td>Specifies the title for the open alignment window as <em>string</em>.</td>
<td></td>
<td align="center">✓</td>
<tr valign="top">
<td><code>‑‑colour <em>name</em></code></td>
- <td>Applies the colour scheme <em>name</em> to the open alignment window. Valid values for <em>name</em> are:
+ <td>Applies the colour scheme <em>name</em> to the open alignment window. Valid values for <em>name</em> include:
<br/>
<code>clustal</code>,
<br/>
<code>t-coffee-scores</code>,
<br/>
<code>sequence-id</code>.
+ <br/>
+ <br/>
+ Names of user defined schemes will also work, and jalview colour scheme specifications like:
+ <br/>
+ <code>‑‑colour "D,E=red; K,R,H=0022FF; C,c=yellow"</code>
<td></td>
<td align="center">✓</td>
</tr>
import jalview.io.HtmlSvgOutput;
import jalview.io.IdentifyFile;
import jalview.io.NewickFile;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ColourSchemeProperty;
import jalview.structure.StructureImportSettings.TFType;
import jalview.structure.StructureSelectionManager;
import jalview.util.FileUtils;
Arg.COLOUR, sv, null, "DEFAULT_COLOUR_PROT", "");
if ("" != colour)
{
- af.changeColour_actionPerformed(colour);
+ ColourSchemeI cs = ColourSchemeProperty.getColourScheme(
+ af.getViewport(), af.getViewport().getAlignment(), colour);
+
+ if (cs==null && !"None".equals(colour))
+ {
+ Console.warn("Couldn't parse '"+colour+"' as a colourscheme.");
+ } else {
+ af.changeColour(cs);
+ }
Jalview.testoutput(argParser, Arg.COLOUR, "zappo", colour);
}
"Specifies the title for the open alignment window as string.",
Opt.STRING, Opt.LINKED),
COLOUR(Type.OPENING, "color", // being a bit soft on the Americans!
- "Applies the colour scheme to the open alignment window. Valid values are:\n"
+ "Applies the colour scheme to the open alignment window. Valid values include:\n"
+ "clustal,\n" + "blosum62,\n" + "pc-identity,\n"
+ "zappo,\n" + "taylor,\n" + "gecos-flower,\n"
+ "gecos-blossom,\n" + "gecos-sunset,\n"
+ "turn-propensity,\n" + "buried-index,\n"
+ "nucleotide,\n" + "nucleotide-ambiguity,\n"
+ "purine-pyrimidine,\n" + "rna-helices,\n"
- + "t-coffee-scores,\n" + "sequence-id.",
+ + "t-coffee-scores,\n" + "sequence-id.\n"
+ +"\n"
+ + "Names of user defined colourschemes will also work,\n"
+ +"and jalview colourscheme specifications like\n"
+ +"--colour=\"D,E=red; K,R,H=0022FF; C,c=yellow\"",
Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
FEATURES(Type.OPENING, "Add a feature file or URL to the open alignment.",
Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS),