OpenMS
Loading...
Searching...
No Matches
OBODataProvider Class Reference

Loads ResidueModification data from an OBO ontology file (PSI-MOD or XLMOD). More...

#include <OpenMS/CHEMISTRY/OBODataProvider.h>

Inheritance diagram for OBODataProvider:
[legend]
Collaboration diagram for OBODataProvider:
[legend]

Public Member Functions

 OBODataProvider (const String &filename, bool cross_links_only=false)
 
std::vector< std::unique_ptr< ResidueModification > > loadModifications () override
 Load modifications from whatever source this provider wraps.
 
- Public Member Functions inherited from ModificationDataProvider
virtual ~ModificationDataProvider ()=default
 

Private Attributes

String filename_
 
bool cross_links_only_
 

Detailed Description

Loads ResidueModification data from an OBO ontology file (PSI-MOD or XLMOD).

Parses OBO format files and returns modifications as unique_ptr. The cross_links_only flag controls filtering:

  • false (default): returns all modifications EXCEPT cross-linkers (reactionSites==2). Used by ModificationsDB for PSI-MOD.obo and XLMOD.obo (mono-links only).
  • true: returns only cross-linkers (reactionSites==2), skipping mono-links. Used by CrossLinksDB for XLMOD.obo.

Constructor & Destructor Documentation

◆ OBODataProvider()

OBODataProvider ( const String filename,
bool  cross_links_only = false 
)
explicit
Parameters
filenamePath to an OBO file (resolved via File::find)
cross_links_onlyIf true, return only cross-linkers; if false, exclude them

Member Function Documentation

◆ loadModifications()

std::vector< std::unique_ptr< ResidueModification > > loadModifications ( )
overridevirtual

Load modifications from whatever source this provider wraps.

Returns
Vector of modifications with ownership transferred to caller.
Note
Providers may only be called once. Subsequent calls may return empty results.

Implements ModificationDataProvider.

Member Data Documentation

◆ cross_links_only_

bool cross_links_only_
private

◆ filename_

String filename_
private