oktoberfest.data.Spectra.add_list_of_predicted_intensities
- Spectra.add_list_of_predicted_intensities(intensities, annotations, chunk_indices)
Add chunks of predicted intensities and convert to sparse matrix.
This function takes three lists of numpy arrays, containing intensities, the fragment ion annotations in ProForma notation representing the column index, and a numeric index representing the row index. Each intensity array is reordered using the corresponding annotation element to match the order of the fragment ion annotations in self.var_names and stored to the appropriate rows of a dok_matrix, incrementally creating the full, sparse intensity matrix ordered by fragment types. The function then converts the matrix to csr format.
- Parameters: