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

ConsensusXMLFile Class Reference
[File IO]

This class provides Input functionality for ConsensusMaps and Output functionality for alignments and quantitation. More...

#include <OpenMS/FORMAT/ConsensusXMLFile.h>

Inheritance diagram for ConsensusXMLFile:
XMLHandler XMLFile ProgressLogger DefaultHandler

List of all members.

Public Member Functions

 ConsensusXMLFile ()
 Default constructor.
 ~ConsensusXMLFile ()
 Destructor.
void load (const String &filename, ConsensusMap &map)
 Loads a consensus map from file.
void store (const String &filename, const ConsensusMap &consensus_map)
 Stores a consensus map to file.
PeakFileOptionsgetOptions ()
 Mutable access to the options for loading/storing.
const PeakFileOptionsgetOptions () const
 Non-mutable access to the options for loading/storing.

Protected Member Functions

virtual void endElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname)
virtual void startElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname, const xercesc::Attributes &attributes)
virtual void characters (const XMLCh *const chars, const XMLSize_t length)
void writePeptideIdentification_ (const String &filename, std::ostream &os, const PeptideIdentification &id, const String &tag_name, UInt indentation_level)
 Writes a peptide identification to a stream (for assigned/unassigned peptide identifications).

Protected Attributes

PeakFileOptions options_
 Options that can be set.
MetaInfoInterfacelast_meta_
 Pointer to last read object as a MetaInfoInterface, or null.
ProteinIdentification prot_id_
 Temporary protein ProteinIdentification.
PeptideIdentification pep_id_
 Temporary peptide ProteinIdentification.
ProteinHit prot_hit_
 Temporary protein hit.
PeptideHit pep_hit_
 Temporary peptide hit.
Map< String, Stringproteinid_to_accession_
 Map from protein id to accession.
Map< String, Sizeaccession_to_id_
 Map from search identifier concatenated with protein accession to id.
Map< String, Stringidentifier_id_
 Map from identification run identifier to file xs:id (for linking peptide identifications to the corresponding run).
Map< String, Stringid_identifier_
 Map from file xs:id to identification run identifier (for linking peptide identifications to the corresponding run).
ProteinIdentification::SearchParameters search_param_
 Temporary search parameters file.
UInt progress_
Temporary variables for parsing

ConsensusMapconsensus_map_
ConsensusFeature act_cons_element_
DPosition< 2 > pos_
DoubleReal it_
UInt last_map_

Detailed Description

This class provides Input functionality for ConsensusMaps and Output functionality for alignments and quantitation.

This class can be used to load the content of a consensusXML file into a ConsensusMap or to save the content of an ConsensusMap object into an XML file.

A documented schema for this format can be found at http://open-ms.sourceforge.net/schemas/.

Todo:
Take care that unique ids are assigned properly by TOPP tools before calling ConsensusXMLFile::store(). There will be a message on LOG_INFO but we will make no attempt to fix the problem in this class. (all developers)

Constructor & Destructor Documentation

Default constructor.

~ConsensusXMLFile (  ) 

Destructor.


Member Function Documentation

virtual void characters ( const XMLCh *const   chars,
const XMLSize_t  length 
) [protected, virtual]
virtual void endElement ( const XMLCh *  const,
const XMLCh *  const,
const XMLCh *const   qname 
) [protected, virtual]
PeakFileOptions& getOptions (  ) 

Mutable access to the options for loading/storing.

const PeakFileOptions& getOptions (  )  const

Non-mutable access to the options for loading/storing.

void load ( const String filename,
ConsensusMap map 
)

Loads a consensus map from file.

Exceptions:
Exception::FileNotFound is thrown if the file could not be opened
Exception::ParseError is thrown if an error occurs during parsing
virtual void startElement ( const XMLCh *  const,
const XMLCh *  const,
const XMLCh *const   qname,
const xercesc::Attributes &  attributes 
) [protected, virtual]
void store ( const String filename,
const ConsensusMap consensus_map 
)

Stores a consensus map to file.

Exceptions:
Exception::UnableToCreateFile is thrown if the file name is not writable
Exception::IllegalArgument is thrown if the consensus map is not valid
void writePeptideIdentification_ ( const String filename,
std::ostream &  os,
const PeptideIdentification id,
const String tag_name,
UInt  indentation_level 
) [protected]

Writes a peptide identification to a stream (for assigned/unassigned peptide identifications).


Member Data Documentation

Map from search identifier concatenated with protein accession to id.

Map from file xs:id to identification run identifier (for linking peptide identifications to the corresponding run).

Map from identification run identifier to file xs:id (for linking peptide identifications to the corresponding run).

DoubleReal it_ [protected]
UInt last_map_ [protected]

Pointer to last read object as a MetaInfoInterface, or null.

Options that can be set.

PeptideHit pep_hit_ [protected]

Temporary peptide hit.

Temporary peptide ProteinIdentification.

DPosition<2> pos_ [protected]
UInt progress_ [protected]
ProteinHit prot_hit_ [protected]

Temporary protein hit.

Temporary protein ProteinIdentification.

Map from protein id to accession.

Temporary search parameters file.


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