JAL-2136 JAL-2137 Improvements: enable STRUCTMODEL annotation statement to be less...
[jalview.git] / src / jalview / ws / phyre2 / Phyre2Client.java
index a54c924..cea4a64 100644 (file)
@@ -3,6 +3,7 @@ package jalview.ws.phyre2;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
 import jalview.fts.core.DecimalFormatTableCellRenderer;
+import jalview.io.AppletFormatAdapter;
 import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
 import jalview.io.FormatAdapter;
@@ -82,8 +83,11 @@ public class Phyre2Client extends StructureMappingClient
     AlignmentI seq2Phyre2ModelFastaMapping = null;
     try
     {
-      seq2Phyre2ModelFastaMapping = new FormatAdapter().readFile(
-              getFastaMappingFile(), DataSourceType.FILE, FileFormat.Fasta);
+      String fastaFile = getFastaMappingFile();
+      DataSourceType protocol = AppletFormatAdapter
+              .checkProtocol(fastaFile);
+      seq2Phyre2ModelFastaMapping = new FormatAdapter().readFile(fastaFile,
+              protocol, FileFormat.Fasta);
     } catch (IOException e1)
     {
       e1.printStackTrace();