![]() |
OpenMS
|
Whole-collection preflight for the QPX Parquet export (-out_qpx)
More...
#include <OpenMS/FORMAT/QPXCollectionExport.h>
Classes | |
| class | Transaction |
| Scope guard that leaves no partial QPX collection behind. More... | |
Static Public Member Functions | |
| static bool | requireExportable (const ConsensusMap &cmap, const ExperimentalDesign &design) |
| Refuse a collection that cannot be written in full, before any file is created. | |
Whole-collection preflight for the QPX Parquet export (-out_qpx)
A QPX collection is three files written in a fixed order – quantms.feature.parquet, then quantms.psm.parquet, then quantms.pg.parquet. Each view refuses input it cannot represent, but it does so before opening its own file, so a refusal in the second or third view leaves the earlier files on disk: a partial collection that looks like a successful export.
The exporters cannot avoid that themselves. Both streaming paths open the output and emit a valid 0-row file even for empty input, so by the time a view can refuse, its predecessors have already written. Only a check that runs before the first write can leave the output directory untouched.
requireExportable() therefore runs every deterministic refusal of all three views up front. It does not replace the in-exporter checks – those remain the contract for callers using an exporter directly – so a condition is validated twice on the TOPP path. That is deliberate: the preflight must not become the only thing standing between a library user and a malformed table.
|
static |
Refuse a collection that cannot be written in full, before any file is created.
Performs, on the same input the three views will see:
(fraction_group, label, abundance) annotation contract and its agreement with the design.| [in] | cmap | The ConsensusMap about to be exported |
| [in] | design | The experimental design that was used to quantify cmap |
| Exception::IllegalArgument | if a feature carries divergent peptide annotations |
| Exception::MissingInformation | if an identification of a merged run carries no usable id_merge_index |
| Exception::InvalidValue | if two identification runs share an identifier |