From f1cb5d86bc54dadbf405830444d04418b62488b8 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 13 Dec 2019 15:42:06 +0000 Subject: [PATCH] JAL-1236 CLUSTAL_HEADER property to configure the header for Clustal format files --- src/jalview/io/ClustalFile.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/jalview/io/ClustalFile.java b/src/jalview/io/ClustalFile.java index afb2009..537c154 100755 --- a/src/jalview/io/ClustalFile.java +++ b/src/jalview/io/ClustalFile.java @@ -36,17 +36,28 @@ public class ClustalFile extends AlignFile public ClustalFile() { + _initHeader(); } public ClustalFile(String inFile, DataSourceType sourceType) throws IOException { super(inFile, sourceType); + _initHeader(); } public ClustalFile(FileParse source) throws IOException { super(source); + _initHeader(); + } + + private void _initHeader() + { + try { + clustalHeader = jalview.bin.Cache.getDefault("CLUSTAL_HEADER","CLUSTAL"); + } catch (Error e) {}; + } @Override @@ -196,11 +207,15 @@ public class ClustalFile extends AlignFile } } } - + /** + * clustal header - customise if needed + */ + public String clustalHeader = "CLUSTAL"; + @Override public String print(SequenceI[] s, boolean jvsuffix) { - StringBuffer out = new StringBuffer("CLUSTAL" + newline + newline); + StringBuffer out = new StringBuffer(clustalHeader + newline + newline); int max = 0; int maxid = 0; -- 1.7.10.2