X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignment.java;h=3689433aefcdcba248a8c16fdb0d005f187a436f;hb=9efc6af45120e24f7a11cc8ce6409139844e5001;hp=8c320f75ca02c8f27a3791b5efa816952dea49c4;hpb=e33cdacd2ac2836504375c538574a0f1cafec7e3;p=jalview.git diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 8c320f7..3689433 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -18,802 +18,820 @@ */ package jalview.datamodel; -import jalview.analysis.*; - -import jalview.util.*; - import java.util.*; +import jalview.analysis.*; + /** Data structure to hold and manipulate a multiple sequence alignment */ -public class Alignment implements AlignmentI +public class Alignment + implements AlignmentI { - protected Alignment dataset; - protected Vector sequences; - protected Vector groups = new Vector(); - protected char gapCharacter = '-'; - protected int type = NUCLEOTIDE; - public static final int PROTEIN = 0; - public static final int NUCLEOTIDE = 1; + protected Alignment dataset; + protected Vector sequences; + protected Vector groups = new Vector(); + protected char gapCharacter = '-'; + protected int type = NUCLEOTIDE; + public static final int PROTEIN = 0; + public static final int NUCLEOTIDE = 1; - /** DOCUMENT ME!! */ - public AlignmentAnnotation[] annotations; + /** DOCUMENT ME!! */ + public AlignmentAnnotation[] annotations; - HiddenSequences hiddenSequences = new HiddenSequences(this); + HiddenSequences hiddenSequences = new HiddenSequences(this); - private void initAlignment(SequenceI[] seqs) { - int i=0; + public Hashtable alignmentProperties; - if( jalview.util.Comparison.isNucleotide(seqs)) - type = NUCLEOTIDE; - else - type = PROTEIN; - - sequences = new Vector(); - - for (i = 0; i < seqs.length; i++) - { - sequences.addElement(seqs[i]); - } + private void initAlignment(SequenceI[] seqs) + { + int i = 0; + if (jalview.util.Comparison.isNucleotide(seqs)) + { + type = NUCLEOTIDE; } - /** Make an alignment from an array of Sequences. - * - * @param sequences - */ - public Alignment(SequenceI[] seqs) + else { - initAlignment(seqs); + type = PROTEIN; } - /** - * Make a new alignment from an array of SeqCigars - * @param seqs SeqCigar[] - */ - public Alignment(SeqCigar[] alseqs) { - SequenceI[] seqs = new SequenceI[alseqs.length]; - for (int i=0; i