Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

PepXMLFile Class Reference
[File IO]

Used to load and store PepXML files. More...

#include <OpenMS/FORMAT/PepXMLFile.h>

Inheritance diagram for PepXMLFile:
XMLHandler XMLFile DefaultHandler

List of all members.

Classes

struct  AminoAcidModification

Public Member Functions

 PepXMLFile ()
 Constructor.
virtual ~PepXMLFile ()
 Destructor.
void load (const String &filename, std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides, const String &experiment_name, const MSExperiment<> &experiment, bool use_precursor_data=false)
 Loads peptide sequences with modifications out of a PepXML file.
void load (const String &filename, std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides, const String &experiment_name="")
 load function with empty defaults for some parameters (see above)
void store (const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
 Stores idXML as PepXML file.

Protected Member Functions

virtual void endElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname)
 Docu in base class.
virtual void startElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname, const xercesc::Attributes &attributes)
 Docu in base class.

Private Member Functions

void makeScanMap_ ()
 Fill scan_map_.
void readRTMZCharge_ (const xercesc::Attributes &attributes)
 Read RT, m/z, charge information from attributes of "spectrum_query".
void matchModification_ (const DoubleReal mass, const String &origin, String &modification_description)
 find modification name given a modified AA mass

Private Attributes

std::vector
< ProteinIdentification > * 
proteins_
 Pointer to the list of identified proteins.
std::vector
< PeptideIdentification > * 
peptides_
 Pointer to the list of identified peptides.
const MSExperimentexperiment_
 Pointer to the experiment from which the pepXML file was generated.
String exp_name_
 Name of the associated experiment (filename of the data file, extension will be removed).
String search_engine_
 Set name of search engine.
bool use_precursor_data_
 Get RT and m/z for peptide ID from precursor scan (should only matter for RT)?
std::map< Size, Sizescan_map_
 Mapping between scan number in the pepXML file and index in the corresponding MSExperiment.
DoubleReal rt_tol_
 Retention time and mass-to-charge tolerance.
DoubleReal mz_tol_
Element hydrogen_
 Hydrogen data (for mass types).
bool wrong_experiment_
 Do current entries belong to the experiment of interest (for pepXML files that bundle results from different experiments)?
bool seen_experiment_
 Have we seen the experiment of interest at all?
std::vector< std::vector
< ProteinIdentification >
::iterator > 
current_proteins_
 References to currently active ProteinIdentifications.
ProteinIdentification::SearchParameters params_
 Search parameters of the current identification run.
ProteinIdentification::DigestionEnzyme enzyme_
 Enyzme associated with the current identification run.
PeptideIdentification current_peptide_
 PeptideIdentification instance currently being processed.
PeptideHit peptide_hit_
 PeptideHit instance currently being processed.
String current_sequence_
 Sequence of the current peptide hit.
DoubleReal rt_
 RT and m/z of current PeptideIdentification.
DoubleReal mz_
Int charge_
 Precursor ion charge.
UInt search_id_
 ID of current search result.
String prot_id_
 Identifier linking PeptideIdentifications and ProteinIdentifications.
DateTime date_
 Date the pepXML file was generated.
DoubleReal hydrogen_mass_
 Mass of a hydrogen atom (monoisotopic/average depending on case).
std::vector< std::pair< String,
Size > > 
current_modifications_
 The modifications of the current peptide hit (position is 1-based).
std::vector
< AminoAcidModification
fixed_modifications_
 Fixed aminoacid modifications.
std::vector
< AminoAcidModification
variable_modifications_
 Variable aminoacid modifications.

Detailed Description

Used to load and store PepXML files.

This class is used to load and store documents that implement the schema of PepXML files.


Constructor & Destructor Documentation

PepXMLFile (  ) 

Constructor.

virtual ~PepXMLFile (  )  [virtual]

Destructor.


Member Function Documentation

virtual void endElement ( const XMLCh *  const,
const XMLCh *  const,
const XMLCh *const   qname 
) [protected, virtual]

Docu in base class.

void load ( const String filename,
std::vector< ProteinIdentification > &  proteins,
std::vector< PeptideIdentification > &  peptides,
const String experiment_name,
const MSExperiment<> &  experiment,
bool  use_precursor_data = false 
)

Loads peptide sequences with modifications out of a PepXML file.

Parameters:
filename PepXML file to load
proteins Protein identification output
peptides Peptide identification output
experiment_name Experiment file name, which is used to extract the corresponding search results from the PepXML file.
experiment MS run to extract the retention times from (PepXML may contain only scan numbers).
use_precursor_data Use m/z and RT of the precursor (instead of the RT of the MS2 spectrum) for the peptide?
Exceptions:
Exception::FileNotFound is thrown if the file could not be opened
Exception::ParseError is thrown if an error occurs during parsing
void load ( const String filename,
std::vector< ProteinIdentification > &  proteins,
std::vector< PeptideIdentification > &  peptides,
const String experiment_name = "" 
)

load function with empty defaults for some parameters (see above)

Exceptions:
Exception::FileNotFound is thrown if the file could not be opened
Exception::ParseError is thrown if an error occurs during parsing
void makeScanMap_ (  )  [private]

Fill scan_map_.

void matchModification_ ( const DoubleReal  mass,
const String origin,
String modification_description 
) [private]

find modification name given a modified AA mass

Matches a mass of a modified AA to a mod in our modification db For ambigious mods, the first (arbitrary) is returned If no mod is found an error is issued and the return string is empty

Note:
A duplicate of this function is also used in ProtXMLFile
Parameters:
mass Modified AA's mass
origin AA one letter code
modification_description [out] Name of the modification, e.g. 'Carboxymethyl (C)'
void readRTMZCharge_ ( const xercesc::Attributes &  attributes  )  [private]

Read RT, m/z, charge information from attributes of "spectrum_query".

virtual void startElement ( const XMLCh *  const,
const XMLCh *  const,
const XMLCh *const   qname,
const xercesc::Attributes &  attributes 
) [protected, virtual]

Docu in base class.

void store ( const String filename,
std::vector< ProteinIdentification > &  protein_ids,
std::vector< PeptideIdentification > &  peptide_ids 
)

Stores idXML as PepXML file.

Exceptions:
Exception::UnableToCreateFile is thrown if the file could not be opened for writing

Member Data Documentation

Int charge_ [private]

Precursor ion charge.

std::vector<std::pair<String, Size> > current_modifications_ [private]

The modifications of the current peptide hit (position is 1-based).

PeptideIdentification instance currently being processed.

std::vector<std::vector<ProteinIdentification>::iterator> current_proteins_ [private]

References to currently active ProteinIdentifications.

Sequence of the current peptide hit.

DateTime date_ [private]

Date the pepXML file was generated.

Enyzme associated with the current identification run.

String exp_name_ [private]

Name of the associated experiment (filename of the data file, extension will be removed).

const MSExperiment* experiment_ [private]

Pointer to the experiment from which the pepXML file was generated.

Fixed aminoacid modifications.

Element hydrogen_ [private]

Hydrogen data (for mass types).

Mass of a hydrogen atom (monoisotopic/average depending on case).

DoubleReal mz_ [private]
DoubleReal mz_tol_ [private]

Search parameters of the current identification run.

PeptideHit instance currently being processed.

std::vector<PeptideIdentification>* peptides_ [private]

Pointer to the list of identified peptides.

String prot_id_ [private]

Identifier linking PeptideIdentifications and ProteinIdentifications.

std::vector<ProteinIdentification>* proteins_ [private]

Pointer to the list of identified proteins.

DoubleReal rt_ [private]

RT and m/z of current PeptideIdentification.

DoubleReal rt_tol_ [private]

Retention time and mass-to-charge tolerance.

std::map<Size, Size> scan_map_ [private]

Mapping between scan number in the pepXML file and index in the corresponding MSExperiment.

Set name of search engine.

UInt search_id_ [private]

ID of current search result.

bool seen_experiment_ [private]

Have we seen the experiment of interest at all?

bool use_precursor_data_ [private]

Get RT and m/z for peptide ID from precursor scan (should only matter for RT)?

Variable aminoacid modifications.

bool wrong_experiment_ [private]

Do current entries belong to the experiment of interest (for pepXML files that bundle results from different experiments)?


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:54 using doxygen 1.7.1