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-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=71819cf99be183b2d2f3b89f5db28a2bedf81e66;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 e94e1ce..298c40d 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)