1
// -*- Mode: C++; tab-width: 2; -*-
4
// --------------------------------------------------------------------------
5
// OpenMS Mass Spectrometry Framework
6
// --------------------------------------------------------------------------
7
// Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
9
// This library is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU Lesser General Public
11
// License as published by the Free Software Foundation; either
12
// version 2.1 of the License, or (at your option) any later version.
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
19
// You should have received a copy of the GNU Lesser General Public
20
// License along with this library; if not, write to the Free Software
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
// --------------------------------------------------------------------------
24
// $Maintainer: Andreas Bertsch $
25
// $Authors: Andreas Bertsch $
26
// --------------------------------------------------------------------------
29
#ifndef OPENMS_ANALYSIS_ID_PILISIDENTIFICATION_H
30
#define OPENMS_ANALYSIS_ID_PILISIDENTIFICATION_H
32
#include <OpenMS/ANALYSIS/ID/PILISModel.h>
33
#include <OpenMS/METADATA/PeptideIdentification.h>
34
#include <OpenMS/KERNEL/StandardTypes.h>
41
// forward declarations
42
class PeakSpectrumCompareFunctor;
45
@brief This class actually implements a complete ProteinIdentification run with PILIS
47
The PILISIdentification class needs a PILISModel and a PILISSequenceDB to generate
48
identifications. Simply call getIdentifications with a RichPeakMap.
50
@htmlinclude OpenMS_PILISIdentification.parameters
54
class OPENMS_DLLAPI PILISIdentification : public DefaultParamHandler
59
/** @name constructors and destructors
62
/// default constructor
63
PILISIdentification();
66
PILISIdentification(const PILISIdentification& source);
69
virtual ~PILISIdentification();
73
PILISIdentification& operator = (const PILISIdentification& source);
78
/// sets the sequence DB to be used for the ProteinIdentification runs
79
//void setSequenceDB(const SuffixArrayPeptideFinder& sapf);
81
/// sets the model to be used for the ProteinIdentification run
82
void setModel(PILISModel* hmm_model);
84
/// performs an ProteinIdentification run on a RichPeakMap
85
void getIdentifications(const std::vector<std::map<String, UInt> >& candidates, std::vector<PeptideIdentification>& ids, const RichPeakMap& exp);
87
/// performs an ProteinIdentification run on a PeakSpectrum
88
void getIdentification(const std::map<String, UInt>& candidates, PeptideIdentification& id, const RichPeakSpectrum& spectrum);
93
/// fast method to create spectra for pre-scoring
94
void getSpectrum_(RichPeakSpectrum& spec, const String& sequence, int charge);
96
/// performs a pre-scoring of the given spec with very simple spectra from the candidate peptides
97
void getPreIdentification_(PeptideIdentification& id, const RichPeakSpectrum& spec, const std::map<String, UInt>& cand_peptides);
99
/// performs a ProteinIdentification via spectra comparison with the PILISModel spectrum generator
100
void getFinalIdentification_(PeptideIdentification& id, const RichPeakSpectrum& spec, const PeptideIdentification& pre_id);
102
/// returns the model pointer
103
PILISModel* getPILISModel_();
105
/// returns the sequence database pointer
106
//PILISSequenceDB* getSequenceDB_();
107
//SuffixArrayPeptideFinder* getSequenceDB_();
109
/// the sequence database for the candidate peptides
110
//PILISSequenceDB* sequence_db_;
111
//SuffixArrayPeptideFinder sapf_;
113
/// the model for spectra simulation
114
PILISModel* hmm_model_;
116
/// amino acids weights for the simple spectra generator
117
Map<char, double> aa_weight_;
119
/// scorer for pre comparison
120
PeakSpectrumCompareFunctor* pre_scorer_;
122
/// scorer for spectra comparison
123
PeakSpectrumCompareFunctor* scorer_;
125
/// a peaks, just to not instantiate it over and over again
129
std::vector<RichPeakSpectrum> sim_specs_;
131
/// flag whether the istance has a internal sequence db
132
bool own_sequence_db_;
134
/// flag whether the istance has a internal model
137
/// update members method from DefaultParamHandler to update the members
138
void updateMembers_();