X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;fp=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=2fc6d120c2af7c44dc2c96497e741698bd8227a0;hb=bb99cb8aa479dc7dd30b3678f183044247e25998;hp=67d50eea97a7b16035c9272a48c585f2d38b3d05;hpb=ef27f54c5b57246405fb34109f40c501f6ba8e0d;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index 67d50ee..2fc6d12 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -38,7 +38,7 @@ public class AppletFormatAdapter */ public static final String[] READABLE_FORMATS = new String[] { "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "STH", - "PDB", "JnetFile" }; // , "SimpleBLAST" }; + "PDB", "JnetFile" , "RNAML"}; // , "SimpleBLAST" }; /** * List of valid format strings for use by callers of the formatSequences @@ -53,7 +53,7 @@ public class AppletFormatAdapter * that are writable by the application. */ public static final String[] WRITABLE_EXTENSIONS = new String[] - { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "jar", + { "fa,faa,fasta,fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "jar", "sto,stk" }; /** @@ -69,8 +69,8 @@ public class AppletFormatAdapter * corresponding to READABLE_FNAMES */ public static final String[] READABLE_EXTENSIONS = new String[] - { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "jar", - "sto,stk" }; // , + { "fa,faa,fasta,fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "jar", + "sto,stk","xml,rnaml" }; // , // ".blast" // }; @@ -81,7 +81,7 @@ public class AppletFormatAdapter */ public static final String[] READABLE_FNAMES = new String[] { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Jalview", - "Stockholm" };// , + "Stockholm","RNAML" };// , // "SimpleBLAST" // }; @@ -230,7 +230,9 @@ public class AppletFormatAdapter } else if (format.equals("PDB")) { - afile = new MCview.PDBfile(inFile, type); + afile = new MCview.PDBfile(inFile, type); + // Uncomment to test Jmol data based PDB processing: JAL-1213 + // afile = new jalview.ext.jmol.PDBFileWithJmol(inFile, type); } else if (format.equals("STH")) { @@ -240,7 +242,11 @@ public class AppletFormatAdapter { afile = new SimpleBlastFile(inFile, type); } - + else if (format.equals("RNAML")) + { + afile = new RnamlFile(inFile, type); + } + Alignment al = new Alignment(afile.getSeqsAsArray()); afile.addAnnotations(al); @@ -295,7 +301,7 @@ public class AppletFormatAdapter * * @return DOCUMENT ME! */ - public Alignment readFromFile(FileParse source, String format) + public AlignmentI readFromFile(FileParse source, String format) throws java.io.IOException { // TODO: generalise mapping between format string and io. class instances @@ -347,6 +353,10 @@ public class AppletFormatAdapter { afile = new StockholmFile(source); } + else if (format.equals("RNAML")) + { + afile = new RnamlFile(source); + } else if (format.equals("SimpleBLAST")) { afile = new SimpleBlastFile(source); @@ -454,6 +464,11 @@ public class AppletFormatAdapter { afile = new AMSAFile(alignment); } + else if (format.equalsIgnoreCase("RNAML")) + { + afile = new RnamlFile(); + } + else { throw new Exception(