GitHub Repository

Biomolecular-Identification---Mass-Spectrometry

Biological Agent Identification using Machine Learning Algorithms on Mass Spectral Data

Unsupervised Learning Techniques to Identify Biological Agents from Mass Spectrometry Data

This repository explores the application of unsupervised learning techniques to identify and classify biological agents from mass spectrometry data. Our dataset consists of mass spectra for two proteins (Protein A and B) and two bacterial agents (Bacteria C and D).

We compare three clustering methods:

We also investigate how preprocessing affects clustering by comparing the original data with element-wise absolute-value and squaring transformations.

Mass Spectra Visualization

Below is an illustration of the mass spectra for the four agents. The figure comprises:

Heatmaps and mean spectral plots for the four biological agents

Confusion Matrices

The following figures compare the cluster assignments produced by Spectral Clustering, KSS, and EKSS under each preprocessing method.

Cluster numbers are arbitrary and may differ between algorithms or runs. Successful separation is indicated when each agent is concentrated in a distinct cluster, regardless of whether the largest values lie on the diagonal.

Original Data

Clustering results using the original mass spectrometry data.

Confusion matrices for Spectral Clustering, KSS, and EKSS using original data

Element-wise Absolute Value

Clustering results after applying the absolute-value transformation to each data entry.

Confusion matrices for Spectral Clustering, KSS, and EKSS using absolute-value preprocessing

Element-wise Squaring

Clustering results after squaring each data entry.

Confusion matrices for Spectral Clustering, KSS, and EKSS using squared data

EKSS Co-Clustering Matrices

EKSS combines multiple KSS runs by constructing a co-clustering matrix. Each entry represents the fraction of runs in which a pair of spectra was assigned to the same cluster:

Spectra are ordered by biological agent (A–D) along both axes. Distinct diagonal blocks indicate consistent grouping within agents, while off-diagonal structure indicates grouping across agents.

Original Data

EKSS co-clustering matrix using original data

Element-wise Absolute Value

EKSS co-clustering matrix using absolute-value preprocessing

Element-wise Squaring

EKSS co-clustering matrix using squared data

Julia Notebook

Explore the implementation, preprocessing options, and clustering visualizations in the exported Julia notebook:

View Ensemble KSS Julia Notebook as a webpage