Library-level equivalent of the FileInfo tool.
More...
#include <OpenMS/FORMAT/FileInfo.h>
|
| | FileInfo ()=default |
| |
| | ~FileInfo ()=default |
| |
| Result | run (const std::string &filename, const Options &options) |
| | Load filename (type auto-detected unless Options::forced_type set) and compute everything requested.
|
| |
| Result | run (const std::string &filename) |
| | Load filename with default options (no extra flags).
|
| |
| Result | runAll (const std::string &filename) |
| | Convenience: compute all content metrics (meta/processing/statistics on; no v/i/d/c).
|
| |
Library-level equivalent of the FileInfo tool.
Loads a mass-spectrometry-related file (type auto-detected unless forced via Options::forced_type), extracts all file-level information into a structured FileInfo::Result, and can render that result as the exact human-readable text / TSV that the FileInfo command line tool emits.
Computation (run()) is fully separated from formatting (toText()/toTSV()), so the result is consumable directly from C++ and pyOpenMS without any stream.
std::cout << r.
feature->num_features <<
"\n";
Library-level equivalent of the FileInfo tool.
Definition FileInfo.h:48
Result runAll(const std::string &filename)
Convenience: compute all content metrics (meta/processing/statistics on; no v/i/d/c).
std::optional< FeatureInfo > feature
Definition FileInfo.h:224
static std::string toText(const Result &r, const Options &options)
the master result aggregate
Definition FileInfo.h:220
◆ OpenMS::FileInfo::CorruptionInfo
| struct OpenMS::FileInfo::CorruptionInfo |
the -c (corrupt data) block
| Class Members |
|
vector< string > |
errors |
|
|
bool |
performed = false |
|
|
vector< string > |
warnings |
already-formatted message lines |
◆ OpenMS::FileInfo::DetailInfo
| struct OpenMS::FileInfo::DetailInfo |
detailed per-spectrum listing (the -d block); kept as pre-rendered lines
| Class Members |
|
vector< string > |
lines |
|
|
bool |
performed = false |
|
◆ OpenMS::FileInfo::ExperimentMeta
| struct OpenMS::FileInfo::ExperimentMeta |
experiment / instrument / sample / contact metadata (the -m block, peak files)
| Class Members |
|
vector< Contact > |
contacts |
|
|
string |
date |
|
|
vector< string > |
detectors |
|
|
string |
document_id |
|
|
string |
instrument_model |
|
|
string |
instrument_name |
|
|
string |
instrument_vendor |
|
|
vector< string > |
ion_sources |
|
|
vector< string > |
mass_analyzers |
|
|
bool |
present = false |
|
|
string |
sample_comment |
|
|
string |
sample_name |
|
|
string |
sample_organism |
|
◆ OpenMS::FileInfo::FastaInfo
| struct OpenMS::FileInfo::FastaInfo |
| Class Members |
|
map< string, UInt64 > |
ambiguity_counts |
buckets depend on is_nucleic_acid |
|
UInt64 |
dup_headers = 0 |
|
|
UInt64 |
dup_sequences = 0 |
|
|
bool |
is_nucleic_acid = false |
|
|
SummaryStatistics< vector< double > > |
length_stats |
|
|
UInt64 |
num_sequences = 0 |
|
|
map< char, UInt64 > |
residue_counts |
|
|
UInt64 |
seq_with_ambiguous = 0 |
|
|
UInt64 |
total_residues = 0 |
|
◆ OpenMS::FileInfo::FeatureInfo
| struct OpenMS::FileInfo::FeatureInfo |
feature / consensus specifics
| Class Members |
|
UInt64 |
assigned_ids = 0 |
|
|
map< Int, UInt64 > |
charges |
charge -> count |
|
map< UInt64, UInt64 > |
ids_per_element |
number of IDs -> number of elements |
|
bool |
is_consensus = false |
|
|
vector< MapColumn > |
map_columns |
|
|
UInt64 |
num_features = 0 |
number of (consensus) features |
|
map< UInt64, UInt64 > |
size_distribution |
consensus-feature size -> count |
|
double |
tic = 0.0 |
total ion current (featureXML) |
|
UInt64 |
unassigned_ids = 0 |
|
◆ OpenMS::FileInfo::FileMeta
| struct OpenMS::FileInfo::FileMeta |
general header block (always populated)
| Class Members |
|
string |
file_name |
|
|
Type |
file_type = FileTypes::UNKNOWN |
|
|
string |
file_type_name |
FileTypes::typeToName(file_type) |
◆ OpenMS::FileInfo::IdentInfo
| struct OpenMS::FileInfo::IdentInfo |
identification specifics (idXML / mzIdentML)
| Class Members |
|
double |
avg_peptide_length = 0.0 |
|
|
string |
db_name |
|
|
string |
db_version |
|
|
UInt64 |
matched_spectra = 0 |
|
|
map< string, UInt64 > |
modification_counts |
|
|
UInt64 |
modified_tophits = 0 |
|
|
UInt64 |
non_redundant_peptides = 0 |
|
|
UInt64 |
non_redundant_protein_hits = 0 |
|
|
UInt64 |
num_runs = 0 |
|
|
UInt64 |
peptide_hits = 0 |
|
|
UInt64 |
protein_hits = 0 |
|
|
double |
psms_per_spectrum = 0.0 |
|
|
vector< string > |
search_engines |
"engine (version)" |
|
string |
taxonomy |
|
◆ OpenMS::FileInfo::MzTabInfo
| struct OpenMS::FileInfo::MzTabInfo |
◆ OpenMS::FileInfo::NamedStats
| struct OpenMS::FileInfo::NamedStats |
one named SummaryStatistics block; title is the label used in both renderers
◆ OpenMS::FileInfo::Options
| struct OpenMS::FileInfo::Options |
what to compute (mirrors the CLI flags; lets callers opt into expensive work)
| Class Members |
|
bool |
check_corrupt = false |
-c |
|
bool |
check_index = false |
-i |
|
bool |
detailed = false |
-d |
|
Type |
forced_type = FileTypes::UNKNOWN |
== CLI -in_type |
|
bool |
meta = false |
-m |
|
bool |
processing = false |
-p |
|
bool |
statistics = false |
-s |
|
bool |
validate = false |
-v |
◆ OpenMS::FileInfo::ProcessingStep
| struct OpenMS::FileInfo::ProcessingStep |
one data-processing step (the -p block)
| Class Members |
|
vector< string > |
actions |
|
|
string |
completion_time |
|
|
string |
software_name |
|
|
string |
software_version |
|
◆ OpenMS::FileInfo::Range
| struct OpenMS::FileInfo::Range |
one [min,max] interval for a single dimension; present==false => "<none>"
| Class Members |
|
double |
max = 0.0 |
|
|
double |
min = 0.0 |
|
|
bool |
present = false |
|
◆ OpenMS::FileInfo::Ranges
| struct OpenMS::FileInfo::Ranges |
MSExperiment carries four range categories; non-MSExperiment maps fill only combined.
◆ OpenMS::FileInfo::RangeSet
| struct OpenMS::FileInfo::RangeSet |
the four range dimensions FileInfo reports for a map / spectrum group
| Class Members |
|
bool |
has_mobility = false |
whether the mobility dimension applies at all |
|
Range |
intensity |
|
|
Range |
mobility |
ion mobility (only filled when the source carries it) |
|
Range |
mz |
mass-to-charge |
|
Range |
rt |
retention time (seconds) |
◆ OpenMS::FileInfo::Result
| struct OpenMS::FileInfo::Result |
the master result aggregate
◆ OpenMS::FileInfo::ValidationInfo
| struct OpenMS::FileInfo::ValidationInfo |
the -v (schema/semantic validation) and -i (indexed mzML) blocks
| Class Members |
|
string |
detail |
captured validator output (re-emitted verbatim) |
|
vector< string > |
errors |
semantic validation |
|
bool |
index_checked = false |
|
|
bool |
index_valid = false |
|
|
UInt64 |
indexed_chromatograms = 0 |
|
|
UInt64 |
indexed_spectra = 0 |
|
|
bool |
performed = false |
|
|
string |
schema_version |
|
|
bool |
supported = true |
|
|
bool |
valid = false |
|
|
vector< string > |
warnings |
|
◆ FileInfo()
◆ ~FileInfo()
◆ report_()
Single computation+rendering core: loads in (already type-detected as in_type), writes the human-readable / TSV report to os / os_tsv, and populates r. Mirrors the historical TOPPFileInfo::outputTo_ so CLI output stays byte-identical.
◆ run() [1/2]
| Result run |
( |
const std::string & |
filename | ) |
|
|
inline |
Load filename with default options (no extra flags).
- See also
- run(filename, options) for the exception contract.
References FileInfo::run().
Referenced by FileInfo::run().
◆ run() [2/2]
| Result run |
( |
const std::string & |
filename, |
|
|
const Options & |
options |
|
) |
| |
Load filename (type auto-detected unless Options::forced_type set) and compute everything requested.
- Exceptions
-
◆ runAll()
| Result runAll |
( |
const std::string & |
filename | ) |
|
Convenience: compute all content metrics (meta/processing/statistics on; no v/i/d/c).
- See also
- run for throws.
◆ toText() [1/2]
| static std::string toText |
( |
const Result & |
r | ) |
|
|
inlinestatic |
◆ toText() [2/2]
| static std::string toText |
( |
const Result & |
r, |
|
|
const Options & |
options |
|
) |
| |
|
static |
Return the human-readable rendering produced by run() (== the FileInfo CLI -out output, cached in r).
- Note
options is accepted for API symmetry only; the rendering reflects the Options passed to run().
◆ toTSV() [1/2]
| static std::string toTSV |
( |
const Result & |
r | ) |
|
|
inlinestatic |
◆ toTSV() [2/2]
| static std::string toTSV |
( |
const Result & |
r, |
|
|
const Options & |
options |
|
) |
| |
|
static |
Return the TSV rendering produced by run() (== the FileInfo CLI -out_tsv output, cached in r).
- Note
options is accepted for API symmetry only; the rendering reflects the Options passed to run().