Source code for MSQuant: frmPeptideFilters.vb, MSQuant/msquant/src/GUI/forms/frmPeptideFilters.vb.

Table of contents page.

Home page for MSQuant.

'****************************************************************************
'* Copyright (C) 2004 Peter Mortensen and Matthias Mann                     *
'* This file is part of MSQuant.                                            *
'*                                                                          *
'* MSQuant is distributed under the terms of                                *
'* the GNU General Public License. See src/COPYING.TXT or                   *
'* <http://www.gnu.org/licenses/gpl.txt> for details.                       *
'*                                                                          *
'* MSQuant is free software; you can redistribute it                        *
'* and/or modify it under the terms of the GNU                              *
'* General Public License as published by the Free                          *
'* Software Foundation; either version 2 of the                             *
'* License, or (at your option) any later version.                          *
'*                                                                          *
'* MSQuant is distributed in the hope that it will be                       *
'* useful, but WITHOUT ANY WARRANTY; without even the                       *
'* implied warranty of MERCHANTABILITY or FITNESS FOR                       *
'* A PARTICULAR PURPOSE.  See the GNU General Public                        *
'* License for more details.                                                *
'*                                                                          *
'* You should have received a copy of the GNU General                       *
'* Public License along with MSQuant; if not, write to                      *
'* the Free Software Foundation, Inc., 59 Temple                            *
'* Place, Suite 330, Boston, MA  02111-1307  USA                            *
'*                                                                          *
'* Purpose: Windows dialog for peptide filter (restricted sequence          *
'*          length, charges, etc.)                                          *
'*                                                                          *
'****************************************************************************

'****************************************************************************
'*                               CEBI                                       *
'*                    Software Development Group                            *
'*                         Peter Mortensen                                  *
'*                E-mail: NUKESPAMMERSdrmortensen@get2netZZZZZZ.dk          *
'*                 WWW: http://www.cebi.sdu.dk/                             *
'*                                                                          *
'*  Program for post-processing of result from search in mass               *
'*    spectrometric data.                                                   *
'*                                                                          *
'*    FILENAME:   frmPeptideFilters.vb                                      *
'*    TYPE:  VISUAL_BASIC                                                   *
'*                                                                          *
'* CREATED: PM 2006-03-07   Vrs 1.0.                                      *
'* UPDATED: PM 2006-xx-xx                                                   *
'*                                                                          *
'****************************************************************************

Option Strict On
Option Explicit On 

Imports System.IO 'For Path class/functions

Imports System.Collections.Generic 'For Dictionary


Imports massSpectrometryBase 'For peptideFilterSpecificationStructure
Imports massSpectrometryBase.quantitation 'For QuantitationModes_moreGeneral.
Imports MolecularSharedStructures  'For quantModificationStructure.

Imports App 'For class quantApplication


'****************************************************************************
'*    <placeholder for header>                                              *
'****************************************************************************
Public Class frmPeptideFilters
    Inherits System.Windows.Forms.Form

    Const MODFILTERTYPE_INCLUDE As Integer = 443
    Const MODFILTERTYPE_EXCLUDE2 As Integer = 449

    Const HS_EXCLUDEMODS As Integer = 461

    'Not used.
    ''Private mParentForm As frmOptions
    'Private mParentForm As System.Windows.Forms.Form

    'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-27
    Public Event pepFilterDismissed( _
      ByVal aSender As Object, _
      ByVal anEvent As pepFilterEventArgs)

    Friend WithEvents txtEndMass As System.Windows.Forms.TextBox
    Friend WithEvents txtStartMass As System.Windows.Forms.TextBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents chkPeptidesQuantified As System.Windows.Forms.CheckBox
    Friend WithEvents chkPeptidesVerified As System.Windows.Forms.CheckBox
    Friend WithEvents chkOnlyHighestScoringUniquelyModified As System.Windows.Forms.CheckBox
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox

    Private mPeptideFilterSpecification As peptideFilterStructure
    Private mProgramDefaultFilter As peptideFilterStructure

    Friend WithEvents lblModFilter As System.Windows.Forms.Label

    'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-24
    'For storing result from the sub-dialog, modification filter.


    'Changed PM_EXCLUDE_MODFILTER 2008-06-30
    'Private mModIDlist As Generic.List(Of Integer)
    Private mIncludeModIDlist As Generic.List(Of Integer)
    Private mExcludeModIDlist2 As Generic.List(Of Integer)

    'Changed LOG 2008-10-08
    Private mDiffExcludeModIDlist3 As Generic.List(Of Integer)

    Friend WithEvents txtEndMassAccuracy As System.Windows.Forms.TextBox
    Friend WithEvents txtStartMassAccuracy As System.Windows.Forms.TextBox
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents btnProgramDefaults As System.Windows.Forms.Button
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents cbxRawFile As System.Windows.Forms.ComboBox

    Friend WithEvents lblExcludeModFilter As System.Windows.Forms.Label
    Friend WithEvents btnChangeExcludeModificationFilter As System.Windows.Forms.Button
    Friend WithEvents chkDifferentCharge As System.Windows.Forms.CheckBox
    Friend WithEvents chkDifferentRawFile As System.Windows.Forms.CheckBox
    Friend WithEvents chkDifferentModificationSet As System.Windows.Forms.CheckBox
    Friend WithEvents chkDifferentSILACdish As System.Windows.Forms.CheckBox
    Friend WithEvents chkOnlyHighestScoring2 As System.Windows.Forms.CheckBox
    Friend WithEvents Label7 As System.Windows.Forms.Label


    'Changed PM_RAWFILE_PEPFILTER 2007-11-17
    'For raw file filter.
    Private mGUIindex2code As Generic.List(Of Integer)
    Friend WithEvents chkDifferentModificationCounts As System.Windows.Forms.CheckBox
    Friend WithEvents lblDiffModSetExcludeModFilter As System.Windows.Forms.Label
    Friend WithEvents btnDifferentModSetExcludeModificationFilter As System.Windows.Forms.Button 'Code is either
    '  raw file ID or a code for all.

    Private mStartingUp As Boolean

    Private mApplication As quantApplication

    'Changed PM_RAWFILE_PEPFILTER 2007-11-16
    Private mRawFiles() As fileSpecStructure

    'Changed PM_SILAC_AWARE_PEPTIDEFILTERDIALOG 2008-10-05
    Private mSILACmods As Dictionary(Of Integer, Integer)


#Region " Windows Form Designer generated code "


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Public Sub New( _
        ByVal anInPeptideFilterSpecification As peptideFilterStructure, _
        ByRef anApp As quantApplication, _
        ByVal aChangableQuantVer As Boolean, _
        ByVal aChangableMassAcc As Boolean, _
        ByVal anInProgramDefaultFilter As peptideFilterStructure, _
        ByRef anInFilterTypeStr As String, _
        ByRef anInRawFiles() As fileSpecStructure, _
        ByRef aSILACmods As Dictionary(Of Integer, Integer) _
        )

        '  ByRef aParentForm As System.Windows.Forms.Form, _

        MyBase.New()

        mStartingUp = True

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

        Me.Init( _
          anInPeptideFilterSpecification, _
          anApp, _
          aChangableQuantVer, _
          aChangableMassAcc, _
          anInProgramDefaultFilter, _
          anInFilterTypeStr, _
          anInRawFiles, _
          aSILACmods)

        mStartingUp = False
    End Sub 'New


    'Form overrides dispose to clean up the component list.
    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub


    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents btnOK As System.Windows.Forms.Button
    Friend WithEvents btnCancel As System.Windows.Forms.Button
    Friend WithEvents btnChangeModificationFilter As System.Windows.Forms.Button
    Friend WithEvents txtStartSeqLen As System.Windows.Forms.TextBox
    Friend WithEvents txtEndSeqLen As System.Windows.Forms.TextBox
    Friend WithEvents txtEndCharge As System.Windows.Forms.TextBox
    Friend WithEvents txtStartCharge As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents txtEndScore As System.Windows.Forms.TextBox
    Friend WithEvents txtStartScore As System.Windows.Forms.TextBox
    Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox
    Friend WithEvents CheckBox2 As System.Windows.Forms.CheckBox
    Friend WithEvents CheckBox3 As System.Windows.Forms.CheckBox
    Friend WithEvents CheckBox4 As System.Windows.Forms.CheckBox
    Friend WithEvents CheckBox5 As System.Windows.Forms.CheckBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.Label1 = New System.Windows.Forms.Label
        Me.txtStartSeqLen = New System.Windows.Forms.TextBox
        Me.txtEndSeqLen = New System.Windows.Forms.TextBox
        Me.txtEndCharge = New System.Windows.Forms.TextBox
        Me.txtStartCharge = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.btnOK = New System.Windows.Forms.Button
        Me.btnCancel = New System.Windows.Forms.Button
        Me.btnChangeModificationFilter = New System.Windows.Forms.Button
        Me.Label4 = New System.Windows.Forms.Label
        Me.txtEndScore = New System.Windows.Forms.TextBox
        Me.txtStartScore = New System.Windows.Forms.TextBox
        Me.CheckBox1 = New System.Windows.Forms.CheckBox
        Me.CheckBox2 = New System.Windows.Forms.CheckBox
        Me.CheckBox3 = New System.Windows.Forms.CheckBox
        Me.CheckBox4 = New System.Windows.Forms.CheckBox
        Me.CheckBox5 = New System.Windows.Forms.CheckBox
        Me.txtEndMass = New System.Windows.Forms.TextBox
        Me.txtStartMass = New System.Windows.Forms.TextBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.chkPeptidesQuantified = New System.Windows.Forms.CheckBox
        Me.chkPeptidesVerified = New System.Windows.Forms.CheckBox
        Me.chkOnlyHighestScoringUniquelyModified = New System.Windows.Forms.CheckBox
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.lblModFilter = New System.Windows.Forms.Label
        Me.txtEndMassAccuracy = New System.Windows.Forms.TextBox
        Me.txtStartMassAccuracy = New System.Windows.Forms.TextBox
        Me.Label5 = New System.Windows.Forms.Label
        Me.btnProgramDefaults = New System.Windows.Forms.Button
        Me.Label3 = New System.Windows.Forms.Label
        Me.cbxRawFile = New System.Windows.Forms.ComboBox
        Me.lblExcludeModFilter = New System.Windows.Forms.Label
        Me.btnChangeExcludeModificationFilter = New System.Windows.Forms.Button
        Me.chkDifferentCharge = New System.Windows.Forms.CheckBox
        Me.chkDifferentRawFile = New System.Windows.Forms.CheckBox
        Me.chkDifferentModificationSet = New System.Windows.Forms.CheckBox
        Me.chkDifferentSILACdish = New System.Windows.Forms.CheckBox
        Me.chkOnlyHighestScoring2 = New System.Windows.Forms.CheckBox
        Me.Label7 = New System.Windows.Forms.Label
        Me.chkDifferentModificationCounts = New System.Windows.Forms.CheckBox
        Me.lblDiffModSetExcludeModFilter = New System.Windows.Forms.Label
        Me.btnDifferentModSetExcludeModificationFilter = New System.Windows.Forms.Button
        Me.GroupBox1.SuspendLayout()
        Me.SuspendLayout()
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(16, 347)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(121, 13)
        Me.Label1.TabIndex = 0
        Me.Label1.Text = "Sequence length range:"
        '
        'txtStartSeqLen
        '
        Me.txtStartSeqLen.Location = New System.Drawing.Point(152, 344)
        Me.txtStartSeqLen.Name = "txtStartSeqLen"
        Me.txtStartSeqLen.Size = New System.Drawing.Size(48, 20)
        Me.txtStartSeqLen.TabIndex = 25
        '
        'txtEndSeqLen
        '
        Me.txtEndSeqLen.Location = New System.Drawing.Point(215, 344)
        Me.txtEndSeqLen.Name = "txtEndSeqLen"
        Me.txtEndSeqLen.Size = New System.Drawing.Size(48, 20)
        Me.txtEndSeqLen.TabIndex = 27
        '
        'txtEndCharge
        '
        Me.txtEndCharge.Location = New System.Drawing.Point(215, 377)
        Me.txtEndCharge.Name = "txtEndCharge"
        Me.txtEndCharge.Size = New System.Drawing.Size(48, 20)
        Me.txtEndCharge.TabIndex = 31
        '
        'txtStartCharge
        '
        Me.txtStartCharge.Location = New System.Drawing.Point(152, 377)
        Me.txtStartCharge.Name = "txtStartCharge"
        Me.txtStartCharge.Size = New System.Drawing.Size(48, 20)
        Me.txtStartCharge.TabIndex = 29
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.Location = New System.Drawing.Point(16, 380)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(74, 13)
        Me.Label2.TabIndex = 3
        Me.Label2.Text = "Charge range:"
        '
        'btnOK
        '
        Me.btnOK.Location = New System.Drawing.Point(183, 520)
        Me.btnOK.Name = "btnOK"
        Me.btnOK.Size = New System.Drawing.Size(72, 24)
        Me.btnOK.TabIndex = 47
        Me.btnOK.Text = "&OK"
        '
        'btnCancel
        '
        Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.btnCancel.Location = New System.Drawing.Point(271, 520)
        Me.btnCancel.Name = "btnCancel"
        Me.btnCancel.Size = New System.Drawing.Size(72, 24)
        Me.btnCancel.TabIndex = 49
        Me.btnCancel.Text = "&Cancel"
        '
        'btnChangeModificationFilter
        '
        Me.btnChangeModificationFilter.Location = New System.Drawing.Point(19, 19)
        Me.btnChangeModificationFilter.Name = "btnChangeModificationFilter"
        Me.btnChangeModificationFilter.Size = New System.Drawing.Size(170, 24)
        Me.btnChangeModificationFilter.TabIndex = 1
        Me.btnChangeModificationFilter.Text = "&Must contain modifications:"
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.Location = New System.Drawing.Point(16, 413)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(104, 13)
        Me.Label4.TabIndex = 10
        Me.Label4.Text = "Mascot score range:"
        '
        'txtEndScore
        '
        Me.txtEndScore.Location = New System.Drawing.Point(215, 410)
        Me.txtEndScore.Name = "txtEndScore"
        Me.txtEndScore.Size = New System.Drawing.Size(48, 20)
        Me.txtEndScore.TabIndex = 35
        Me.txtEndScore.Text = "200"
        '
        'txtStartScore
        '
        Me.txtStartScore.Location = New System.Drawing.Point(152, 410)
        Me.txtStartScore.Name = "txtStartScore"
        Me.txtStartScore.Size = New System.Drawing.Size(48, 20)
        Me.txtStartScore.TabIndex = 33
        Me.txtStartScore.Text = "1"
        '
        'CheckBox1
        '
        Me.CheckBox1.Checked = True
        Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Checked
        Me.CheckBox1.Enabled = False
        Me.CheckBox1.Location = New System.Drawing.Point(420, 19)
        Me.CheckBox1.Name = "CheckBox1"
        Me.CheckBox1.Size = New System.Drawing.Size(152, 24)
        Me.CheckBox1.TabIndex = 14
        Me.CheckBox1.Text = "Exclude ZZZZ peptides"
        Me.CheckBox1.Visible = False
        '
        'CheckBox2
        '
        Me.CheckBox2.Checked = True
        Me.CheckBox2.CheckState = System.Windows.Forms.CheckState.Checked
        Me.CheckBox2.Enabled = False
        Me.CheckBox2.Location = New System.Drawing.Point(18, 19)
        Me.CheckBox2.Name = "CheckBox2"
        Me.CheckBox2.Size = New System.Drawing.Size(58, 16)
        Me.CheckBox2.TabIndex = 16
        Me.CheckBox2.Text = "CID"
        '
        'CheckBox3
        '
        Me.CheckBox3.Checked = True
        Me.CheckBox3.CheckState = System.Windows.Forms.CheckState.Checked
        Me.CheckBox3.Enabled = False
        Me.CheckBox3.Location = New System.Drawing.Point(18, 43)
        Me.CheckBox3.Name = "CheckBox3"
        Me.CheckBox3.Size = New System.Drawing.Size(58, 16)
        Me.CheckBox3.TabIndex = 17
        Me.CheckBox3.Text = "MPD"
        '
        'CheckBox4
        '
        Me.CheckBox4.Checked = True
        Me.CheckBox4.CheckState = System.Windows.Forms.CheckState.Checked
        Me.CheckBox4.Enabled = False
        Me.CheckBox4.Location = New System.Drawing.Point(18, 67)
        Me.CheckBox4.Name = "CheckBox4"
        Me.CheckBox4.Size = New System.Drawing.Size(58, 16)
        Me.CheckBox4.TabIndex = 18
        Me.CheckBox4.Text = "ECD"
        '
        'CheckBox5
        '
        Me.CheckBox5.Checked = True
        Me.CheckBox5.CheckState = System.Windows.Forms.CheckState.Checked
        Me.CheckBox5.Enabled = False
        Me.CheckBox5.Location = New System.Drawing.Point(18, 91)
        Me.CheckBox5.Name = "CheckBox5"
        Me.CheckBox5.Size = New System.Drawing.Size(58, 16)
        Me.CheckBox5.TabIndex = 19
        Me.CheckBox5.Text = "MS3"
        '
        'txtEndMass
        '
        Me.txtEndMass.Location = New System.Drawing.Point(215, 443)
        Me.txtEndMass.Name = "txtEndMass"
        Me.txtEndMass.Size = New System.Drawing.Size(48, 20)
        Me.txtEndMass.TabIndex = 39
        Me.txtEndMass.Text = "4000"
        '
        'txtStartMass
        '
        Me.txtStartMass.Location = New System.Drawing.Point(152, 443)
        Me.txtStartMass.Name = "txtStartMass"
        Me.txtStartMass.Size = New System.Drawing.Size(48, 20)
        Me.txtStartMass.TabIndex = 37
        Me.txtStartMass.Text = "1"
        '
        'Label6
        '
        Me.Label6.AutoSize = True
        Me.Label6.Location = New System.Drawing.Point(16, 446)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(88, 13)
        Me.Label6.TabIndex = 21
        Me.Label6.Text = "Mass range [Da]:"
        '
        'chkPeptidesQuantified
        '
        Me.chkPeptidesQuantified.Location = New System.Drawing.Point(19, 282)
        Me.chkPeptidesQuantified.Name = "chkPeptidesQuantified"
        Me.chkPeptidesQuantified.Size = New System.Drawing.Size(104, 16)
        Me.chkPeptidesQuantified.TabIndex = 21
        Me.chkPeptidesQuantified.Text = "Quantified only"
        '
        'chkPeptidesVerified
        '
        Me.chkPeptidesVerified.Location = New System.Drawing.Point(19, 260)
        Me.chkPeptidesVerified.Name = "chkPeptidesVerified"
        Me.chkPeptidesVerified.Size = New System.Drawing.Size(104, 16)
        Me.chkPeptidesVerified.TabIndex = 19
        Me.chkPeptidesVerified.Text = "Verified only"
        '
        'chkOnlyHighestScoringUniquelyModified
        '
        Me.chkOnlyHighestScoringUniquelyModified.Location = New System.Drawing.Point(255, 97)
        Me.chkOnlyHighestScoringUniquelyModified.Name = "chkOnlyHighestScoringUniquelyModified"
        Me.chkOnlyHighestScoringUniquelyModified.Size = New System.Drawing.Size(224, 24)
        Me.chkOnlyHighestScoringUniquelyModified.TabIndex = 1001
        Me.chkOnlyHighestScoringUniquelyModified.Text = "Only highest scoring uniquely modified"
        Me.chkOnlyHighestScoringUniquelyModified.Visible = False
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.CheckBox2)
        Me.GroupBox1.Controls.Add(Me.CheckBox3)
        Me.GroupBox1.Controls.Add(Me.CheckBox4)
        Me.GroupBox1.Controls.Add(Me.CheckBox5)
        Me.GroupBox1.Enabled = False
        Me.GroupBox1.Location = New System.Drawing.Point(420, 53)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(166, 118)
        Me.GroupBox1.TabIndex = 27
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Identification spectrum type"
        '
        'lblModFilter
        '
        Me.lblModFilter.AutoSize = True
        Me.lblModFilter.Location = New System.Drawing.Point(195, 25)
        Me.lblModFilter.Name = "lblModFilter"
        Me.lblModFilter.Size = New System.Drawing.Size(19, 13)
        Me.lblModFilter.TabIndex = 17
        Me.lblModFilter.Text = "<>"
        '
        'txtEndMassAccuracy
        '
        Me.txtEndMassAccuracy.Location = New System.Drawing.Point(215, 476)
        Me.txtEndMassAccuracy.Name = "txtEndMassAccuracy"
        Me.txtEndMassAccuracy.Size = New System.Drawing.Size(48, 20)
        Me.txtEndMassAccuracy.TabIndex = 43
        Me.txtEndMassAccuracy.Text = "99999"
        '
        'txtStartMassAccuracy
        '
        Me.txtStartMassAccuracy.Location = New System.Drawing.Point(152, 476)
        Me.txtStartMassAccuracy.Name = "txtStartMassAccuracy"
        Me.txtStartMassAccuracy.Size = New System.Drawing.Size(48, 20)
        Me.txtStartMassAccuracy.TabIndex = 41
        Me.txtStartMassAccuracy.Text = "0"
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(16, 476)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(130, 31)
        Me.Label5.TabIndex = 29
        Me.Label5.Text = "Post-recalibration mass accuracy range [ppm]:"
        '
        'btnProgramDefaults
        '
        Me.btnProgramDefaults.Location = New System.Drawing.Point(19, 520)
        Me.btnProgramDefaults.Name = "btnProgramDefaults"
        Me.btnProgramDefaults.Size = New System.Drawing.Size(120, 24)
        Me.btnProgramDefaults.TabIndex = 45
        Me.btnProgramDefaults.Text = "Program &defaults"
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(16, 314)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(123, 16)
        Me.Label3.TabIndex = 31
        Me.Label3.Text = "Raw file:"
        '
        'cbxRawFile
        '
        Me.cbxRawFile.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cbxRawFile.Location = New System.Drawing.Point(75, 309)
        Me.cbxRawFile.MaxDropDownItems = 20
        Me.cbxRawFile.Name = "cbxRawFile"
        Me.cbxRawFile.Size = New System.Drawing.Size(254, 21)
        Me.cbxRawFile.TabIndex = 23
        '
        'lblExcludeModFilter
        '
        Me.lblExcludeModFilter.AutoSize = True
        Me.lblExcludeModFilter.Location = New System.Drawing.Point(195, 58)
        Me.lblExcludeModFilter.Name = "lblExcludeModFilter"
        Me.lblExcludeModFilter.Size = New System.Drawing.Size(19, 13)
        Me.lblExcludeModFilter.TabIndex = 34
        Me.lblExcludeModFilter.Text = "<>"
        '
        'btnChangeExcludeModificationFilter
        '
        Me.btnChangeExcludeModificationFilter.Location = New System.Drawing.Point(19, 52)
        Me.btnChangeExcludeModificationFilter.Name = "btnChangeExcludeModificationFilter"
        Me.btnChangeExcludeModificationFilter.Size = New System.Drawing.Size(170, 24)
        Me.btnChangeExcludeModificationFilter.TabIndex = 3
        Me.btnChangeExcludeModificationFilter.Text = "Must ¬ contain modifications:"
        '
        'chkDifferentCharge
        '
        Me.chkDifferentCharge.AutoSize = True
        Me.chkDifferentCharge.Location = New System.Drawing.Point(40, 110)
        Me.chkDifferentCharge.Name = "chkDifferentCharge"
        Me.chkDifferentCharge.Size = New System.Drawing.Size(102, 17)
        Me.chkDifferentCharge.TabIndex = 7
        Me.chkDifferentCharge.Text = "Different charge"
        '
        'chkDifferentRawFile
        '
        Me.chkDifferentRawFile.AutoSize = True
        Me.chkDifferentRawFile.Location = New System.Drawing.Point(40, 134)
        Me.chkDifferentRawFile.Name = "chkDifferentRawFile"
        Me.chkDifferentRawFile.Size = New System.Drawing.Size(102, 17)
        Me.chkDifferentRawFile.TabIndex = 9
        Me.chkDifferentRawFile.Text = "Different raw file"
        '
        'chkDifferentModificationSet
        '
        Me.chkDifferentModificationSet.AutoSize = True
        Me.chkDifferentModificationSet.Checked = True
        Me.chkDifferentModificationSet.CheckState = System.Windows.Forms.CheckState.Checked
        Me.chkDifferentModificationSet.Location = New System.Drawing.Point(40, 158)
        Me.chkDifferentModificationSet.Name = "chkDifferentModificationSet"
        Me.chkDifferentModificationSet.Size = New System.Drawing.Size(147, 17)
        Me.chkDifferentModificationSet.TabIndex = 11
        Me.chkDifferentModificationSet.Text = "Different modification sets"
        '
        'chkDifferentSILACdish
        '
        Me.chkDifferentSILACdish.AutoSize = True
        Me.chkDifferentSILACdish.Enabled = False
        Me.chkDifferentSILACdish.Location = New System.Drawing.Point(40, 238)
        Me.chkDifferentSILACdish.Name = "chkDifferentSILACdish"
        Me.chkDifferentSILACdish.Size = New System.Drawing.Size(121, 17)
        Me.chkDifferentSILACdish.TabIndex = 17
        Me.chkDifferentSILACdish.Text = "Different SILAC dish"
        '
        'chkOnlyHighestScoring2
        '
        Me.chkOnlyHighestScoring2.AutoSize = True
        Me.chkOnlyHighestScoring2.Location = New System.Drawing.Point(19, 85)
        Me.chkOnlyHighestScoring2.Name = "chkOnlyHighestScoring2"
        Me.chkOnlyHighestScoring2.Size = New System.Drawing.Size(225, 17)
        Me.chkOnlyHighestScoring2.TabIndex = 5
        Me.chkOnlyHighestScoring2.Text = "Only highest scoring  in each protein, with:"
        '
        'Label7
        '
        Me.Label7.AutoSize = True
        Me.Label7.Location = New System.Drawing.Point(252, 124)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(34, 13)
        Me.Label7.TabIndex = 1002
        Me.Label7.Text = "<xyz>"
        Me.Label7.Visible = False
        '
        'chkDifferentModificationCounts
        '
        Me.chkDifferentModificationCounts.AutoSize = True
        Me.chkDifferentModificationCounts.Location = New System.Drawing.Point(64, 179)
        Me.chkDifferentModificationCounts.Name = "chkDifferentModificationCounts"
        Me.chkDifferentModificationCounts.Size = New System.Drawing.Size(160, 17)
        Me.chkDifferentModificationCounts.TabIndex = 13
        Me.chkDifferentModificationCounts.Text = "Different modification counts"
        '
        'lblDiffModSetExcludeModFilter
        '
        Me.lblDiffModSetExcludeModFilter.AutoSize = True
        Me.lblDiffModSetExcludeModFilter.Enabled = False
        Me.lblDiffModSetExcludeModFilter.Location = New System.Drawing.Point(264, 206)
        Me.lblDiffModSetExcludeModFilter.Name = "lblDiffModSetExcludeModFilter"
        Me.lblDiffModSetExcludeModFilter.Size = New System.Drawing.Size(19, 13)
        Me.lblDiffModSetExcludeModFilter.TabIndex = 1004
        Me.lblDiffModSetExcludeModFilter.Text = "<>"
        '
        'btnDifferentModSetExcludeModificationFilter
        '
        Me.btnDifferentModSetExcludeModificationFilter.Enabled = False
        Me.btnDifferentModSetExcludeModificationFilter.Location = New System.Drawing.Point(64, 200)
        Me.btnDifferentModSetExcludeModificationFilter.Name = "btnDifferentModSetExcludeModificationFilter"
        Me.btnDifferentModSetExcludeModificationFilter.Size = New System.Drawing.Size(191, 24)
        Me.btnDifferentModSetExcludeModificationFilter.TabIndex = 15
        Me.btnDifferentModSetExcludeModificationFilter.Text = "Do not consider modifications:"
        '
        'frmPeptideFilters
        '
        Me.AcceptButton = Me.btnOK
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.CancelButton = Me.btnCancel
        Me.ClientSize = New System.Drawing.Size(356, 570)
        Me.Controls.Add(Me.lblDiffModSetExcludeModFilter)
        Me.Controls.Add(Me.btnDifferentModSetExcludeModificationFilter)
        Me.Controls.Add(Me.chkDifferentModificationCounts)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.chkOnlyHighestScoring2)
        Me.Controls.Add(Me.chkDifferentSILACdish)
        Me.Controls.Add(Me.chkDifferentModificationSet)
        Me.Controls.Add(Me.chkDifferentRawFile)
        Me.Controls.Add(Me.chkDifferentCharge)
        Me.Controls.Add(Me.lblExcludeModFilter)
        Me.Controls.Add(Me.btnChangeExcludeModificationFilter)
        Me.Controls.Add(Me.cbxRawFile)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.btnProgramDefaults)
        Me.Controls.Add(Me.txtEndMassAccuracy)
        Me.Controls.Add(Me.txtStartMassAccuracy)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.lblModFilter)
        Me.Controls.Add(Me.GroupBox1)
        Me.Controls.Add(Me.chkOnlyHighestScoringUniquelyModified)
        Me.Controls.Add(Me.chkPeptidesQuantified)
        Me.Controls.Add(Me.chkPeptidesVerified)
        Me.Controls.Add(Me.txtEndMass)
        Me.Controls.Add(Me.txtStartMass)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.CheckBox1)
        Me.Controls.Add(Me.txtEndScore)
        Me.Controls.Add(Me.txtStartScore)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.btnChangeModificationFilter)
        Me.Controls.Add(Me.btnCancel)
        Me.Controls.Add(Me.btnOK)
        Me.Controls.Add(Me.txtEndCharge)
        Me.Controls.Add(Me.txtStartCharge)
        Me.Controls.Add(Me.txtEndSeqLen)
        Me.Controls.Add(Me.txtStartSeqLen)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "frmPeptideFilters"
        Me.Text = "Peptide filter"
        Me.GroupBox1.ResumeLayout(False)
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub Init( _
      ByVal anInFilter As peptideFilterStructure, _
      ByRef anApp As quantApplication, _
      ByVal aChangableQuantAndVer As Boolean, _
      ByVal aChangableMassAcc As Boolean, _
      ByVal anInProgramDefaultFilter As peptideFilterStructure, _
      ByRef anInFilterTypeStr As String, _
      ByRef anInRawFiles() As fileSpecStructure, _
      ByRef aSILACmods As Dictionary(Of Integer, Integer) _
      )
        'ByRef aParentForm As frmOptions
        'Old:
        '  ByRef aParentForm As System.Windows.Forms.Form, _

        mPeptideFilterSpecification = anInFilter

        'mParentForm = aParentForm

        mApplication = anApp

        'Changed PM_RAWFILE_PEPFILTER 2007-11-17
        mRawFiles = anInRawFiles 'Note: can be Nothing when it does
        '  not apply, e.g. before parsing.

        'Changed PM_SILAC_AWARE_PEPTIDEFILTERDIALOG 2008-10-05
        mSILACmods = aSILACmods

        mProgramDefaultFilter = anInProgramDefaultFilter

        'Changed PM_RAWFILE_PEPFILTER 2007-11-17
        mGUIindex2code = Nothing 'Flag if it does not apply (e.g.
        '  before parsing).

        'Dialog title line.
        Me.Text = "Peptide filter for " & anInFilterTypeStr & "."

        'Why do we do this effectively in constructor? Is it too earlier. Do
        'in Load event handler instead?
        fillInForm(anInFilter, anApp, anInRawFiles) 'Has side-effect...

        If Not aChangableQuantAndVer Then
            'E.g. filter for parsing.
            chkPeptidesVerified.Enabled = False
            chkPeptidesQuantified.Enabled = False
        Else
            'E.g. filter for export.
            Dim peter2 As Integer = 2
        End If

        If Not aChangableMassAcc Then
            'E.g. filter for parsing.
            txtStartMassAccuracy.Enabled = False
            txtEndMassAccuracy.Enabled = False
        Else
            'E.g. filter for export.
            Dim peter2 As Integer = 2
        End If
    End Sub 'Init


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Shared Sub makeRawListIncludingAll( _
      ByRef anInRawFiles() As fileSpecStructure, _
      ByRef anOutGUIstrings() As String, _
      ByRef anOutGUIindex2code As Generic.List(Of Integer) _
      )

        'Later: mapping from GUI index (selected by user) and raw file ID.

        Dim rawFiles As Integer = anInRawFiles.Length()
        Dim outLen As Integer = rawFiles + 1 '1: space for the all option.
        Dim outLastIndex As Integer = outLen - 1
        ReDim anOutGUIstrings(outLastIndex)

        anOutGUIindex2code = New Generic.List(Of Integer)(outLen)

        anOutGUIstrings(0) = "All raw files"
        anOutGUIindex2code.Add(-389) 'Some negative value.

        Dim idx As Integer = 1
        Dim someRawFile As fileSpecStructure
        For Each someRawFile In anInRawFiles

            Dim fileName As String = Path.GetFileName(someRawFile.path)

            anOutGUIstrings(idx) = fileName

            anOutGUIindex2code.Add(someRawFile.tag2)

            idx += 1
        Next 'Through raw files.

    End Sub 'makeRawListIncludingAll


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub fillInForm( _
      ByVal anInFilter As peptideFilterStructure, _
      ByRef anApp As quantApplication, _
      ByRef anInRawFiles() As fileSpecStructure _
      )

        'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-24
        'Changed by sub dialog. 
        'mModIDlist = anInFilterSpecification.peptideModificationFilter
        '
        'We need to make a deep copy as it should only be changed in the client
        'if this dialog is OK'ed - it is not enough that the sub-dialog is OK'ed.


        'Changed PM_EXCLUDE_MODFILTER 2008-06-30
        'mModIDlist = peptideFilterStructure.deepCopyModList( _
        '  anInFilter.pepModFilter3)
        mIncludeModIDlist = peptideFilterStructure.deepCopyModList( _
          anInFilter.pepIncludeModFilter3)
        lblModFilter.Text = _
          someStatic.formatShortModStr(mIncludeModIDlist, anApp)

        mExcludeModIDlist2 = peptideFilterStructure.deepCopyModList( _
          anInFilter.pepExcludeModFilter)
        lblExcludeModFilter.Text = _
          someStatic.formatShortModStr(mExcludeModIDlist2, anApp)

        txtStartCharge.Text = anInFilter.chargeMin.ToString
        txtEndCharge.Text = anInFilter.chargeMax.ToString

        txtStartSeqLen.Text = anInFilter.seqLengthMin.ToString
        txtEndSeqLen.Text = anInFilter.seqLengthMax.ToString

        'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-28
        txtStartMass.Text = anInFilter.massMin.ToString
        txtEndMass.Text = anInFilter.massMax.ToString

        If True Then 'Highest scoring stuff
            'For notational convenience...
            Dim hPars As highestScoringParametersStructure = _
              anInFilter.highestScoringParameters

            'Changed PM_PEPTIDEFILTER_HIGHESTSCORING 2006-05-19
            'chkOnlyHighestScoringUniquelyModified.Checked = _
            '  anInFilter.highestScoringUniquelyModified
            chkOnlyHighestScoring2.Checked = anInFilter.onlyHighestScoring
            chkDifferentCharge.Checked = hPars.differentCharge
            chkDifferentRawFile.Checked = hPars.differentRawFile
            chkDifferentModificationSet.Checked = hPars.differentModificationSet
            chkDifferentModificationCounts.Checked = _
              hPars.differentModificationCounts2

            'Changed PM_SILAC_AWARE_PEPTIDEFILTERDIALOG 2008-10-08
            If True Then 'Block. Excluded modifications from modification set.
                Dim diffExcludedMods2 As Dictionary(Of Integer, Integer) = _
                  hPars.differentModification_excludedMods2

                'Convert into a simple list for use in this dialog. This also
                'works as the deep copy (local copy).

                mDiffExcludeModIDlist3 = _
                  highestScoringParametersStructure.hash2list(diffExcludedMods2)

                lblDiffModSetExcludeModFilter.Text = _
                  someStatic.formatShortModStr(mDiffExcludeModIDlist3, anApp)
            End If

            chkDifferentSILACdish.Checked = hPars.differentSILACdish

            Me.updateSubControls(anInFilter.onlyHighestScoring)
        End If 'Block. Highest scoring stuff.


        'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-25
        txtStartScore.Text = anInFilter.scoreMin.ToString
        txtEndScore.Text = anInFilter.scoreMax2.ToString
        chkPeptidesVerified.Checked = anInFilter.verifiedOnly
        chkPeptidesQuantified.Checked = anInFilter.quantifiedOnly

        'Changed PM_MASSACC_PEPFILTER 2007-09-05
        txtStartMassAccuracy.Text = anInFilter.massAccuracyMin.ToString
        txtEndMassAccuracy.Text = anInFilter.massAccuracyMax.ToString

        'Changed PM_RAWFILE_PEPFILTER 2007-11-16
        If Not anInRawFiles Is Nothing Then

            Dim len As Integer = anInRawFiles.Length()
            Dim strs As String() = Nothing

            'Note: adds item for all (raw files).
            makeRawListIncludingAll(anInRawFiles, strs, mGUIindex2code)

            Me.cbxRawFile.Items.Clear()
            Dim someString As String
            For Each someString In strs
                Me.cbxRawFile.Items.Add(someString)
            Next

            If True Then 'Select the drop-down value
                Dim itemToSelectIndex As Integer = 0 'Default if not set below. For
                '  all raw files (no raw file filter). Assumes it is the first 
                '  in the values returned by makeRawListIncludingAll().

                Dim lastIndex As Integer = anInRawFiles.Length() - 1
                Dim j As Integer
                For j = 0 To lastIndex
                    Dim rawFileID As Integer = anInRawFiles(j).tag2

                    If rawFileID = anInFilter.rawFileID Then
                        itemToSelectIndex = j + 1 '1 as it is assumed the
                        '  first item is for all raw files.
                        Exit For 'No need to continue.
                    End If
                Next j
                Me.cbxRawFile.SelectedIndex = itemToSelectIndex
            End If
        Else
            Me.cbxRawFile.Enabled = False
        End If
    End Sub 'fillInForm


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub btnOK_Click( _
      ByVal aSender As System.Object, _
      ByVal anEvent As System.EventArgs) _
      Handles btnOK.Click

        'No validation for now....
        Try
            Dim newValues As peptideFilterStructure = _
              peptideFilterStructure.noPepFilter()

            newValues.chargeMin = CInt(txtStartCharge.Text)
            newValues.chargeMax = CInt(txtEndCharge.Text)

            newValues.seqLengthMin = CInt(txtStartSeqLen.Text)
            newValues.seqLengthMax = CInt(txtEndSeqLen.Text)

            'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-28
            newValues.massMin = CDbl(txtStartMass.Text)
            newValues.massMax = CDbl(txtEndMass.Text)

            'Changed PM_PEPTIDEFILTER_HIGHESTSCORING 2006-05-19
            'newValues.highestScoringUniquelyModified = _
            '  chkOnlyHighestScoringUniquelyModified.Checked
            newValues.onlyHighestScoring = _
              chkOnlyHighestScoring2.Checked

            Dim newPar As highestScoringParametersStructure
            newPar.differentCharge = chkDifferentCharge.Checked
            newPar.differentRawFile = chkDifferentRawFile.Checked
            newPar.differentModificationSet = _
              chkDifferentModificationSet.Checked
            newPar.differentModificationCounts2 = _
              chkDifferentModificationCounts.Checked

            newPar.differentModification_excludedMods2 = _
              highestScoringParametersStructure.list2hash( _
                mDiffExcludeModIDlist3)

            newPar.differentSILACdish = chkDifferentSILACdish.Checked
            newValues.highestScoringParameters = newPar

            'Changed PM_EXCLUDE_MODFILTER 2008-06-30
            ''Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-24
            'newValues.pepModFilter3 = mModIDlist
            newValues.pepIncludeModFilter3 = mIncludeModIDlist
            newValues.pepExcludeModFilter = mExcludeModIDlist2



            'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-25
            newValues.scoreMin = CDbl(txtStartScore.Text)
            newValues.scoreMax2 = CDbl(txtEndScore.Text)
            newValues.verifiedOnly = chkPeptidesVerified.Checked
            newValues.quantifiedOnly = chkPeptidesQuantified.Checked

            'Changed PM_MASSACC_PEPFILTER 2007-09-05
            newValues.massAccuracyMin = CDbl(txtStartMassAccuracy.Text)
            newValues.massAccuracyMax = CDbl(txtEndMassAccuracy.Text)

            'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-27
            newValues.tag2 = 0 'A non-negative value... Meaning a filter
            '  is in effect.

            newValues.tag1 = 0 'Not permanent. It is up to client to change this.

            'Changed PM_RAWFILE_PEPFILTER 2007-11-17
            newValues.rawFileID = -389 'Some negative value.
            If Not mGUIindex2code Is Nothing Then
                Dim GUIindex As Integer = cbxRawFile.SelectedIndex()
                newValues.rawFileID = mGUIindex2code(GUIindex)
            End If

            'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-27
            'mParentForm.setPeptideFilterSpecification(newValues)
            RaiseEvent pepFilterDismissed( _
              aSender, New pepFilterEventArgs(newValues))

            Me.Close()

        Catch exceptionObject As Exception
            AppCommon2.displayStandardExceptionInfo( _
              exceptionObject, _
              "Could not read values dialog in dialog. Some numeric fields may hold letters, etc.")
            Exit Sub
        End Try

    End Sub 'btnOK_Click


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub btnCancel_Click( _
      ByVal aSender As System.Object, _
      ByVal anEvent As System.EventArgs) _
      Handles btnCancel.Click

        Me.Close()
    End Sub 'btnCancel_Click


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub btnChangeModificationFilter_Click( _
      ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
      Handles btnChangeModificationFilter.Click

        Dim modFilterForm As New frmModificationFilter( _
          mIncludeModIDlist, Me, mApplication, _
          MODFILTERTYPE_INCLUDE, _
          "Peptide must have one or more of these modifications:", _
          mSILACmods)

        'Note: the dialog calls back to newModFilterList3() with any
        '      new setting of the modificatin list...


        modFilterForm.Show()
    End Sub 'btnChangeModificationFilter_Click


    'Changed PM_PEPTIDEFILTER_GENERALISED 2007-08-24. Moved from file frmOptions.vb.
    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Public Sub newModFilterList3( _
      ByRef anInModIDlist2 As Generic.List(Of Integer), _
      ByVal aToken As Integer)

        'aToken: to distinguish between include and exclude modification list.

        'Note: direct call of this function from the modification dialog.


        'Changed PM_REFACTOR 2008-10-08
        Dim labelStr As String = _
          someStatic.formatShortModStr(anInModIDlist2, mApplication)


        'Changed PM_EXCLUDE_MODFILTER 2008-06-30
        Select Case aToken
            Case MODFILTERTYPE_INCLUDE
                'Store it here for now...
                mIncludeModIDlist = anInModIDlist2
                lblModFilter.Text = labelStr


            Case MODFILTERTYPE_EXCLUDE2

                mExcludeModIDlist2 = anInModIDlist2
                lblExcludeModFilter.Text = labelStr


            Case HS_EXCLUDEMODS

                mDiffExcludeModIDlist3 = anInModIDlist2
                lblDiffModSetExcludeModFilter.Text = labelStr


            Case Else
                Trace.Assert(False, _
                  "PIL ASSERT. Select Case never fall-through")
        End Select
    End Sub 'newModFilterList3


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub btnProgramDefaults_Click( _
      ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
      Handles btnProgramDefaults.Click

        fillInForm(mProgramDefaultFilter, mApplication, mRawFiles) 'Has
        '  side-effect...
    End Sub 'btnProgramDefaults_Click


    'Changed PM_EXCLUDE_MODFILTER 2008-06-30
    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub btnChangeExcludeModificationFilter_Click( _
      ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
      Handles btnChangeExcludeModificationFilter.Click

        Dim modFilterForm2 As New frmModificationFilter( _
          mExcludeModIDlist2, Me, mApplication, _
          MODFILTERTYPE_EXCLUDE2, _
          "Peptide must ***NOT*** have any of these modifications:", _
          mSILACmods)

        'Note: the dialog calls back to newModFilterList3() with any
        '      new setting of the modificatin list...

        modFilterForm2.Show()
    End Sub 'btnChangeExcludeModificationFilter_Click


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub updateSubControls(ByVal aEnableSubControls As Boolean)

        chkDifferentCharge.Enabled = aEnableSubControls
        chkDifferentRawFile.Enabled = aEnableSubControls

        chkDifferentModificationSet.Enabled = aEnableSubControls
        chkDifferentModificationCounts.Enabled = aEnableSubControls

        chkDifferentSILACdish.Enabled = aEnableSubControls

        'Changed PM_SILAC_AWARE_PEPTIDEFILTERDIALOG 2008-10-08
        btnDifferentModSetExcludeModificationFilter.Enabled = aEnableSubControls

        lblDiffModSetExcludeModFilter.Enabled = aEnableSubControls
    End Sub 'updateSubCheckBoxes


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub chkOnlyHighestScoring2_CheckedChanged( _
      ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
      Handles chkOnlyHighestScoring2.CheckedChanged

        If Not mStartingUp Then
            'How do we get it from the event?
            Dim newVal As Boolean = chkOnlyHighestScoring2.Checked

            Me.updateSubControls(newVal)

            'If newVal = True Then
            '    newDisplayType(massErrorDisplayTypeEnum.enumByRetT)
            'End If
        Else
            Dim peter2 As Integer = 2
        End If
    End Sub 'chkOnlyHighestScoring2_CheckedChanged


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Private Sub btnDifferentModSetExcludeModificationFilter_Click( _
      ByVal aSender As System.Object, ByVal anEvent As System.EventArgs) _
      Handles btnDifferentModSetExcludeModificationFilter.Click

        Dim modFilterForm As New frmModificationFilter( _
          mDiffExcludeModIDlist3, Me, mApplication, _
          HS_EXCLUDEMODS, _
          "Exclude these modifications when determining distinct modification sets:", _
          mSILACmods)

        'Note: the dialog calls back to newModFilterList3() with any
        '      new setting of the modification list...

        modFilterForm.Show()
    End Sub 'btnDifferentModSetExcludeModificationFilter_Click


End Class 'frmPeptideFilters



'Helper class for pepFilterDismissed event.
'****************************************************************************
'*    <placeholder for header>                                              *
'****************************************************************************
Public Class pepFilterEventArgs
    Inherits System.EventArgs

    Private mFilter As peptideFilterStructure

    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Public Sub New(ByVal aSomeValue As peptideFilterStructure)
        mFilter = aSomeValue
    End Sub


    '****************************************************************************
    '*    <placeholder for header>                                              *
    '****************************************************************************
    Public Function getFilter() _
    As peptideFilterStructure

        Return mFilter 'What about deep copy???
    End Function 'getFilter


End Class 'pepFilterDismissedEventArgs



    

    

Generated by script codePublish.pl at 2009-01-05T15:20:59.