ParquetReader
- class pyprophet.io.scoring.parquet.ParquetReader(config: RunnerIOConfig)[source]
Bases:
BaseParquetReaderClass for reading and processing data from OpenSWATH results stored in Parquet format.
The ParquetReader class provides methods to read different levels of data from the file and process it accordingly. It supports reading data for semi-supervised learning, IPF analysis, context level analysis.
This assumes that the input file contains precursor and transition data.
- infile
Input file path.
- Type:
str
- outfile
Output file path.
- Type:
str
- classifier
Classifier used for semi-supervised learning.
- Type:
str
- level
Level used in semi-supervised learning (e.g., ‘ms1’, ‘ms2’, ‘ms1ms2’, ‘transition’, ‘alignment’), or context level used peptide/protein/gene inference (e.g., ‘global’, ‘experiment-wide’, ‘run-specific’).
- Type:
str
- glyco
Flag indicating whether analysis is glycoform-specific.
- Type:
bool
- __init__(config: RunnerIOConfig)[source]
Initialize the reader with a given configuration.
- Parameters:
config (BaseIOConfig) – Configuration object containing input details, and module specific config for params for reading.
- read() DataFrame[source]
Reads the feature table from the specified file path using DuckDB connection, initializes DuckDB views, fetches the feature table, merges MS1 and MS2 features if the level is “ms1ms2”, and finalizes the feature table with the main score.
Returns: pd.DataFrame: The finalized feature table with the main score.