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

Writer for the feature-quantification (.TXT) table required by GNPS Feature-Based Molecular Networking. More...

#include <OpenMS/FORMAT/GNPSQuantificationFile.h>

Static Public Member Functions

static void store (const ConsensusMap &consensus_map, const std::string &output_file)
 Write the FBMN feature-quantification table.
 

Detailed Description

Writer for the feature-quantification (.TXT) table required by GNPS Feature-Based Molecular Networking.

For each consensus feature in a ConsensusMap, this writer emits one row giving the consensus-level rt_cf, mz_cf, intensity_cf, charge_cf, width_cf, quality_cf (in that order), optionally followed by IIMN columns if Constants::UserParam::IIMN_ROW_ID is set on the first feature, followed by per-map sub-feature columns. The file starts with #MAP and #CONSENSUS header lines and one MAP row per ConsensusMap::getColumnHeaders entry (id, filename, label, size). The format matches the schema at https://ccms-ucsd.github.io/GNPSDocumentation/featurebasedmolecularnetworking/#feature-quantification-table.

The file is required for FBMN (in contrast to the optional meta-value table). Produced by the GNPSExport tool.

Member Function Documentation

◆ store()

static void store ( const ConsensusMap consensus_map,
const std::string &  output_file 
)
static

Write the FBMN feature-quantification table.

Output structure (tab-separated, written via SVOutStream):

  • "#MAP\\tid\\tfilename\\tlabel\\tsize" header.
  • "#CONSENSUS\\trt_cf\\tmz_cf\\tintensity_cf\\tcharge_cf\\twidth_cf\\tquality_cf" header, followed by IIMN columns (IIMN_ROW_ID, IIMN_BEST_ION, IIMN_ADDUCT_PARTNERS, IIMN_ANNOTATION_NETWORK_NUMBER) iff the first consensus feature carries IIMN_ROW_ID, then per-map sub-feature columns "rt_&lt;i&gt;\\tmz_&lt;i&gt;\\tintensity_&lt;i&gt;\\tcharge_&lt;i&gt;\\twidth_&lt;i&gt;".
  • One MAP row per consensus_map.getColumnHeaders entry.
  • One CONSENSUS row per consensus feature; missing per-map sub-features are filled with empty strings.
Parameters
[in]consensus_mapConsensus map whose column headers and features drive the rows.
[in]output_fileDestination path for the TXT file (overwritten if it exists).

Referenced by TOPPGNPSExport::main_().