SkillAgentSearch skills...

DeepLC

DeepLC: Retention time prediction for peptides carrying any modification.

Install / Use

/learn @CompOmics/DeepLC
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<img src="https://github.com/compomics/DeepLC/raw/master/img/deeplc_logo.png" width="150" height="150" /> <br/><br/>

GitHub release PyPI Conda GitHub Workflow Status License Twitter

DeepLC: Retention time prediction for (modified) peptides using Deep Learning.



Introduction

DeepLC is a retention time predictor for (modified) peptides that employs Deep Learning. Its strength lies in the fact that it can accurately predict retention times for modified peptides, even if hasn't seen said modification during training.

DeepLC can be used through the web application, locally with a graphical user interface (GUI), or as a Python package. In the latter case, DeepLC can be used from the command line, or as a Python module.

Citation

If you use DeepLC for your research, please use the following citation:

DeepLC can predict retention times for peptides that carry as-yet unseen modifications
Robbin Bouwmeester, Ralf Gabriels, Niels Hulstaert, Lennart Martens & Sven Degroeve
Nature Methods 18, 1363–1369 (2021) doi: 10.1038/s41592-021-01301-5

Usage

Web application

Open in Streamlit

Just go to iomics.ugent.be/deeplc and get started!

Graphical user interface

In an existing Python environment (cross-platform)

  1. In your terminal with Python (>=3.7) installed, run pip install deeplc[gui]
  2. Start the GUI with the command deeplc-gui or python -m deeplc.gui

Standalone installer (Windows)

Download GUI

  1. Download the DeepLC installer (DeepLC-...-Windows-64bit.exe) from the latest release
  2. Execute the installer
  3. If Windows Smartscreen shows a popup window with "Windows protected your PC", click on "More info" and then on "Run anyway". You will have to trust us that DeepLC does not contain any viruses, or you can check the source code 😉
  4. Go through the installation steps
  5. Start DeepLC!

GUI screenshot

Python package

Installation

install with bioconda install with pip container

Install with conda, using the bioconda and conda-forge channels: conda install -c bioconda -c conda-forge deeplc

Or install with pip: pip install deeplc

Command line interface

To use the DeepLC CLI, run:

deeplc --file_pred <path/to/peptide_file.csv>

We highly recommend to add a peptide file with known retention times for calibration:

deeplc --file_pred  <path/to/peptide_file.csv> --file_cal <path/to/peptide_file_with_tr.csv>

For an overview of all CLI arguments, run deeplc --help.

Python module

Minimal example:

import pandas as pd
from deeplc import DeepLC

peptide_file = "datasets/test_pred.csv"
calibration_file = "datasets/test_train.csv"

pep_df = pd.read_csv(peptide_file, sep=",")
pep_df['modifications'] = pep_df['modifications'].fillna("")

cal_df = pd.read_csv(calibration_file, sep=",")
cal_df['modifications'] = cal_df['modifications'].fillna("")

dlc = DeepLC()
dlc.calibrate_preds(seq_df=cal_df)
preds = dlc.make_preds(seq_df=pep_df)

Minimal example with psm_utils:

import pandas as pd

from psm_utils.psm import PSM
from psm_utils.psm_list import PSMList
from psm_utils.io import write_file

from deeplc import DeepLC

infile = pd.read_csv("https://github.com/compomics/DeepLC/files/13298024/231108_DeepLC_input-peptides.csv")
psm_list = []

for idx,row in infile.iterrows():
    seq = row["modifications"].replace("(","[").replace(")","]")
    
    if seq.startswith("["):
        idx_nterm = seq.index("]")
        seq = seq[:idx_nterm+1]+"-"+seq[idx_nterm+1:]
        
    psm_list.append(PSM(peptidoform=seq,spectrum_id=idx))

psm_list = PSMList(psm_list=psm_list)

infile = pd.read_csv("https://github.com/compomics/DeepLC/files/13298022/231108_DeepLC_input-calibration-file.csv")
psm_list_calib = []

for idx,row in infile.iterrows():
    seq = row["seq"].replace("(","[").replace(")","]")
    
    if seq.startswith("["):
        idx_nterm = seq.index("]")
        seq = seq[:idx_nterm+1]+"-"+seq[idx_nterm+1:]
        
    psm_list_calib.append(PSM(peptidoform=seq,retention_time=row["tr"],spectrum_id=idx))

psm_list_calib = PSMList(psm_list=psm_list_calib)

dlc = DeepLC()
dlc.calibrate_preds(psm_list_calib)
preds = dlc.make_preds(seq_df=psm_list)

For a more elaborate example, see examples/deeplc_example.py .

Input files

DeepLC expects comma-separated values (CSV) with the following columns:

  • seq: unmodified peptide sequences
  • modifications: MS2PIP-style formatted modifications: Every modification is listed as location|name, separated by a pipe (|) between the location, the name, and other modifications. location is an integer counted starting at 1 for the first AA. 0 is reserved for N-terminal modifications, -1 for C-terminal modifications. name has to correspond to a Unimod (PSI-MS) name.
  • tr: retention time (only required for calibration)

For example:

seq,modifications,tr
AAGPSLSHTSGGTQSK,,12.1645
AAINQKLIETGER,6|Acetyl,34.095
AANDAGYFNDEMAPIEVKTK,12|Oxidation|18|Acetyl,37.3765

See examples/datasets for more examples.

Prediction models

DeepLC comes with multiple CNN models trained on data from various experimental settings. By default, DeepLC selects the best model based on the calibration dataset. If no calibration is performed, the first default model is selected. Always keep note of the used models and the DeepLC version. The current version comes with:

| Model filename | Experimental settings | Publication | | - | - | - | | full_hc_PXD005573_mcp_8c22d89667368f2f02ad996469ba157e.hdf5 | Reverse phase | Bruderer et al. 2017 | | full_hc_PXD005573_mcp_1fd8363d9af9dcad3be7553c39396960.hdf5 | Reverse phase | Bruderer et al. 2017 | | full_hc_PXD005573_mcp_cb975cfdd4105f97efa0b3afffe075cc.hdf5 | Reverse phase | Bruderer et al. 2017 |

For all the full models that can be used in DeepLC (including some TMT models!) please see:

https://github.com/RobbinBouwmeester/DeepLCModels

Naming convention for the models is as follows:

[full_hc]_[dataset]_[fixed_mods]_[hash].hdf5

The different parts refer to:

full_hc - flag to indicated a finished, trained, and fully optimized model

dataset - name of the dataset used to fit the model (see the original publication, supplementary table 2)

fixed mods - flag to indicate fixed modifications were added to peptides without explicit indication (e.g., carbamidomethyl of cysteine)

hash - indicates different architectures, where "1fd8363d9af9dcad3be7553c39396960" indicates CNN filter lengths of 8, "cb975cfdd4105f97efa0b3afffe075cc" indicates CNN filter lengths of 4, and "8c22d89667368f2f02ad996469ba157e" indicates filter lengths of 2

Q&A

Q: Is it required to indicate fixed modifications in the input file?

Yes, even modifications like carbamidomethyl should be in the input file.

Q: So DeepLC is able to predict the retention time for any modification?

Yes, DeepLC can predict the retention time of any modification. However, if the modification is very different from the peptides the model has seen during training the accuracy might not be satisfactory for you. For example, if the model has never seen a phosphor atom before, the accuracy of the prediction is going to be low.

Q: Installation fails. Why?

Please make sure to install DeepLC in a path that does not contain spaces. Run the latest LTS version of Ubuntu or Windows 10. Make sure you have enough disk space available, surprisingly TensorFlow needs quite a bit of disk space. If you are still not able to install DeepLC, please feel free to contact us:

Robbin.Bouwmeester@ugent.be and Ralf.Gabriels@ugent.be

Q: I have a special usecase that is not supported. Can you help?

Ofcourse, please feel free to contact us:

Robbin.Bouwmeester@uge

Related Skills

View on GitHub
GitHub Stars75
CategoryEducation
Updated12d ago
Forks24

Languages

Python

Security Score

100/100

Audited on Mar 26, 2026

No findings