Esempio n. 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);
                }
            }
        }
Esempio n. 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];
        }
Esempio n. 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));
         }
     }
 }
Esempio n. 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));
         }
     }
 }
Esempio n. 5
0
 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 + ")"));
         }
     }
 }
Esempio n. 6
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();
 }
Esempio n. 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 + ")"));
                }
            }
        }
Esempio n. 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);
                }
            }
        }
Esempio n. 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);
         }
     }
 }
Esempio n. 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);
         }
     }
 }
Esempio n. 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]);
        }