sequence db fetcher and db reference validation/annotation transfer
[jalview.git] / src / jalview / ws / dbsources / EmblXmlSource.java
index 68fa87c..68a2424 100644 (file)
@@ -32,9 +32,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
   public AlignmentI getEmblSequenceRecords(String emprefx, String query) throws Exception\r
   {\r
     startQuery();\r
-    SequenceI seqs[] = null;\r
-    Vector alseq = new Vector(); // the sequences that will actually be presented in the alignment\r
-    StringBuffer result = new StringBuffer();\r
     EBIFetchClient dbFetch = new EBIFetchClient();\r
     File reply; \r
     try {\r
@@ -47,6 +44,20 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
       stopQuery();\r
       throw new Exception("EBI EMBL XML retrieval failed on "+emprefx.toLowerCase()+":"+query.trim(),e);\r
     }\r
+    return getEmblSequenceRecords(emprefx, query, reply);\r
+  }\r
+  /**\r
+   * parse an emblxml file stored locally\r
+   * @param emprefx either EMBL or EMBLCDS strings are allowed - anything else will not retrieve emblxml\r
+   * @param query\r
+   * @param file the EMBL XML file containing the results of a query\r
+   * @return\r
+   * @throws Exception\r
+   */\r
+  public AlignmentI getEmblSequenceRecords(String emprefx, String query, File reply) throws Exception\r
+  {\r
+    SequenceI seqs[] = null;\r
+    StringBuffer result = new StringBuffer();\r
     if (reply != null && reply.exists())\r
       {\r
         efile=null;\r