Package: alphapept
AlphaPeptDOI:10.1101/2021.07.23.453379PreprintOur preprintAlphaPept, a modern and open framework for MS-based
proteomicsis now availablehere.Be sure to check out other packages of our ecosystem: -alphatims: Fast access to
TimsTOF data. -alphamap:
Peptide level MS data exploration. -alphapeptdeep: Predicting
properties from peptides. -alphaviz: Vizualization of MS
data.Windows QuickstartDownload the latest installerhere,
install and click the shortcut on the desktop. A browser window with
the AlphaPept interface should open. In the case of Windows Firewall
asking for network access for AlphaPept, please allow.In theNew Experiment, select a folder with raw files and FASTA
files.Specify additional settings such as modifications withSettings.ClickStartand run the analysis.See also below for more detailed instructions.Current functionalityFeatureImplementedTypeDDAFiletypesBruker, ThermoQuantificationLFQIsobaric labelsNonePlatformWindowsLinux and macOS should, in principle, work but are not heavily tested
and might require additional work to set up (see detailed instructions
below). To read Thermo files, we use Mono, which can be used on Mac and
Linux. For Bruker files, we can use Linux but not yet macOS.Python Installation InstructionsRequirementsWe highly recommend theAnacondaorMinicondaPython
distribution, which comes with a powerful package manager. See below for
additional instructions for Linux and Mac as they require additional
installation of Mono to use the RawFileReader.AlphaPept can be used as an application as a whole or as a Python
Package where individual modules are called. Depending on the use case,
AlphaPept will need different requirements, and you might not want to
install all of them.Currently, we have the defaultrequirements.txt, additional
requirements to run the GUIguiand packages used for developingdevelop.Therefore, you can install AlphaPept in multiple ways:The defaultalphapeptWith GUI-packagesalphapept[gui]With pacakges for developmentalphapept[develop](alphapept[develop,gui]) respectivelyThe requirements typically contain pinned versions and will be
automatically upgraded and tested withdependabot. Thisstableversion allows having a reproducible workflow. However, in order to
avoid conflicts with package versions that are too strict, the
requirements are not pinned when being installed. To use the strict
version use the-stable-flag, e.g.alphapept[stable].For end-users that want to set up a processing environment in Python,
the"alphapept[stable,gui-stable]"is thebatteries-included-version
that you want to use.PythonIt is strongly recommended to install AlphaPept in its own
environment. 1. Open the console and create a new conda environment:conda create --name alphapept python=3.82. Activate the environment:conda activate alphapept3. Install AlphaPept via pip:pip install "alphapept[stable,gui-stable]". If you want to use
AlphaPept as a package without the GUI dependencies and without strict
version dependencies, usepip install alphapept.If AlphaPept is installed correctly, you should be able to import
AlphaPept as a package within the environment; see below.LinuxInstall the build-essentials:sudo apt-get install build-essential.Install AlphaPept via pip:pip install "alphapept[stable,gui-stable]". If you want to use
AlphaPept as a package withouth the GUI dependencies and strict
version dependencies usepip install alphapept.Install libgomp.1 withsudo apt-get install libgomp1.Bruker SupportCopy-paste the Bruker library for feature finding to your /usr/lib
folder withsudo cp alphapept/ext/bruker/FF/linux64/alphapeptlibtbb.so.2 /usr/lib/libtbb.so.2.Thermo SupportInstall Mono from mono-project websiteMono
Linux.
NOTE, the installed mono version should be at least 6.10, which
requires you to add the ppa to your trusted sources!Install pythonnet withpip install pythonnet>=2.5.2MacInstall AlphaPept via pip:pip install "alphapept[stable,gui-stable]". If you want to use
AlphaPept as a package withouth the GUI dependencies and strict
version dependencies usepip install alphapept.Bruker SupportOnly supported for preprocessed files.Thermo SupportInstallbrewand pkg-config:brew install pkg-configInstall Mono from mono-project websiteMono
MacRegister the Mono-Path to your system: For macOS Catalina, open the
configuration of zsh via the terminal:Type incdto navigate to the home directory.Typenano ~/.zshrcto open the configuration of the terminalAdd the path to your mono installation:export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig:$PKG_CONFIG_PATH.
Make sure that the Path matches to your version (Here 6.12.0)Save everything and execute. ~/.zshrcInstall pythonnet withpip install pythonnet>=2.5.2DeveloperRedirect to the folder of choice and clone the repository:git clone https://github.com/MannLabs/alphapept.gitNavigate to the alphapept folder withcd alphapeptand install the
package withpip install .(default users) or withpip install -e .to enable developers mode. Note that you can use
the different requirements here aswell
(e.g.pip install ".[gui-stable]")GPU SupportSome functionality of AlphaPept is GPU optimized that uses Nvidia’s
CUDA. To enable this, additional packages need to be installed.Make sure to have a workingCUDA
toolkitinstallation
that is compatible with CuPy. To check typenvcc --versionin your
terminal.Installcupy. Make sure to install the cupy
version matching your CUDA toolkit (e.g.pip install cupy-cuda110for CUDA toolkit 11.0.Additional NotesTo access Thermo files, we have integratedRawFileReaderinto
AlphaPept. We rely onMonofor
Linux/Mac systems.To access Bruker files, we rely on thetimsdata-library. Currently,
only Windows is supported. For feature finding, we use the Bruker
Feature Finder, which can be found in theextfolder of this
repository.Notes for NBDEVFor developing with the notebooks, install the nbdev package (see the
development requirements)To facilitate navigating the notebooks, use jupyter notebook
extensions. They can be called from a running jupyter instance like
so:http://localhost:8888/nbextensions. The extensionscollapsible headingsandtoc2are very beneficial.Standalone Windows InstallerTo use AlphaPept as a stand-alone program for end-users, it can be
installed on Windows machines via a one-click installer. Download the
latest versionhere.DockerIt is possible to run AlphaPept in a docker container. For this, we
provide two Dockerfiles:Dockerfile_thermoandDockerfile_bruker,
depending on which filetypes you want to analyse. They are split because
of drastically different requirements.To run, navigate to the AlphaPept repository and rename the dockerfile
you want to use, e.g.Dockerfile_thermotoDockerfile.Build the image with:docker build -t docker-alphapept:latest .To run usedocker run -p 8505:8505 -v /Users/username/Desktop/docker:/home/alphapept/ docker-alphapept:latest alphapept gui(Note that -v maps a local folder for convient file transfer)Access the AlphaPept GUI vialocalhost:8505in your browser.Note 1: The Thermo Dockerfile is built on a Jupyter image, so you can
also start a jupyter instance:docker run -p 8888:8888 -v /Users/username/Desktop/docker:/home/jovyan/ docker-alphapept:latest jupyter notebook --allow-rootDocker Troubleshooting on M1-MacThe Thermo dockerfile was tested on an M1-Mac. Resources were set to
18GB RAM and 2 CPUs, 200 GB diskIt was possible to build the Bruker dockerfile with the platform tag--platform linux/amd64. However, it was very slow and the Bruker
file is not recommended for an M1-Mac. Windows worked nicely.Additional DocumentationThe documentation is automatically built based on the jupyter notebooks
(nbs/index.ipynb) and can be foundhere:Version PerformanceAn overview of the performance of different versions can be foundhere.
We re-run multiple tests on datasets for different versions so that
users can assess what changes from version to version. Feel free tosuggesta test set
in case.How to useAlphaPept is meant to be a framework to implement and test new ideas
quickly but also to serve as a performant processing pipeline. In
principle, there are three use-cases:GUI: Use the graphical user interface to select settings and process
files manually.CMD: Use the command-line interface to process files. Useful when
building automatic pipelines.Python: Use python modules to build individual workflows. Useful when
building customized pipelines and using Python as a scripting language
or when implementing new ideas.Windows Standalone InstallationFor thewindows
installation,
simply click on the shortcut after installation. The windows
installation also installs the command-line tool so that you can call
alphapept viaalphapeptin the command line.Python PackageOnce AlphaPept is correctly installed, you can use it like any other
python module.fromalphapept.fastaimportget_frag_dict,parsefromalphapeptimportconstantspeptide='PEPT'get_frag_dict(parse(peptide),constants.mass_dict){'b1': 98.06004032687,
 'b2': 227.10263342687,
 'b3': 324.15539728686997,
 'y1': 120.06551965033,
 'y2': 217.11828351033,
 'y3': 346.16087661033}Using as a toolIf alphapept is installed an a conda or virtual environment, launch this
environment first.To launch the command line interface use: *alphapeptThis allows us to select different modules. To start the GUI use: *alphapept guiTo run a workflow, use: *alphapept workflow your_own_workflow.yamlAn example workflow is easily generated by running the GUI once and
saving the settings which can be modified on a per-project basis.CMD / PythonCreate a settings-file. This can be done by changing thedefault_settings.yamlin the repository or using the GUI.Run the analysis with the new settings file.alphapept run new_settings.yamlWithin Python (i.e., Jupyter notebook) the following code would be
required)from alphapept.settings import load_settings
import alphapept.interface
settings = load_settings('new_settings.yaml')
r = alphapept.interface.run_complete_workflow(settings)This also allows you to break the workflow down in indiviudal steps,
e.g.:settings = alphapept.interface.import_raw_data(settings)
settings = alphapept.interface.feature_finding(settings)NotebooksWithin the notebooks, we try to cover most aspects of a proteomics
workflow:Settings: General settings to define a workflowChem: Chemistry related functions, e.g., for calculating isotope
distributionsInput / Output: Everything related to importing and exporting and the
file formats usedFASTA: Generating theoretical databases from FASTA filesFeature Finding: How to extract MS1 features for quantificationSearch: Comparing theoretical databases to experimental spectra and
getting Peptide-Spectrum-Matches (PSMs)Score: Scoring PSMsRecalibration: Recalibration of data based on identified peptidesQuantification: Functions for quantification, e.g., LFQMatching: Functions for Match-between-runsConstants: A collection of constantsInterface: Code that generates the command-line-interface (CLI) and
makes workflow steps callablePerformance: Helper functions to speed up code with CPU / GPUExport: Helper functions to make exports compatbile to other Software
toolsLabel: Code for support isobaric label searchDisplay: Code related to displaying in the streamlit guiAdditional code: Overview of additional code not covered by the
notebooksHow to contribute: Contribution guidelinesAlphaPept workflow and files: Overview of the worfklow, files and
column namesContributingIf you have a feature request or a bug report, please post it either as
an idea in thediscussionsor as
an issue on theGitHub issue
tracker. Upvoting
features in the discussions page will help to prioritize what to
implement next. If you want to contribute, put a PR for it. You can find
more guidelines for contributing and how to get startedhere. We will
gladly guide you through the codebase and credit you accordingly.
Additionally, you can check out the Projects page on GitHub. You can
also contact us viaopensource@alphapept.com.If you like the project, consider starring it!Cite us@article {Strauss2021.07.23.453379,
    author = {Strauss, Maximilian T and Bludau, Isabell and Zeng, Wen-Feng and Voytik, Eugenia and Ammar, Constantin and Schessner, Julia and Ilango, Rajesh and Gill, Michelle and Meier, Florian and Willems, Sander and Mann, Matthias},
    title = {AlphaPept, a modern and open framework for MS-based proteomics},
    elocation-id = {2021.07.23.453379},
    year = {2021},
    doi = {10.1101/2021.07.23.453379},
    publisher = {Cold Spring Harbor Laboratory},
    URL = {https://www.biorxiv.org/content/early/2021/07/26/2021.07.23.453379},
    eprint = {https://www.biorxiv.org/content/early/2021/07/26/2021.07.23.453379.full.pdf},
    journal = {bioRxiv}
}