File Parsing returns Alignments, not Sequence[]
[jalview.git] / src / jalview / bin / JalviewLite.java
index 1fbb82e..af01a99 100755 (executable)
@@ -143,16 +143,16 @@ public class JalviewLite extends Applet
 \r
       String format = new jalview.io.IdentifyFile().Identify(args[0],AppletFormatAdapter.FILE);\r
 \r
-      SequenceI[] sequences = null;\r
+     Alignment al = null;\r
      try{\r
-       sequences = new AppletFormatAdapter().readFile(args[0], AppletFormatAdapter.FILE, format);\r
+       al = new AppletFormatAdapter().readFile(args[0], AppletFormatAdapter.FILE, format);\r
      }catch(java.io.IOException ex)\r
      {\r
        ex.printStackTrace();\r
      }\r
-      if ( (sequences != null) && (sequences.length > 0))\r
+      if ( (al != null) && (al.getHeight() > 0))\r
       {\r
-        AlignFrame af = new AlignFrame(new Alignment(sequences), null, args[0], false);\r
+        AlignFrame af = new AlignFrame(al, null, args[0], false);\r
         af.statusBar.setText("Successfully loaded file " + args[0]);\r
       }\r
     }\r
@@ -296,17 +296,17 @@ public class JalviewLite extends Applet
 \r
         public void run()\r
         {\r
-            SequenceI[] sequences = null;\r
+            Alignment al = null;\r
             try{\r
-              sequences = new AppletFormatAdapter().readFile(file, protocol,\r
+              al = new AppletFormatAdapter().readFile(file, protocol,\r
                   format);\r
             }catch(java.io.IOException ex)\r
             {\r
               ex.printStackTrace();\r
             }\r
-            if ((sequences != null) && (sequences.length > 0))\r
+            if ((al != null) && (al.getHeight() > 0))\r
             {\r
-              currentAlignFrame = new AlignFrame(new Alignment(sequences),\r
+              currentAlignFrame = new AlignFrame(al,\r
                                                  applet,\r
                                                  file,\r
                                                  embedded);\r