Don't parse input id, leave it as it is
[jalview.git] / src / jalview / io / AppletFormatAdapter.java
index 80a624d..f8b809e 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
          *\r
          * @return DOCUMENT ME!\r
          */\r
-        public String formatSequences(String format, Vector seqs)\r
+        public String formatSequences(String format,\r
+                                      Vector seqs,\r
+                                      boolean jvsuffix)\r
         {\r
             SequenceI[] s = new SequenceI[seqs.size()];\r
 \r
                     afile = new PfamFile();\r
                 }\r
 \r
+                afile.addJVSuffix(jvsuffix);\r
+\r
                 afile.setSeqs(s);\r
 \r
                 return afile.print();\r