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

FeatureXMLFile Class Reference
[File IO]

This class provides Input/Output functionality for feature maps. More...

#include <OpenMS/FORMAT/FeatureXMLFile.h>

Inheritance diagram for FeatureXMLFile:
XMLHandler XMLFile ProgressLogger DefaultHandler

List of all members.

Public Member Functions

void load (const String &filename, FeatureMap<> &feature_map)
 loads the file with name filename into map.
Size loadSize (const String &filename)
void store (const String &filename, const FeatureMap<> &feature_map)
 stores the map feature_map in file with name filename.
FeatureFileOptionsgetOptions ()
 Mutable access to the options for loading/storing.
const FeatureFileOptionsgetOptions () const
 Non-mutable access to the options for loading/storing.
Constructors and Destructor

 FeatureXMLFile ()
 Default constructor.
 ~FeatureXMLFile ()
 Destructor.

Protected Member Functions

void resetMembers_ ()
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 writeFeature_ (const String &filename, std::ostream &os, const Feature &feat, const String &identifier_prefix, UInt64 identifier, UInt indentation_level)
 Writes a feature to a stream.
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).
void updateCurrentFeature_ (bool create)
 update the pointer to the current feature

Protected Attributes

Int disable_parsing_
Featurecurrent_feature_
 points to the last open <feature> tag (possibly a subordinate feature)
FeatureMap< Feature > * map_
 Feature map pointer for reading.
FeatureFileOptions options_
 Options that can be set.
bool size_only_
 only parse until "count" tag is reached (used in loadSize())
Size expected_size_
 holds the putative size given in count
UInt dim_
 current dimension of the feature position, quality, or convex hull point
bool in_description_
 for downward compatibility, all tags in the old description must be ignored
Int subordinate_feature_level_
 level in Feature stack during parsing
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.
temporary data structures to hold parsed data

ModelDescription< 2 > model_desc_
Param param_
ConvexHull2D::PointArrayType current_chull_
DPosition< 2 > hull_position_

Detailed Description

This class provides Input/Output functionality for feature maps.

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 FeatureXMLFile::store(). There will be a message on LOG_INFO but we will make no attempt to fix the problem in this class. (all developers)
Note:
This format will eventually be replaced by the HUPO-PSI AnalysisXML (mzIdentML and mzQuantML) formats!

Constructor & Destructor Documentation

FeatureXMLFile (  ) 

Default constructor.

~FeatureXMLFile (  ) 

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]
const FeatureFileOptions& getOptions (  )  const

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

FeatureFileOptions& getOptions (  ) 

Mutable access to the options for loading/storing.

void load ( const String filename,
FeatureMap<> &  feature_map 
)

loads the file with name filename into map.

Exceptions:
Exception::FileNotFound is thrown if the file could not be opened
Exception::ParseError is thrown if an error occurs during parsing
Size loadSize ( const String filename  ) 
void resetMembers_ (  )  [protected]
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 FeatureMap<> &  feature_map 
)

stores the map feature_map in file with name filename.

Exceptions:
Exception::UnableToCreateFile is thrown if the file could not be created
void updateCurrentFeature_ ( bool  create  )  [protected]

update the pointer to the current feature

Parameters:
create If true, a new (empty) Feature is added at the appropriate subordinate_feature_level_
void writeFeature_ ( const String filename,
std::ostream &  os,
const Feature feat,
const String identifier_prefix,
UInt64  identifier,
UInt  indentation_level 
) [protected]

Writes a feature to a stream.

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.

Feature* current_feature_ [protected]

points to the last open <feature> tag (possibly a subordinate feature)

UInt dim_ [protected]

current dimension of the feature position, quality, or convex hull point

Int disable_parsing_ [protected]

allows for early return in parsing functions when certain sections should be ignored <=0 - parsing ON >0 - this number of tags have been entered that forbid parsing and need to be exited before parsing continues

Size expected_size_ [protected]

holds the putative size given in count

DPosition<2> hull_position_ [protected]

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).

bool in_description_ [protected]

for downward compatibility, all tags in the old description must be ignored

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

FeatureMap<Feature>* map_ [protected]

Feature map pointer for reading.

ModelDescription<2> model_desc_ [protected]

Options that can be set.

Param param_ [protected]
PeptideHit pep_hit_ [protected]

Temporary peptide hit.

Temporary peptide ProteinIdentification.

ProteinHit prot_hit_ [protected]

Temporary protein hit.

Temporary protein ProteinIdentification.

Map from protein id to accession.

Temporary search parameters file.

bool size_only_ [protected]

only parse until "count" tag is reached (used in loadSize())

level in Feature stack during parsing


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