*/
public static final String[] READABLE_FORMATS = new String[]
{ "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "STH",
- "PDB", "JnetFile", "RNAML", PhylipFile.FILE_DESC, HtmlFile.FILE_DESC }; // ,
+ "PDB", "JnetFile", "RNAML", PhylipFile.FILE_DESC, "HTML" }; // ,
// "SimpleBLAST"
// };
public static final String[] READABLE_EXTENSIONS = new String[]
{ "fa, fasta, mfa, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa",
"jar,jvp", "sto,stk", "xml,rnaml", PhylipFile.FILE_EXT,
- HtmlFile.FILE_EXT }; // ".blast"
+ "html" }; // ".blast"
/**
* List of readable formats by application in order corresponding to
*/
public static final String[] READABLE_FNAMES = new String[]
{ "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Jalview",
- "Stockholm", "RNAML", PhylipFile.FILE_DESC, HtmlFile.FILE_DESC };// ,
+ "Stockholm", "RNAML", PhylipFile.FILE_DESC, "HTML" };// ,
// "SimpleBLAST"
// };
{
afile = new PhylipFile(inFile, type);
}
- else if (format.equals(HtmlFile.FILE_DESC))
- {
- afile = new HtmlFile(inFile, type);
- }
+ // else if (format.equals(HtmlFile.FILE_DESC))
+ // {
+ // afile = new HtmlFile(inFile, type);
+ // }
else if (format.equals("RNAML"))
{
afile = new RnamlFile(inFile, type);
{
afile = new PhylipFile(source);
}
- else if (format.equals(HtmlFile.FILE_DESC))
- {
- afile = new HtmlFile(source);
- }
+ // else if (format.equals(HtmlFile.FILE_DESC))
+ // {
+ // afile = new HtmlFile(source);
+ // }
Alignment al = new Alignment(afile.getSeqsAsArray());
afile.addAnnotations(al);
{
afile = new PhylipFile();
}
- else if (format.equalsIgnoreCase(HtmlFile.FILE_DESC))
- {
- afile = new HtmlFile();
- }
+ // else if (format.equalsIgnoreCase(HtmlFile.FILE_DESC))
+ // {
+ // afile = new HtmlFile();
+ // }
else if (format.equalsIgnoreCase("RNAML"))
{
afile = new RnamlFile();
package jalview.io;
import jalview.api.AlignViewportI;
-import jalview.datamodel.*;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
/**
* Additional formatting methods used by the application in a number of places.
public boolean getCacheSuffixDefault(String format)
{
if (isValidFormat(format))
+ {
return jalview.bin.Cache.getDefault(format.toUpperCase()
+ "_JVSUFFIX", true);
+ }
return false;
}
return this.formatSequences(format, alignment, suffix);
}
+ public Alignment readFile(String inFile, String type, String format)
+ throws java.io.IOException
+ {
+ Alignment al;
+ if (format.equals("HTML"))
+ {
+ afile = new HtmlFile(inFile, type);
+ al = new Alignment(afile.getSeqsAsArray());
+ afile.addAnnotations(al);
+ }
+ else
+ {
+ al = super.readFile(inFile, type, format);
+ }
+
+ return al;
+ }
+
+ public AlignmentI readFromFile(FileParse source, String format)
+ throws java.io.IOException
+ {
+ Alignment al;
+ if (format.equals("HTML"))
+ {
+ afile = new HtmlFile(source);
+ al = new Alignment(afile.getSeqsAsArray());
+ afile.addAnnotations(al);
+ }
+ else
+ {
+ al = (Alignment) super.readFromFile(source, format);
+ }
+ return al;
+ }
+
/**
* validate format is valid for IO in Application. This is basically the
* AppletFormatAdapter.isValidFormat call with additional checks for