Example #1
0
        private void fillMatrix()
        {
            int alignLen = int.Parse(bandlengthBox.Text);

            ResultTable.Result result;
            PairWiseAlign      processor = new PairWiseAlign(alignLen);

            for (int x = 0; x < NUMBER_OF_SEQUENCES; ++x)
            {
                for (int y = x; y < NUMBER_OF_SEQUENCES; ++y)
                {
                    // if the two sequences are the same, fill that cell with -3*length because they match
                    if (x == y)
                    {
                        result = new ResultTable.Result();
                        PairWiseAlign align             = new PairWiseAlign();
                        int           lengthOfSequenceA = Math.Min(m_sequences[x].Sequence.Length, align.getMaxhCharactersToAlign());
                        int           score             = -3 * lengthOfSequenceA;
                        string        alignment         = m_sequences[x].Sequence.Substring(0, lengthOfSequenceA);
                        result.Update(score, alignment, alignment);
                    }
                    else
                    {
                        result = processor.Align_And_Extract(m_sequences[x], m_sequences[y], bandCheckBox.Checked);                 // ********* hook to the student's code
                    }
                    m_resultTable.AddResult(x, y, result);
                    m_resultTable.DisplayResult(x, y);
                }
            }
        }
Example #2
0
        private void fillMatrix()
        {
            int alignLen = int.Parse(bandlengthBox.Text);

            ResultTable.Result result;
            PairWiseAlign      processor = new PairWiseAlign(alignLen);

            for (int x = 0; x < NUMBER_OF_SEQUENCES; ++x)
            {
                for (int y = x; y < NUMBER_OF_SEQUENCES; ++y)
                {
                    result = processor.Align_And_Extract(m_sequences[x], m_sequences[y], bandCheckBox.Checked);                 // ********* hook to the student's code
                    m_resultTable.AddResult(x, y, result);
                    m_resultTable.DisplayResult(x, y);
                }
            }
        }
Example #3
0
 private void fillMatrix()
 {
     int alignLen = int.Parse(bandlengthBox.Text);
     ResultTable.Result result;
     PairWiseAlign processor = new PairWiseAlign(alignLen);
     for (int x = 0; x < NUMBER_OF_SEQUENCES; ++x)
     {
         for (int y = x; y < NUMBER_OF_SEQUENCES; ++y)
         {
             result = processor.Align_And_Extract(new Tuple<int,int>(x,y),m_sequences[x], m_sequences[y], bandCheckBox.Checked);                 // ********* hook to the student's code
             m_resultTable.AddResult(x,y,result);
             m_resultTable.DisplayResult(x, y);
         }
     }
 }
Example #4
0
 private void fillMatrix()
 {
     int alignLen = int.Parse(bandlengthBox.Text);
     ResultTable.Result result;
     PairWiseAlign processor = new PairWiseAlign(alignLen);
     for (int x = 0; x < NUMBER_OF_SEQUENCES; ++x)
     {
         for (int y = x; y < NUMBER_OF_SEQUENCES; ++y)
         {
             // if the two sequences are the same, fill that cell with -3*length because they match
             if (x == y)
             {
                 result = new ResultTable.Result();
                 PairWiseAlign align = new PairWiseAlign();
                 int lengthOfSequenceA = Math.Min(m_sequences[x].Sequence.Length, align.getMaxhCharactersToAlign());
                 int score = -3 * lengthOfSequenceA;
                 string alignment = m_sequences[x].Sequence.Substring(0, lengthOfSequenceA);
                 result.Update(score, alignment, alignment);
             }
             else
             {
                 result = processor.Align_And_Extract(m_sequences[x], m_sequences[y], bandCheckBox.Checked);                 // ********* hook to the student's code
             }
             m_resultTable.AddResult(x,y,result);
             m_resultTable.DisplayResult(x, y);
         }
     }
 }