OSWWriter

class pyprophet.io.scoring.osw.OSWWriter(config: RunnerIOConfig)[source]

Bases: BaseOSWWriter

Class for writing OpenSWATH results to an OSW-sqlite based file.

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

save_results(result, pi0)[source]

Save the results to the output file based on the module using this class.

save_weights(weights)[source]

Save the weights to the output file.

__init__(config: RunnerIOConfig)[source]

Initialize the writer with a given configuration.

Parameters:

config (BaseIOConfig) – Configuration object containing output details.

save_results(result, pi0)[source]

Save the results to the output file based on the specified level and glyco flag.

Parameters: - result: The result object containing scored tables. - pi0: The pi0 value.

Returns: None

save_weights(weights)[source]

Save the weights to a SQLite database based on the classifier type. If classifier is “LDA” or “SVM”, weights are saved to PYPROPHET_WEIGHTS table. If classifier is “XGBoost”, weights are saved to PYPROPHET_XGB or GLYCOPEPTIDEPROPHET_XGB table based on glyco and level.