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

File adapter for bedRMod v2 files. More...

#include <OpenMS/FORMAT/BedRModFile.h>

Public Member Functions

 BedRModFile ()=default
 Default constructor.
 
 BedRModFile (const BedRModFile &)=default
 Copy constructor.
 
 ~BedRModFile ()=default
 Destructor.
 
void store (const std::string &out_file, const IdentificationData &id_data, const std::string &chebi_mapping_file="", const std::map< std::string, std::string > &reference_metadata={}) const
 Store RNA modification sites as bedRMod v2.
 

Detailed Description

File adapter for bedRMod v2 files.

Exports RNA modification sites from IdentificationData into the BED-style bedRMod v2 format.

Constructor & Destructor Documentation

◆ BedRModFile() [1/2]

BedRModFile ( )
default

Default constructor.

◆ BedRModFile() [2/2]

BedRModFile ( const BedRModFile &  )
default

Copy constructor.

◆ ~BedRModFile()

~BedRModFile ( )
default

Destructor.

Member Function Documentation

◆ store()

void store ( const std::string &  out_file,
const IdentificationData &  id_data,
const std::string &  chebi_mapping_file = "",
const std::map< std::string, std::string > &  reference_metadata = {} 
) const

Store RNA modification sites as bedRMod v2.

Canonical residues contribute to the frequency denominator but do not produce modification rows. Frequencies count distinct observations at each canonical-base site, including alternative hypotheses and overlapping parent mappings. One row aggregates each target parent, position and modification; its score is the minimum supporting PSM-level q-value (lower is better). Decoy parents and matches without assigned q-values are omitted. Callers must apply their chosen FDR threshold and ranking before export. Fragment columns list distinct supporting intervals; the mapping-count column is the maximum number of target mappings among supporting oligos. MODOMICS short names identify modifications without a positive ChEBI mapping.

Parameters
[in]out_fileOutput path for the bedRMod file.
[in]id_dataIdentification data containing RNA observation matches.
[in]chebi_mapping_fileOptional CSV mapping file with columns "mod" (or "name") and "chebi_id" (or "chebi id") and/or "modomics_short_name". The latter explicitly maps custom codes to registered MODOMICS names with the same formula and origin.
[in]reference_metadataOptional organism, assembly, annotation_source annotation_version, sequencing_platform, basecalling, bioinformatics_workflow, experiment and external_source values. Unspecified values are written as NA.
Exceptions
Exception::InvalidParameterif reference metadata contains a line break, or a modification cannot be represented by a valid MODOMICS dictionary name. Output is not opened before these checks succeed.
Exception::FileNotWritableif the output file cannot be opened.

Referenced by NucleicAcidSearchEngine::main_().