From: Jim Procter Date: Mon, 3 Aug 2020 13:07:03 +0000 (+0100) Subject: JAL-1260 FileFormat entry for EMBL/GENBANK: TODO: create tests and IdentifyFile routi... X-Git-Tag: Release_2_11_2_0~34^2~8^2~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8550acbddfcf94dbacaae9738a4b6d4f68b16b02;p=jalview.git JAL-1260 FileFormat entry for EMBL/GENBANK: TODO: create tests and IdentifyFile routine for this format --- diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index cb61740..4f0480d 100644 --- a/src/jalview/io/FileFormat.java +++ b/src/jalview/io/FileFormat.java @@ -21,6 +21,7 @@ package jalview.io; import jalview.datamodel.AlignmentI; +import jalview.datamodel.DBRefSource; import jalview.datamodel.PDBEntry; import jalview.ext.jmol.JmolParser; import jalview.structure.StructureImportSettings; @@ -243,6 +244,22 @@ public enum FileFormat implements FileFormatI return new PhylipFile(); } }, + GenBank("GenBank/ENA Flatfile","gb",false,false) + { + @Override + public AlignmentFileReaderI getReader(FileParse source) + throws IOException + { + // Always assume we import from EMBL for now + return new EmblFlatFile(source, DBRefSource.EMBL); + } + @Override + public AlignmentFileWriterI getWriter(AlignmentI al) + { + return null; + } + } + , Jnet("JnetFile", "", false, false) { @Override @@ -407,8 +424,8 @@ public enum FileFormat implements FileFormatI * @param shortName * @param extensions * comma-separated list of file extensions associated with the format - * @param isReadable - * @param isWritable + * @param isReadable - can be recognised by IdentifyFile and imported with the given reader + * @param isWritable - can be exported with the returned writer */ private FileFormat(String shortName, String extensions, boolean isReadable, boolean isWritable)