From: Jim Procter Date: Fri, 13 Dec 2019 15:42:06 +0000 (+0000) Subject: JAL-1236 CLUSTAL_HEADER property to configure the header for Clustal format files X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f1cb5d86bc54dadbf405830444d04418b62488b8;p=jalview.git JAL-1236 CLUSTAL_HEADER property to configure the header for Clustal format files --- 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;