2
//============================================================================
4
// file: Alignment.java
6
// Copyright (c) 2007, Michael E. Smoot
8
// This program is free software; you can redistribute it and/or modify it
9
// under the terms of the GNU General Public License as published by the
10
// Free Software Foundation; either version 2 of the License, or (at your
11
// option) any later version.
13
// This program is distributed in the hope that it will be useful, but
14
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18
// You should have received a copy of the GNU General Public License along
19
// with this program; if not, write to the Free Software Foundation, Inc.,
20
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
//============================================================================
28
public class Alignment {
30
Map<String,String> seqs;
31
Map<String,String> colors;
35
public Alignment(List<String> keys, Map<String,String> seqs, Map<String,String> colors, double nWeight) {
39
this.nWeight = nWeight;
42
public List<String> getOrderedKeys() {
46
public Map<String,String> getSequences() {
50
public Map<String,String> getColors() {
54
public double getWeight() {
58
public String toString() {
59
StringBuffer sb = new StringBuffer();
60
sb.append("Weight = ");
61
sb.append((new Double(nWeight)).toString());
63
for ( String key : seqs.keySet() ) {
66
sb.append(seqs.get(key));
75
public String toMultiFasta() {
76
StringBuffer sb = new StringBuffer();
77
for ( String key : keys ) {
81
sb.append(seqs.get(key));