From: amwaterhouse Date: Fri, 11 Nov 2005 18:19:30 +0000 (+0000) Subject: Last chance, is the sequence without id? X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b1e979c2a213464abb87f4959bfd99fb95c8f236;p=jalview.git Last chance, is the sequence without id? --- diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index fa2373e..0354f35 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -93,9 +93,23 @@ } catch (Exception e) { - System.err.println("Failed to read alignment using the '" + format + - "' reader."); - e.printStackTrace(); + System.err.println("Failed to read alignment using the '" + format + + "' reader.\n"+e); + + // Finally test if the user has pasted just the sequence, no id + if(type.equalsIgnoreCase("Paste")) + { + try{ + // Possible sequence is just residues with no label + afile = new FastaFile(">UNKNOWN\n" + inFile, "Paste"); + return afile.getSeqsAsArray(); + }catch(Exception ex) + { + System.err.println("Failed to read alignment using the 'FASTA' reader.\n"+e); + ex.printStackTrace(); + } + + } } return null;