import groovy.lang.Binding;
import groovy.util.GroovyScriptEngine;
+import jalview.ext.so.SequenceOntology;
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
import jalview.gui.PromptUserConfig;
import jalview.io.HtmlSvgOutput;
import jalview.io.IdentifyFile;
import jalview.io.NewickFile;
+import jalview.io.gff.SequenceOntologyFactory;
import jalview.schemes.ColourSchemeI;
import jalview.schemes.ColourSchemeProperty;
-import jalview.schemes.UserColourScheme;
import jalview.util.MessageManager;
import jalview.util.Platform;
import jalview.ws.jws2.Jws2Discoverer;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.security.AllPermission;
import java.security.CodeSource;
}
}
+ /*
+ * configure 'full' SO model if preferences say to,
+ * else use the default (SO Lite)
+ */
+ if (Cache.getDefault("USE_FULL_SO", false))
+ {
+ SequenceOntologyFactory.setInstance(new SequenceOntology());
+ }
+
if (!headless)
{
desktop = new Desktop();
Cache.log.debug("Starting questionnaire with default url: "
+ defurl);
desktop.checkForQuestionnaire(defurl);
-
}
}
}
{
System.err.println("CMD [-noquestionnaire] executed successfully!");
}
- desktop.checkForNews();
- }
- if (!isHeadlessMode())
- {
+ if (!aparser.contains("nonews"))
+ {
+ desktop.checkForNews();
+ }
+
BioJsHTMLOutput.updateBioJS();
}
{
data.replaceAll("%20", " ");
- ColourSchemeI cs = ColourSchemeProperty.getColour(af
+ ColourSchemeI cs = ColourSchemeProperty.getColourScheme(af
.getViewport().getAlignment(), data);
- if (cs == null)
- {
- UserColourScheme ucs = new UserColourScheme("white");
- ucs.parseAppletParameter(data);
- cs = ucs;
- }
- else
+ if (cs != null)
{
System.out.println("CMD [-color " + data
+ "] executed successfully!");
data = aparser.getValue("tree", true);
if (data != null)
{
- jalview.io.NewickFile fin = null;
try
{
System.out.println("CMD [-tree " + data
+ "] executed successfully!");
- fin = new NewickFile(data,
+ NewickFile nf = new NewickFile(data,
AppletFormatAdapter.checkProtocol(data));
- if (fin != null)
- {
- af.getViewport().setCurrentTree(
- af.ShowNewickTree(fin, data).getTree());
- }
+ af.getViewport().setCurrentTree(
+ af.showNewickTree(nf, data).getTree());
} catch (IOException ex)
{
System.err.println("Couldn't add tree " + data);
{
File imageFile = new File(file);
imageName = imageFile.getName();
- new HtmlSvgOutput(new File(file), af.alignPanel);
+ HtmlSvgOutput htmlSVG = new HtmlSvgOutput(af.alignPanel);
+ htmlSVG.exportHTML(file);
+
System.out.println("Creating HTML image: " + file);
continue;
}
+ else if (outputFormat.equalsIgnoreCase("biojsmsa"))
+ {
+ if (file == null)
+ {
+ System.err.println("The output html file must not be null");
+ return;
+ }
+ try
+ {
+ BioJsHTMLOutput
+ .refreshVersionInfo(BioJsHTMLOutput.BJS_TEMPLATES_LOCAL_DIRECTORY);
+ } catch (URISyntaxException e)
+ {
+ e.printStackTrace();
+ }
+ BioJsHTMLOutput bjs = new BioJsHTMLOutput(af.alignPanel);
+ bjs.exportHTML(file);
+ System.out.println("Creating BioJS MSA Viwer HTML file: "
+ + file);
+ continue;
+ }
else if (outputFormat.equalsIgnoreCase("imgMap"))
{
af.createImageMap(new File(file), imageName);
+ "-png FILE\tCreate PNG image FILE from alignment.\n"
+ "-svg FILE\tCreate SVG image FILE from alignment.\n"
+ "-html FILE\tCreate HTML file from alignment.\n"
+ + "-biojsMSA FILE\tCreate BioJS MSA Viewer HTML file from alignment.\n"
+ "-imgMap FILE\tCreate HTML file FILE with image map of PNG image.\n"
+ "-eps FILE\tCreate EPS file FILE from alignment.\n"
+ "-questionnaire URL\tQueries the given URL for information about any Jalview user questionnaires.\n"
+ "-noquestionnaire\tTurn off questionnaire check.\n"
+ + "-nonews\tTurn off check for Jalview news.\n"
+ "-nousagestats\tTurn off google analytics tracking for this session.\n"
+ "-sortbytree OR -nosortbytree\tEnable or disable sorting of the given alignment by the given tree\n"
// +