\r
import jalview.gui.*;\r
\r
-import org.apache.log4j.*;\r
-\r
import javax.swing.*;\r
\r
import java.util.Vector;\r
System.out.println("Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n"\r
+"-nodisplay\tRun Jalview without User Interface.\n"\r
+"-props FILE\tUse the given Jalview properties file instead of users default.\n"\r
- +"-groups FILE\tUse the given file to mark groups on the alignment. \nGroups file is in the following tab delimited format\n"\r
- +"TEXT<tab>SEQUENCE_ID<tab>SEQUENCE_INDEX<tab>START_RESIDUE<tab>END_RESIDUE<tab>COLOUR\n"\r
+ +"-groups FILE\tUse the given file to mark groups on the alignment."\r
+ +"\nThe first lines of the groups file lists the GroupName and GroupColours"\r
+ +" to be used in the alignment. Use the GROUPNAME label for each of your sequences. "\r
+ +"\nGROUPNAME<tab>GROUPCOLOUR\n"\r
+ +"TEXT<tab>SEQUENCE_ID<tab>SEQUENCE_INDEX<tab>START_RESIDUE<tab>END_RESIDUE<tab>GROUPNAME\n"\r
+"SequenceID is used in preference to SequenceIndex if both are provided.\n"\r
+"Enter ID_NOT_SPECIFIED for SEQUENCE_ID or -1 for SEQUENCE_INDEX if unknown.\n"\r
+"COLOUR can be hexadecimal RGB or 'red', 'blue' etc.\n\n"\r
System.exit(0);\r
}\r
\r
+ Cache.loadProperties(aparser.getValue("props")); // must do this before anything else!\r
\r
if (aparser.contains("nodisplay"))\r
+ {\r
System.setProperty("java.awt.headless", "true");\r
-\r
+ }\r
if (System.getProperty("java.awt.headless") != null\r
&& System.getProperty("java.awt.headless").equals("true"))\r
{\r
System.exit(0);\r
}\r
\r
- Cache.loadProperties(aparser.getValue("props"));\r
-\r
Desktop desktop = null;\r
if( !headless )\r
{\r
if (! (new java.io.File(file)).exists())\r
{\r
System.out.println("Can't find " + file);\r
- System.exit(1);\r
+ if(headless)\r
+ System.exit(1);\r
}\r
}\r
\r
if (file.endsWith(".jar"))\r
format = "Jalview";\r
else\r
- format = jalview.io.IdentifyFile.Identify(file, protocol);\r
+ format = new jalview.io.IdentifyFile().Identify(file, protocol);\r
\r
System.out.println("Opening: " + format + " file " + file);\r
\r
}\r
else\r
{\r
- format = jalview.io.IdentifyFile.Identify(file, protocol);\r
+ format = new jalview.io.IdentifyFile().Identify(file, protocol);\r
desktop.LoadFile(file, protocol, format);\r
}\r
}\r
-\r
-\r
- if (desktop==null)\r
- System.exit(0);\r
}\r
}\r
\r