Source code for MSQuant: MSQuantCommon_obsolete.vb, SqlInt/src/MSQuantCommon_obsolete.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: old stuff to be removed, including old quantitation modes       *
'*          stuff                                                           *
'*                                                                          *
'*                                                                          *
'****************************************************************************

'****************************************************************************
'*                               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:   MSQuantCommon_obsolete.vb                                 *
'*    TYPE:  VISUAL_BASIC                                                   *
'*                                                                          *
'* CREATED: PM 2005-04-19   Vrs 1.0.  Moved from somewhere else.            *
'* UPDATED: PM 2005-xx-xx                                                   *
'*                                                                          *
'****************************************************************************


'Note: newer class, QuantitationModes_moreGeneral, is (currently)
'      somewhere else.


Imports MolecularSharedStructures


Namespace obsolete
    'Put in here at a later date: simpleModificationSpecification, 
    '  SortByGUIIndexOrder, QuantitationModes, etc.

End Namespace 'obsolete


'****************************************************************************
'd$ <summary>
'd$   Purpose: namespace general description
'd$   <see cref="T:VBXMLDoc.CVBXMLDoc" />.
'd$   <isUnitTest></isUnitTest>
'd$   <applicationname>test_rawDataFileHandling</applicationname>
'd$   <author>Peter Mortensen</author>
'd$   <seealso>http://www.cebi.sdu.dk/</seealso>
'd$   <codetype>PLATFORM independent / GUI</codetype>
'd$ </summary>
Namespace massSpectrometryBase


    'Changed PM_MARKER_DELETE 2007-03-14
    ' Delete at any time
    '
    ' 'Changed PM_GENERALISED_QUANT_MODE 2003-12-07
    ' '****************************************************************************
    ' '*  SUBROUTINE NAME:   SortByGUIIndexOrder                                  *
    ' 'd$ <summary> N/A. ...  
    ' 'd$      Note: xyz                    </summary>
    ' Class SortByGUIIndexOrder
    '     Implements System.Collections.Generic.IComparer( _
    '       Of quantitationModeStructure)
    '     Function Compare( _
    '       ByVal aItem1 As quantitationModeStructure, _
    '       ByVal aItem2 As quantitationModeStructure) _
    '       As Integer _
    '       Implements _
    '         System.Collections.Generic.IComparer( _
    '           Of quantitationModeStructure).Compare
    ' 
    '         Dim toReturn As Integer = 0
    '         If aItem1.xxxGUInameIndex > aItem2.xxxGUInameIndex Then
    '             toReturn = 1
    '         Else
    '             If aItem1.xxxGUInameIndex < aItem2.xxxGUInameIndex Then
    '                 toReturn = -1
    '             Else
    '                 'Equal.... 
    '                 Dim peter9 As Integer = 9
    '             End If
    '         End If
    '         Return toReturn
    '     End Function 'Compare
    ' End Class 'SortByGUIIndexOrder


    '****************************************************************************
    'd$ <summary>
    'd$   Purpose: Handles the user defined quantitaion modes.
    'd$            It was created because putting it the application object
    'd$            would create intolerable dependencies for
    'd$            the DTASuperCharge project.
    'd$ 
    'd$   <see cref="T:VBXMLDoc.CVBXMLDoc" />.
    'd$   <applicationname>test_rawDataFileHandling</applicationname>
    'd$   <author>Peter Mortensen</author>
    'd$   <seealso>http://www.cebi.sdu.dk/</seealso>
    'd$   <codetype>PLATFORM independent / GUI</codetype>
    'd$ </summary>
    Public NotInheritable Class QuantitationModes

        'Changed PM_GENERALISED_QUANT_MODE 2003-12-06

        'Dim mQuantSpecList As ArrayList 'Type is quantitationModeStructure
        Dim mQuantSpecList2 As Generic.List(Of quantitationModeStructure)

        Dim mQuantModList As ArrayList 'Type is quantModification


        '****************************************************************************
        '*  SUBROUTINE NAME:   New                                                  *
        'd$ <summary>Constructor</summary>
        Public Sub New()
            MyBase.New() 'Is this necessary? Yes!

            'InitializeComponent()    Is this necessary??
        End Sub 'New()


        'Changed PM_MARKER_DELETE 2007-03-14
        ' Delete at any time
        '
        ' 'Changed PM_QUANTMODES_VERSIONING 2004-02-19
        ' '****************************************************************************
        ' '*    <placeholder for header>                                              *
        ' '****************************************************************************
        ' Public Shared Function defaultQuantModefields() _
        '   As quantitationModeStructure
        ' 
        '     Dim toReturn As quantitationModeStructure
        '     toReturn.uniqueID = -1
        '     toReturn.numberOfMods = 0
        '     toReturn.firstModID = 0
        '     toReturn.secondModID = 0
        '     toReturn.GUIname = "Unknown quantitation mode"
        '     toReturn.xxxGUInameIndex = -1
        '     toReturn.baseModification = 0
        ' 
        '     Return toReturn
        ' End Function 'defaultQuantModefields


        'Changed PM_MARKER_DELETE 2007-03-14
        ' Delete at any time
        '
        ' 'Changed PM_GENERALISED_QUANT_MODE 2003-12-04
        ' '****************************************************************************
        ' '*    <placeholder for header>                                              *
        ' '****************************************************************************
        ' Public Shared Sub old_addNewQuantMode( _
        '   ByVal aUniqueID As Integer, ByVal aNumberOfMods As Integer, _
        '   ByVal aFirstModID As Integer, ByVal aSecondModID As Integer, _
        '   ByVal aGUIname As String, ByVal aGUInameIndex As Integer, _
        '   ByVal aBaseModification As Integer, _
        '   ByRef anInOutQuantSpecList2 As Generic.List(Of quantitationModeStructure))
        '     'Old:
        '     '  ByRef anInOutQuantSpecList As ArrayList
        ' 
        '     Dim newQuant As quantitationModeStructure = _
        '       defaultQuantModefields()
        '     newQuant.uniqueID = aUniqueID
        '     newQuant.numberOfMods = aNumberOfMods
        '     newQuant.firstModID = aFirstModID
        '     newQuant.secondModID = aSecondModID
        '     newQuant.GUIname = aGUIname
        '     newQuant.xxxGUInameIndex = aGUInameIndex
        ' 
        '     newQuant.baseModification = aBaseModification
        ' 
        '     anInOutQuantSpecList2.Add(newQuant)
        ' End Sub 'old_addNewQuantMode


        '****************************************************************************
        '*  SUBROUTINE NAME:   getFullQuantDefinition                               *
        'd$ <summary> N/A </summary>
        Public Sub getFullQuantDefinitions( _
          ByRef anOutFullQuantDefinitions As _
            fullQuantDefinitionsStructure)

            anOutFullQuantDefinitions = _
              New fullQuantDefinitionsStructure
            anOutFullQuantDefinitions.quantSpecList2 = mQuantSpecList2
            anOutFullQuantDefinitions.quantModList = mQuantModList
        End Sub 'getFullQuantDefinitions


        '****************************************************************************
        '*  SUBROUTINE NAME:   setFullQuantDefinitions                              *
        'd$ <summary> N/A </summary>
        Public Sub setFullQuantDefinitions( _
          ByRef anInFullQuantDefinitions As _
            fullQuantDefinitionsStructure)

            mQuantSpecList2 = anInFullQuantDefinitions.quantSpecList2
            mQuantModList = anInFullQuantDefinitions.quantModList
        End Sub 'setFullQuantDefinitions


        'Changed PM_GENERALISED_QUANT_MODE 2003-12-07
        '****************************************************************************
        '*    <placeholder for header>                                              *
        '****************************************************************************
        Public Function isNoQuantitationMode(ByVal aQuantModeCode As Integer) _
          As Boolean

            Dim toReturn As Boolean = False
            Dim found As Boolean = False 'For error checking

            Dim quantModeItem As quantitationModeStructure
            For Each quantModeItem In mQuantSpecList2
                If quantModeItem.uniqueID = aQuantModeCode Then
                    toReturn = quantModeItem.numberOfMods = 0
                    found = True
                    Exit For
                End If
            Next
            Trace.Assert(found, _
               "PIL ASSERT. Unknown quantitation code: " & aQuantModeCode)

            Return toReturn
        End Function 'isNoQuantitationMode


        'Changed PM_GENERALISED_QUANT_MODE 2003-12-07
        '****************************************************************************
        '*    <placeholder for header>                                              *
        '****************************************************************************
        Public Function getQuantitationMode( _
          ByVal aQuantModeCode As Integer) _
          As quantitationModeStructure

            Dim toReturn As quantitationModeStructure
            toReturn.GUIname = Nothing 'Keep compiler happy.

            toReturn.uniqueID = -1 'For error chekcing

            Dim quantModeItem As quantitationModeStructure
            For Each quantModeItem In mQuantSpecList2
                If quantModeItem.uniqueID = aQuantModeCode Then
                    toReturn = quantModeItem
                    Exit For
                End If
            Next
            Trace.Assert(toReturn.uniqueID >= 0, _
              "PIL ASSERT. Unknown quantitation code: " & aQuantModeCode)

            Return toReturn
        End Function 'getQuantitationMode


        'Is this function needed????
        'Changed PM_GENERALISED_QUANT_MODE 2003-12-08
        '****************************************************************************
        '*    <placeholder for header>                                              *
        '****************************************************************************
        Public Function getQuantModification7( _
          ByVal aQuantModificationCode As Integer) _
          As quantModificationStructure

            Dim toReturn As quantModificationStructure = _
              massSpectrometryBase.quantitation.QuantitationModes_moreGeneral.blankQuantModification() 'Keep compiler happy.

            toReturn.quantModificationID = -1 'For error chekcing

            Dim quantModificationItem As quantModificationStructure
            For Each quantModificationItem In mQuantModList
                If quantModificationItem.quantModificationID = aQuantModificationCode Then
                    toReturn = quantModificationItem
                    Exit For
                End If
            Next
            Trace.Assert(toReturn.quantModificationID >= 0, _
              "PIL ASSERT. Unknown quantitation modification code: " & _
              aQuantModificationCode)

            Return toReturn
        End Function 'getQuantModification


        '****************************************************************************
        '*    <placeholder for header>                                              *
        '****************************************************************************
        Public Function getQuantModificationsList() _
          As ArrayList 'Type is quantModification.

            Return mQuantModList
        End Function 'getQuantModificationsList


        '****************************************************************************
        '*    <placeholder for header>                                              *
        '****************************************************************************
        Public Function getFirstQuantitationCode() As Integer
            Dim toReturn As Integer = -1

            Trace.Assert(mQuantSpecList2.Count > 0, "PIL ASSERT. mQuantSpecList is empty!")
            Dim firstInList As quantitationModeStructure = mQuantSpecList2(0)
            toReturn = firstInList.uniqueID
            Return toReturn
        End Function 'getFirstQuantitationCode


        'Changed PM_QUANTGENERAL_PREPARATION 2006-07-13. Needed?
        ' '****************************************************************************
        ' '*    <placeholder for header>                                              *
        ' '*      anInList: type is quantModCount                                     *
        ' '****************************************************************************
        ' Public Function constructSimpleModificationList2( _
        '   ByRef anInList As ArrayList) As ArrayList
        ' 
        '     Dim toReturn As ArrayList = New ArrayList 'Type is simpleModificationSpecification
        '     If Not anInList Is Nothing Then
        '         Dim inputItem As modificationCountStructure
        '         For Each inputItem In anInList
        ' 
        '             Dim ID As Integer = inputItem.quantModificationID
        '             Dim quantInfo As quantModificationStructure = _
        '               getQuantModification(ID)
        ' 
        '             Dim outItem As massSpectrometryBase.quantitation.simpleModificationSpecification
        '             outItem.diffFromBase = quantInfo.massDiffFromBase
        '             outItem.AA = quantInfo.AA
        '             toReturn.Add(outItem)
        '         Next
        '     End If
        '     Return toReturn
        ' End Function 'constructSimpleModificationList


    End Class 'QuantitationModes


End Namespace 'massSpectrometryBase




    

    

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