From b1e979c2a213464abb87f4959bfd99fb95c8f236 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 11 Nov 2005 18:19:30 +0000 Subject: [PATCH] Last chance, is the sequence without id? --- src/jalview/io/AppletFormatAdapter.java | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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; -- 1.7.10.2