fix exception raised when JNet concise files with no sequence content are parsed...
authorjprocter <Jim Procter>
Tue, 16 Sep 2008 09:09:41 +0000 (09:09 +0000)
committerjprocter <Jim Procter>
Tue, 16 Sep 2008 09:09:41 +0000 (09:09 +0000)
src/jalview/io/JPredFile.java

index 1e1b8bf..ec4a89e 100755 (executable)
@@ -304,10 +304,10 @@ public class JPredFile extends AlignFile
 
       seqs.addElement(newSeq);
     }
-    if (seqs.size() > 0)
+    if (seqs.size() > 0 && QuerySeqPosition>-1)
     {
       // try to make annotation for a prediction only input (default if no
-      // alignment is given)
+      // alignment is given and prediction contains a QUERY or align;sequence_id line)
       Alignment tal = new Alignment(this.getSeqsAsArray());
       try
       {
@@ -319,6 +319,7 @@ public class JPredFile extends AlignFile
         IOException ex = new IOException(
                 "Couldn't parse concise annotation for prediction profile.\n"
                         + e);
+        ex.setStackTrace(e.getStackTrace());
         throw ex;
       }
       this.annotations = new Vector();