コード例 #1
0
    def test_peptide_unmodified(self):

        # check that the total mass, mz and composition is correct
        pep = peptide.Peptide('LIGPTSVVMGR')
        self.assertAlmostEqual(pep.mass, 1128.63251433)
        self.assertEqual(pep._getComposition(), {
            'H': 86,
            'C': 49,
            'S': 1,
            'O': 13,
            'N': 14
        })
        self.assertAlmostEqual(pep.getMZ(1), 1129.63979083)
コード例 #2
0
    def test_peptide_with_modifications(self):

        # check that the total mass, mz and composition is correct
        # pep = peptide.Peptide('LIGPTSVVMGR', modifications={ 9: self.mods.mods_TPPcode['R[166]'] }) #M[147]
        pep = peptide.Peptide('LIGPTSVVMGR',
                              modifications={
                                  9: self.mods.mods_TPPcode['M[147]']
                              })  #M[147]
        self.assertAlmostEqual(pep.mass, 1144.62742895)
        self.assertEqual(pep._getComposition(), {
            'H': 86,
            'C': 49,
            'S': 1,
            'O': 14,
            'N': 14
        })
        self.assertAlmostEqual(pep.getMZ(1), 1145.63470545)
コード例 #3
0
    def setUp(self):
        self.mods = modifications.Modifications()
        self.phospho = self.mods.mods_unimods[21]
        self.oxi = self.mods.mods_unimods[35]

        self.mypep = peptide.Peptide('LIGPTSVVMGR',
                                     modifications={
                                         9: self.mods.mods_TPPcode['M[147]']
                                     })  #M[147]
        self.mypep2 = peptide.Peptide('LIGPTSVVMGR')
        self.mypep3 = peptide.Peptide('ELVISLIVESS',
                                      modifications={
                                          5: self.phospho,
                                          10: self.phospho
                                      })
        self.isoform1 = peptide.Peptide('ELVISLIVESS',
                                        modifications={
                                            5: self.phospho,
                                            11: self.phospho
                                        })
        self.isoform2 = peptide.Peptide('ELVISLIVESS',
                                        modifications={
                                            10: self.phospho,
                                            11: self.phospho
                                        })
        self.mypep4 = peptide.Peptide('MHGGTGFAGIDSSSPEVK',
                                      modifications={
                                          1: self.oxi,
                                          5: self.phospho
                                      })
        self.isoform4_1 = peptide.Peptide('MHGGTGFAGIDSSSPEVK',
                                          modifications={
                                              1: self.oxi,
                                              5: self.phospho
                                          })
        self.isoform4_2 = peptide.Peptide('MHGGTGFAGIDSSSPEVK',
                                          modifications={
                                              1: self.oxi,
                                              12: self.phospho
                                          })
        self.isoform4_3 = peptide.Peptide('MHGGTGFAGIDSSSPEVK',
                                          modifications={
                                              1: self.oxi,
                                              13: self.phospho
                                          })
        self.isoform4_4 = peptide.Peptide('MHGGTGFAGIDSSSPEVK',
                                          modifications={
                                              1: self.oxi,
                                              14: self.phospho
                                          })
        self.notisoform4 = peptide.Peptide('MHGGTGFAGIDSSSPEVK',
                                           modifications={14: self.phospho})
コード例 #4
0
 def test_peptide_with_modifications_2(self):
     mypep = peptide.Peptide('LMGPTSVVMGR',
                             modifications={
                                 9: self.mods.mods_TPPcode['M[147]'],
                                 2: self.mods.mods_TPPcode['M[147]']
                             })  #M[147]
コード例 #5
0
 def test_create_peptide(self):
     p = peptide.Peptide('PEPTIDE')