ParquetReader
- class pyprophet.io.export.parquet.ParquetReader(config: ExportIOConfig)[source]
Bases:
BaseParquetReaderClass for reading and processing data from an OpenSWATH workflow parquet based file. Extended to support exporting functionality.
- __init__(config: ExportIOConfig)[source]
Initialize the reader with a given configuration.
- Parameters:
config (BaseIOConfig) – Configuration object containing input details, and module specific config for params for reading.
- _fetch_alignment_features(con) DataFrame[source]
Fetch aligned features with good alignment scores from alignment parquet file.
This method checks for an alignment parquet file and retrieves features that have been aligned across runs and pass the alignment quality threshold. Only features whose reference feature passes the MS2 QVALUE threshold are included.
- Parameters:
con – DuckDB connection
- Returns:
DataFrame with aligned feature IDs that pass quality threshold
- _is_unscored_file() bool[source]
Check if the file is unscored by verifying the presence of the ‘SCORE_’ columns.
- _read_for_export_scored_report(con) DataFrame[source]
Lightweight reader that returns the minimal scored-report columns from a Parquet file.
- _read_standard_data(con) DataFrame[source]
Read standard OpenSWATH data without IPF, optionally including aligned features.
- export_feature_scores(outfile: str, plot_callback)[source]
Export feature scores from Parquet file for plotting.
Detects if SCORE columns exist and adjusts behavior: - If SCORE columns exist: applies RANK==1 filtering and plots SCORE + VAR_ columns - If SCORE columns don’t exist: plots only VAR_ columns
- Parameters:
outfile (str) – Path to the output PDF file.
plot_callback (callable) – Function to call for plotting each level’s data. Signature: plot_callback(df, outfile, level, append)