示例#1
0
    protected void OnPeptideSelected(object obj, EventArgs e)
    {
        TreeSelection selection = (obj as TreeView).Selection;
        TreeModel     model;
        TreeIter      iter;

        if (!selection.GetSelected(out model, out iter))
        {
            return;
        }
        int i = int.Parse(model.GetPath(iter).ToString());
        //model.GetValue(iter,0);
        Peptide f = m_Mapper.Peptides[i];

        textviewFrag.Buffer.Text = "Protein list: ";
        foreach (Protein p in f.Proteins)
        {
            textviewFrag.Buffer.Text += p.ID + " ";
        }
        textviewFrag.Buffer.Text += "\nRuns: ";
        foreach (int run in f.Runs)
        {
            textviewFrag.Buffer.Text += run + " ";
        }
        textviewFrag.Buffer.Text += "\nPTMs: ";
        if (f.Variants.Count == 1)
        {
            textviewFrag.Buffer.Text += Peptide.Variant2Str(f.LastVariant);
        }
        else
        {
            i = 1;
            foreach (List <PTM> v in f.Variants)
            {
                textviewFrag.Buffer.Text += "\n\tVariant #" + (i++) + ": " + Peptide.Variant2Str(v);
            }
        }
    }