Mass Spectrometry, Tutorial, Python, Data Analysis, Research.
spectrum of interest If we want to see which spectra are most similar to the i-th spectrum (according to the here used Cosine score), then we can call: best_matches = scores.scores_by_query(spectrums[5], name="CosineGreedy_score", sort=True)[:10] print([x[1] for x in best_matches]) which returns