X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=966e9523fa32e899711423c761935fa3c15a8127;hb=303b0e6ae514a417fc5a264f0017f42d95d93303;hp=cd4d138a68200fa3cdac750e9c35d710792ef88f;hpb=ee198b3ca3687f18a2ee186f4e7c7330f4ea30f0;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index cd4d138..966e952 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -23,6 +23,7 @@ package jalview.bin; 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; @@ -36,9 +37,9 @@ import jalview.io.FileLoader; 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; @@ -52,6 +53,7 @@ import java.io.OutputStreamWriter; 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; @@ -291,6 +293,15 @@ public class Jalview } } + /* + * 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(); @@ -331,7 +342,6 @@ public class Jalview Cache.log.debug("Starting questionnaire with default url: " + defurl); desktop.checkForQuestionnaire(defurl); - } } } @@ -339,11 +349,12 @@ public class Jalview { System.err.println("CMD [-noquestionnaire] executed successfully!"); } - desktop.checkForNews(); - } - if (!isHeadlessMode()) - { + if (!aparser.contains("nonews")) + { + desktop.checkForNews(); + } + BioJsHTMLOutput.updateBioJS(); } @@ -499,16 +510,10 @@ public class Jalview { 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!"); @@ -650,10 +655,33 @@ public class Jalview { 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); @@ -795,10 +823,12 @@ public class Jalview + "-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" // +