X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAlignFile.java;h=4de510a332ad20c063d28914f5d80cada9732afe;hb=4815037f13748676b04b91dc761b73cf6f2d6ecd;hp=6d6ab5c4383e32211ffd067a70df046c5f92fc63;hpb=ee198b3ca3687f18a2ee186f4e7c7330f4ea30f0;p=jalview.git diff --git a/src/jalview/io/AlignFile.java b/src/jalview/io/AlignFile.java index 6d6ab5c..4de510a 100755 --- a/src/jalview/io/AlignFile.java +++ b/src/jalview/io/AlignFile.java @@ -65,14 +65,12 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI /** * Properties to be added to generated alignment object */ - protected Hashtable properties; + private Hashtable properties; long start; long end; - boolean jvSuffix = true; - private boolean parseCalled; /** @@ -86,6 +84,12 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI initData(); } + public AlignFile(SequenceI[] seqs) + { + this(); + setSeqs(seqs); + } + /** * Constructor which parses the data from a file of some specified type. * @@ -335,18 +339,6 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI public abstract void parse() throws IOException; /** - * Print out in alignment file format the Sequences in the seqs Vector. - */ - @Override - public abstract String print(); - - @Override - public void addJVSuffix(boolean b) - { - jvSuffix = b; - } - - /** * A general parser for ids. * * @String id Id to be parsed @@ -378,14 +370,21 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI } /** - * Creates the output id. Adds prefix Uniprot format source|id And suffix - * Jalview /start-end + * Creates the output id. Adds prefix Uniprot format source|id and optionally + * suffix Jalview /start-end + * + * @param jvsuffix * * @String id Id to be parsed */ + String printId(SequenceI seq, boolean jvsuffix) + { + return seq.getDisplayId(jvsuffix); + } + String printId(SequenceI seq) { - return seq.getDisplayId(jvSuffix); + return printId(seq, true); } /**