Last chance, is the sequence without id?
authoramwaterhouse <Andrew Waterhouse>
Fri, 11 Nov 2005 18:19:30 +0000 (18:19 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 11 Nov 2005 18:19:30 +0000 (18:19 +0000)
src/jalview/io/AppletFormatAdapter.java

index fa2373e..0354f35 100755 (executable)
             }\r
             catch (Exception e)\r
             {\r
-                System.err.println("Failed to read alignment using the '" + format +\r
-                    "' reader.");\r
-                e.printStackTrace();\r
+              System.err.println("Failed to read alignment using the '" + format +\r
+                                 "' reader.\n"+e);\r
+\r
+              // Finally test if the user has pasted just the sequence, no id\r
+              if(type.equalsIgnoreCase("Paste"))\r
+              {\r
+                try{\r
+                  // Possible sequence is just residues with no label\r
+                  afile = new FastaFile(">UNKNOWN\n" + inFile, "Paste");\r
+                  return afile.getSeqsAsArray();\r
+                }catch(Exception ex)\r
+                {\r
+                  System.err.println("Failed to read alignment using the 'FASTA' reader.\n"+e);\r
+                  ex.printStackTrace();\r
+                }\r
+\r
+              }\r
             }\r
 \r
             return null;\r