001/* 002 * BioJava development code 003 * 004 * This code may be freely distributed and modified under the 005 * terms of the GNU Lesser General Public Licence. This should 006 * be distributed with the code. If you do not have a copy, 007 * see: 008 * 009 * http://www.gnu.org/copyleft/lesser.html 010 * 011 * Copyright for this code is held jointly by the individual 012 * authors. These should be listed in @author doc comments. 013 * 014 * For more information on the BioJava project and its aims, 015 * or to join the biojava-l mailing list, visit the home page 016 * at: 017 * 018 * http://www.biojava.org/ 019 * 020 */ 021package org.biojava.nbio.structure.symmetry.core; 022 023import java.util.Arrays; 024 025public class PairwiseAlignment { 026 private SequenceAlignmentCluster cluster1 = null; 027 private SequenceAlignmentCluster cluster2 = null; 028 private double alignmentLengthFraction = 0; 029 private double sequenceIdentity = 0; 030 private double rmsd = 0; 031 private int[][][] alignment = null; 032 033 public PairwiseAlignment(SequenceAlignmentCluster cluster1, SequenceAlignmentCluster cluster2) { 034 this.cluster1 = cluster1; 035 this.cluster2 = cluster2; 036 } 037 038 public SequenceAlignmentCluster getCluster1() { 039 return cluster1; 040 } 041 042 public SequenceAlignmentCluster getCluster2() { 043 return cluster2; 044 } 045 046 public double getAlignmentLengthFraction() { 047 return alignmentLengthFraction; 048 } 049 050 public double getSequenceIdentity() { 051 return sequenceIdentity; 052 } 053 054 public double getRmsd() { 055 return rmsd; 056 } 057 058 public int[][][] getAlignment() { 059 return alignment; 060 } 061 062 public void setAlignmentLengthFraction(double alignmentLengthFraction) { 063 this.alignmentLengthFraction = alignmentLengthFraction; 064 } 065 066 public void setSequenceIdentity(double sequenceIdentity) { 067 this.sequenceIdentity = sequenceIdentity; 068 } 069 070 public void setRmsd(double rmsd) { 071 this.rmsd = rmsd; 072 } 073 074 public void setAlignment(int[][][] alignment) { 075 this.alignment = alignment; 076 } 077 078 @Override 079 public String toString() { 080 StringBuffer s = new StringBuffer(); 081 s.append("cluster1:"); 082 s.append("\n"); 083 s.append(cluster1); 084 s.append("\n"); 085 s.append("cluster2:"); 086 s.append("\n"); 087 s.append(cluster2); 088 s.append("\n"); 089 s.append("sequence identity: " + sequenceIdentity); 090 s.append("\n"); 091 s.append("alignment fraction: " + alignmentLengthFraction); 092 s.append("\n"); 093 s.append("rmsd: " + rmsd); 094 s.append("\n"); 095 s.append("aligment1: " + Arrays.toString(alignment[0][0])); 096 s.append("\n"); 097 s.append("aligment2: " + Arrays.toString(alignment[0][1])); 098 s.append("\n"); 099 return s.toString(); 100 } 101}