示例#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);
                }
            }
        }
示例#2
0
        private void alignStrings(int row, int col)
        {
            PairWiseAlign processor = new PairWiseAlign();
            dpTable table = new dpTable(m_sequences[row], m_sequences[col]);

            string[] alignments = table.Align();
            alignBoxA.Text = alignments[0];
            alignBoxB.Text = alignments[1];
        }
示例#3
0
 private void fillMatrix()
 {
     PairWiseAlign processor = new PairWiseAlign();
     for (int x = 0; x < NUMBER_OF_SEQUENCES; ++x)
     {
         for (int y = 0; y < NUMBER_OF_SEQUENCES; ++y)
         {
             m_resultTable.SetCell(x, y, processor.Align(m_sequences[x], m_sequences[y], m_resultTable, x, y));
         }
     }
 }
示例#4
0
 private void fillMatrix()
 {
     processor = new PairWiseAlign();
     for (int x = 0; x < NUMBER_OF_SEQUENCES; ++x)
     {
         for (int y = 0; y < NUMBER_OF_SEQUENCES; ++y)
         {
             m_resultTable.SetCell(x, y, processor.Align(m_sequences[x], m_sequences[y], m_resultTable, x, y));
         }
     }
 }
示例#5
0
文件: MainForm.cs 项目: jrasm91/cs312
 private void fillMatrix()
 {
     PairWiseAlign processor = new PairWiseAlign();
     for (int y = 0; y < m_sequences.Length; ++y)
     {
         for (int x = 0; x < m_sequences.Length; ++x)
         {
             m_resultTable.SetCell(x, y, processor.Align(m_sequences[x], m_sequences[y],m_resultTable,x,y));
             //m_resultTable.SetCell(x, y, ("(" + x + ", " + y + ")"));
         }
     }
 }
示例#6
0
文件: MainForm.cs 项目: jrasm91/cs312
 public MainForm()
 {
     InitializeComponent();
     m_dbController = new DatabaseController();
     m_dbController.EstablishConnection("../../db1.mdb");
     statusMessage.Text = "Loading Database...";
     // Set the number of Sequences to load below.
     m_sequences = m_dbController.ReadGeneSequences(10);
     m_resultTable = new ResultTable(this.dataGridViewResults, m_sequences.Length);
     statusMessage.Text = "Loaded Database.";
     processor = new PairWiseAlign();
 }
示例#7
0
 public MainForm()
 {
     InitializeComponent();
     m_dbController = new DatabaseController();
     m_dbController.EstablishConnection("../../db1.mdb");
     statusMessage.Text = "Loading Database...";
     // Set the number of Sequences to load below.
     m_sequences        = m_dbController.ReadGeneSequences(10);
     m_resultTable      = new ResultTable(this.dataGridViewResults, m_sequences.Length);
     statusMessage.Text = "Loaded Database.";
     processor          = new PairWiseAlign();
 }
        private void fillMatrix()
        {
            PairWiseAlign processor = new PairWiseAlign();

            for (int y = 0; y < m_sequences.Length; ++y)
            {
                for (int x = 0; x < m_sequences.Length; ++x)
                {
                    m_resultTable.SetCell(x, y, processor.Align(m_sequences[x], m_sequences[y], m_resultTable, x, y));
                    //m_resultTable.SetCell(x, y, ("(" + x + ", " + y + ")"));
                }
            }
        }
示例#9
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);
                }
            }
        }
示例#10
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);
         }
     }
 }
示例#11
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);
         }
     }
 }
示例#12
0
        private void dataGridViewResults_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            PairWiseAlign processor = new PairWiseAlign();

            alignmentTextBox.Lines = processor.Extract(m_sequences[e.RowIndex], m_sequences[e.ColumnIndex]);
        }