{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Clustering MS/MS spectra with LSH\n", "\n", "The algorithm of LSH (locality-sensitive hashing) with random projections allows for the fast identification of highly similar or near-duplicate MS/MS spectra. This notebook first showcases how to apply it to a collection of 200 thousand mass spectra and then discusses the results. If you are interested in how the algorithm works, please refer to [our paper](https://chemrxiv.org/engage/chemrxiv/article-details/6626775021291e5d1d61967f) or [this tutorial on LSH](https://www.pinecone.io/learn/series/faiss/locality-sensitive-hashing-random-projection/).\n", "\n", "
\n",
"
\n",
"
| \n", " | file_name | \n", "scan_number | \n", "lsh | \n", "
|---|---|---|---|
| 0 | \n", "G73954_1x_BC8_01_17287.mzML | \n", "2 | \n", "b'da1d05deaf9942f8ad5ff66bec1d274b9a2afc4cf508... | \n", "
| 1 | \n", "G73954_1x_BC8_01_17287.mzML | \n", "3 | \n", "b'f82876086f9da8d10033330b031c51964b0a3d3aee85... | \n", "
| 2 | \n", "G73954_1x_BC8_01_17287.mzML | \n", "4 | \n", "b'cd8c4b381a3fcb4e39339e5f82811f0c6fd333d9472b... | \n", "
| 3 | \n", "G73954_1x_BC8_01_17287.mzML | \n", "8 | \n", "b'da1d05deaf9942f8ad5ff66bec1d274b9a2afc4cf508... | \n", "
| 4 | \n", "G73954_1x_BC8_01_17287.mzML | \n", "9 | \n", "b'1d6d296e796d14296f3b69bcd98f0e855984f249dfe6... | \n", "
| ... | \n", "... | \n", "... | \n", "... | \n", "
| 1846 | \n", "G75653_5x_BH3_01_19360.mzML | \n", "3030 | \n", "b'0c5187cb9da473d5fdb75f26ac7a1d400996cbab0e96... | \n", "
| 1847 | \n", "G75653_5x_BH3_01_19360.mzML | \n", "3033 | \n", "b'23388206af220e02b007f1b20dfd7e6acf911459e24d... | \n", "
| 1848 | \n", "G75653_5x_BH3_01_19360.mzML | \n", "3034 | \n", "b'82f2b27ac666438582383c0daf884e14b82ab740b71a... | \n", "
| 1849 | \n", "G75653_5x_BH3_01_19360.mzML | \n", "3037 | \n", "b'23388206af220e02b007f1b20dfd7e6acf911459e24d... | \n", "
| 1850 | \n", "G75653_5x_BH3_01_19360.mzML | \n", "3043 | \n", "b'7d2e69f2c372b3b3bca7a1ce9d54c155109bf5dad5e0... | \n", "
8912 rows × 3 columns
\n", "