+ public String s1str;
+
+ public String s2str;
+
+ int maxi;
+
+ int maxj;
+
+ int[] aseq1;
+
+ int[] aseq2;
+
+ public String astr1 = "";
+
+ public String astr2 = "";
+
+ /** DOCUMENT ME!! */
+ public int seq1start;
+
+ /** DOCUMENT ME!! */
+ public int seq1end;
+
+ /** DOCUMENT ME!! */
+ public int seq2start;
+
+ /** DOCUMENT ME!! */
+ public int seq2end;
+
+ int count;
+
+ /** DOCUMENT ME!! */
+ public int maxscore;
+
+ float pid;
+
+ int prev = 0;
+
+ int gapOpen = 120;
+
+ int gapExtend = 20;
+
+ int[][] lookup = ResidueProperties.getBLOSUM62();
+
+ String[] intToStr = pep;
+
+ int defInt = 23;
+
+ StringBuffer output = new StringBuffer();
+
+ String type;
+
+ /**
+ * Creates a new AlignSeq object.
+ *
+ * @param s1
+ * DOCUMENT ME!
+ * @param s2
+ * DOCUMENT ME!
+ * @param type
+ * DOCUMENT ME!
+ */
+ public AlignSeq(SequenceI s1, SequenceI s2, String type)
+ {
+ SeqInit(s1, s1.getSequenceAsString(), s2, s2.getSequenceAsString(),
+ type);
+ }
+
+ /**
+ * Creates a new AlignSeq object.
+ *
+ * @param s1
+ * DOCUMENT ME!
+ * @param s2
+ * DOCUMENT ME!
+ * @param type
+ * DOCUMENT ME!
+ */
+ public AlignSeq(SequenceI s1, String string1, SequenceI s2,
+ String string2, String type)
+ {
+ SeqInit(s1, string1, s2, string2, type);
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int getMaxScore()
+ {
+ return maxscore;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int getSeq2Start()
+ {
+ return seq2start;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int getSeq2End()
+ {
+ return seq2end;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int getSeq1Start()
+ {
+ return seq1start;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int getSeq1End()
+ {
+ return seq1end;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public String getOutput()
+ {
+ return output.toString();
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public String getAStr1()
+ {
+ return astr1;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public String getAStr2()
+ {
+ return astr2;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int[] getASeq1()
+ {
+ return aseq1;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int[] getASeq2()
+ {
+ return aseq2;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public SequenceI getS1()
+ {
+ return s1;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public SequenceI getS2()
+ {
+ return s2;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param s1
+ * DOCUMENT ME!
+ * @param string1 -
+ * string to align for sequence1
+ * @param s2
+ * sequence 2
+ * @param string2 -
+ * string to align for sequence2
+ * @param type
+ * DNA or PEPTIDE
+ */
+ public void SeqInit(SequenceI s1, String string1, SequenceI s2,
+ String string2, String type)
+ {
+ this.s1 = s1;
+ this.s2 = s2;
+ setDefaultParams(type);
+ SeqInit(string1, string2);
+ }
+
+ public void SeqInit(SequenceI s1, String string1, SequenceI s2,
+ String string2, ScoreMatrix scoreMatrix)
+ {
+ this.s1 = s1;
+ this.s2 = s2;
+ setType(scoreMatrix.isDNA() ? AlignSeq.DNA : AlignSeq.PEP);
+ lookup = scoreMatrix.getMatrix();
+ }
+
+ /**
+ * construct score matrix for string1 and string2 (after removing any existing
+ * gaps
+ *
+ * @param string1
+ * @param string2
+ */
+ private void SeqInit(String string1, String string2)
+ {
+ s1str = extractGaps(jalview.util.Comparison.GapChars, string1);
+ s2str = extractGaps(jalview.util.Comparison.GapChars, string2);
+
+ if (s1str.length() == 0 || s2str.length() == 0)