From 8550acbddfcf94dbacaae9738a4b6d4f68b16b02 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 3 Aug 2020 14:07:03 +0100 Subject: [PATCH] JAL-1260 FileFormat entry for EMBL/GENBANK: TODO: create tests and IdentifyFile routine for this format --- src/jalview/io/FileFormat.java | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) 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) -- 1.7.10.2