<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: KleosOmen</title>
    <description>The latest articles on DEV Community by KleosOmen (@kleos_omen).</description>
    <link>https://dev.to/kleos_omen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4109070%2Ff2f6bd16-e0e0-42b9-a793-c3b06b180e00.jpg</url>
      <title>DEV Community: KleosOmen</title>
      <link>https://dev.to/kleos_omen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kleos_omen"/>
    <language>en</language>
    <item>
      <title>How I Built a DNA Mutation Predictor Using ESM-2 and XGBoost (Open Source) As a Highskewler :]</title>
      <dc:creator>KleosOmen</dc:creator>
      <pubDate>Fri, 04 Sep 2026 05:34:23 +0000</pubDate>
      <link>https://dev.to/kleos_omen/how-i-built-a-dna-mutation-predictor-using-esm-2-and-xgboost-open-source-4deg</link>
      <guid>https://dev.to/kleos_omen/how-i-built-a-dna-mutation-predictor-using-esm-2-and-xgboost-open-source-4deg</guid>
      <description>&lt;p&gt;I built a tool that tells you if a DNA mutation causes disease. No cloud API. No paid service. Just a Python CLI on your laptop.&lt;/p&gt;

&lt;p&gt;Here's how it works — and how you can run it yourself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;br&gt;
hen a single nucleotide changes in DNA (a missense mutation), it can alter a protein's function. Some changes cause disease. Most don't. ClinVar — the NIH's database of known variants — has ~2,800 classified missense mutations. I wanted to build a classifier that could predict pathogenicity from sequence alone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Stack&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ESM-2&lt;/strong&gt; (&lt;code&gt;facebook/esm2_t30_150M_UR50D&lt;/code&gt;) — a 150M-parameter protein language model from Meta. It reads protein sequences and produces 640-dimensional embeddings that capture evolutionary and structural information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XGBoost&lt;/strong&gt; — gradient boosted trees, trained on 40 selected features from the ESM-2 embed-dings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;scikit-learn&lt;/strong&gt; — feature selection (&lt;code&gt;SelectKBest&lt;/code&gt;) and scaling (&lt;code&gt;StandardScaler&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No deep learning at inference time. The ESM-2 embeddings are computed once and fed into a lightweight XGBoost model. The result: &lt;strong&gt;82.5% accuracy&lt;/strong&gt; on a 2,792-sample ClinVar dataset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How It Works&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You input a protein symbol + mutation (e.g., &lt;code&gt;BRCA1 A1708E&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;The tool fetches the protein sequence from UniProt&lt;/li&gt;
&lt;li&gt;ESM-2 produces a 640-dim embedding for the mutated sequence&lt;/li&gt;
&lt;li&gt;XGBoost classifies: &lt;code&gt;PATHOGENIC&lt;/code&gt; or &lt;code&gt;BENIGN&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You get a confidence score + a protein feature graph&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Running It&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/NOOBHEKER/dna-mutation-predictor.git
&lt;span class="nb"&gt;cd &lt;/span&gt;dna-mutation-predictor
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
python &lt;span class="nt"&gt;-m&lt;/span&gt; src.cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or double-click &lt;code&gt;predict.bat&lt;/code&gt; on Windows — it sets up everything automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ESM-2 embeddings contain enough signal&lt;/strong&gt; to classify pathogenicity without hand-crafted features&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature selection matters:&lt;/strong&gt; 40 out of 640 dimensions outperformed the full embedding&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU inference is slow&lt;/strong&gt; (~30s per prediction) but acceptable for research use&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The hardest part was cleaning ClinVar data&lt;/strong&gt;, not training the model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Try It&lt;/strong&gt;&lt;br&gt;
The project is open source under MIT license. Clone it, break it, improve it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/NOOBHEKER/dna-mutation-predictor" rel="noopener noreferrer"&gt;https://github.com/NOOBHEKER/dna-mutation-predictor&lt;/a&gt;&lt;br&gt;
``&lt;br&gt;
If it's useful to your research, I'd appreciate a star or a coffee.&lt;/p&gt;

</description>
      <category>bioinformatics</category>
      <category>ai</category>
      <category>machinelearning</category>
      <category>python</category>
    </item>
  </channel>
</rss>
