X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fdatamodel%2FAlignment.java;h=e8787f42a37d73e2d217300cd98bb61a061c4a4c;hb=1698842ec6755d1995dae7c1a590efbfc8f6e4d5;hp=588134ae7ca7cdd3e2f0d4c66f66e024d7e337de;hpb=8963cf56e542ec741295e8c4dfcee06ba3e140fb;p=jalview.git diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 588134a..e8787f4 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,671 @@ */ 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; - - HiddenSequences hiddenSequences = new HiddenSequences(this); - - private void initAlignment(SequenceI[] seqs) { - int i=0; - - if( jalview.util.Comparison.isNucleotide(seqs)) - type = NUCLEOTIDE; - else - type = PROTEIN; + /** DOCUMENT ME!! */ + public AlignmentAnnotation[] annotations; - sequences = new Vector(); + HiddenSequences hiddenSequences = new HiddenSequences(this); - for (i = 0; i < seqs.length; i++) - { - sequences.addElement(seqs[i]); - } + private void initAlignment(SequenceI[] seqs) + { + int i = 0; - } - /** Make an alignment from an array of Sequences. - * - * @param sequences - */ - public Alignment(SequenceI[] seqs) + if (jalview.util.Comparison.isNucleotide(seqs)) { - initAlignment(seqs); + type = NUCLEOTIDE; } - /** - * 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