git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'JAL-1199-Stk_writing' into rnaml_test
[jalview.git]
/
src
/
jalview
/
io
/
AppletFormatAdapter.java
diff --git
a/src/jalview/io/AppletFormatAdapter.java
b/src/jalview/io/AppletFormatAdapter.java
index
67d50ee
..
2fc6d12
100755
(executable)
--- 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",
*/
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
/**
* 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[]
* 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" };
/**
"sto,stk" };
/**
@@
-69,8
+69,8
@@
public class AppletFormatAdapter
* corresponding to READABLE_FNAMES
*/
public static final String[] READABLE_EXTENSIONS = new String[]
* 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"
// };
// ".blast"
// };
@@
-81,7
+81,7
@@
public class AppletFormatAdapter
*/
public static final String[] READABLE_FNAMES = new String[]
{ "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Jalview",
*/
public static final String[] READABLE_FNAMES = new String[]
{ "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Jalview",
- "Stockholm" };// ,
+ "Stockholm","RNAML" };// ,
// "SimpleBLAST"
// };
// "SimpleBLAST"
// };
@@
-230,7
+230,9
@@
public class AppletFormatAdapter
}
else if (format.equals("PDB"))
{
}
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"))
{
}
else if (format.equals("STH"))
{
@@
-240,7
+242,11
@@
public class AppletFormatAdapter
{
afile = new SimpleBlastFile(inFile, type);
}
{
afile = new SimpleBlastFile(inFile, type);
}
-
+ else if (format.equals("RNAML"))
+ {
+ afile = new RnamlFile(inFile, type);
+ }
+
Alignment al = new Alignment(afile.getSeqsAsArray());
afile.addAnnotations(al);
Alignment al = new Alignment(afile.getSeqsAsArray());
afile.addAnnotations(al);
@@
-295,7
+301,7
@@
public class AppletFormatAdapter
*
* @return DOCUMENT ME!
*/
*
* @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
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);
}
{
afile = new StockholmFile(source);
}
+ else if (format.equals("RNAML"))
+ {
+ afile = new RnamlFile(source);
+ }
else if (format.equals("SimpleBLAST"))
{
afile = new SimpleBlastFile(source);
else if (format.equals("SimpleBLAST"))
{
afile = new SimpleBlastFile(source);
@@
-454,6
+464,11
@@
public class AppletFormatAdapter
{
afile = new AMSAFile(alignment);
}
{
afile = new AMSAFile(alignment);
}
+ else if (format.equalsIgnoreCase("RNAML"))
+ {
+ afile = new RnamlFile();
+ }
+
else
{
throw new Exception(
else
{
throw new Exception(