OpenSwathOSWWriter#
- class pyopenms.OpenSwathOSWWriter#
Bases:
object
Cython implementation of _OpenSwathOSWWriter
Original C++ documentation is available here
- __init__()#
Overload:
- __init__(self, output_filename: bytes | str | String, run_id: int, input_filename: bytes | str | String, ms1_scores: bool, sonar: bool, uis_scores: bool) None
Overload:
- __init__(self, in_0: OpenSwathOSWWriter) None
Methods
Overload:
isActive
(self)prepareLine
(self, compound, tr, output, id_)Prepare a single line (feature) for output
writeHeader
(self)Initializes file by generating SQLite tables
writeLines
(self, to_osw_output)Write data to disk
- isActive(self) bool #
- prepareLine(self, compound: LightCompound, tr: LightTransition, output: FeatureMap, id_: bytes | str | String) bytes | str | String #
Prepare a single line (feature) for output
The result can be flushed to disk using writeLines (either line by line or after collecting several lines)
- Parameters:
pep – The compound (peptide/metabolite) used for extraction
transition – The transition used for extraction
output – The feature map containing all features (each feature will generate one entry in the output)
id – The transition group identifier (peptide/metabolite id)
- Returns:
A String to be written using writeLines
- writeHeader(self) None #
Initializes file by generating SQLite tables
- writeLines(self, to_osw_output: List[bytes]) None #
Write data to disk
Takes a set of pre-prepared data statements from prepareLine and flushes them to disk
- Parameters:
to_osw_output – Statements generated by prepareLine