oktoberfest.data.Spectra
- class oktoberfest.data.Spectra(*args, **kwargs)
Main to init spectra data.
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
Methods
add_column(data[, name])Add column to spectra data.
add_intensities(intensities, annotation, ...)Add predicted intensities and convert to sparse matrix.
add_intensities_without_mapping(intensities, ...)Add predicted intensities and convert to sparse matrix.
Add chunks of predicted intensities and convert to sparse matrix.
add_matrix_from_hdf5(intensity_data, ...)Concatenate intensity df as a sparse matrix to our data.
add_mzs(mzs, fragment_type)Add mass to charge ratios.
Gives back spectra_data instance as a pandas Dataframe.
filter_by_score(threshold)Filter out peptides with search engine score below threshold in-place.
from_hdf5(input_file)Read from hdf5 file.
get_matrix(fragment_type)Get intensities sparse matrix from AnnData object.
Get meta data with intensity, mz and intensity predictions as pd.DataFrame.
Filter and preprocess for machine learning applications and transform into a Parquet-serializable dataframe.
Remove decoys in-place.
remove_duplicates(num_duplicates)Filter out (peptide, charge, collision energy) duplicates if there's more than n_duplicates.
write_as_hdf5(output_file)Write spectra_data to hdf5 file.
Attributes
COLUMNS_FRAGMENT_IONINTENSITY_COLUMN_PREFIXINTENSITY_COLUMN_PREFIX_AINTENSITY_COLUMN_PREFIX_BINTENSITY_LAYER_NAMEINTENSITY_LAYER_NAME_AINTENSITY_LAYER_NAME_BINTENSITY_PRED_LAYER_NAMEINTENSITY_PRED_LAYER_NAME_AINTENSITY_PRED_LAYER_NAME_BINTENSITY_PRED_PREFIXINTENSITY_PRED_PREFIX_AINTENSITY_PRED_PREFIX_BMAX_CHARGEMZ_COLUMN_PREFIXMZ_COLUMN_PREFIX_AMZ_COLUMN_PREFIX_BMZ_LAYER_NAMEMZ_LAYER_NAME_AMZ_LAYER_NAME_B