alphabase


Namealphabase JSON
Version 1.7.0 PyPI version JSON
download
home_pageNone
SummaryAn infrastructure Python package of the AlphaX ecosystem
upload_time2025-09-08 13:38:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2020 MannLabs Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords mass spectrometry proteomics bioinformatics alphapept alphapept ecosystem alphax ecosystem
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AlphaBase

![Pip installation](https://github.com/MannLabs/alphabase/workflows/Default%20installation%20and%20tests/badge.svg)
![PyPi releases](https://github.com/MannLabs/alphabase/workflows/Publish%20on%20PyPi%20and%20release%20on%20GitHub/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/alphabase/badge/?version=latest)](https://alphabase.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/alphabase)](https://pypi.org/project/alphabase)
[![pip downloads](https://img.shields.io/pypi/dm/alphabase?color=blue&label=pip%20downloads)](https://pypi.org/project/alphabase)
![Python](https://img.shields.io/pypi/pyversions/alphabase)

AlphaBase provides all basic python functionalities for AlphaPept
ecosystem from the [Mann Labs at the Max Planck Institute of
Biochemistry](https://www.biochem.mpg.de/mann) and the [University of
Copenhagen](https://www.cpr.ku.dk/research/proteomics/mann/). To enable
all hyperlinks in this document, please view it at
[GitHub](https://github.com/MannLabs/alphabase). For documentation,
please see [readthedocs](https://alphabase.readthedocs.io/en/latest).

- [**About**](#about)
- [**License**](#license)
- [**Installation**](#installation)
  - [**Pip installer**](#pip)
  - [**Developer installer**](#developer)
- [**Usage**](#usage)
- [**Troubleshooting**](#troubleshooting)
- [**Citations**](#citations)
- [**How to contribute**](#how-to-contribute)
- [**Changelog**](#changelog)

------------------------------------------------------------------------

## About

The infrastructure package of AlphaX ecosystem for MS proteomics. It was first published with AlphaPeptDeep, see [Citations](#citations).

### Packages built upon AlphaBase

- [AlphaPeptDeep](https://github.com/MannLabs/alphapeptdeep): deep learning framework for proteomics.
- [AlphaRaw](https://github.com/MannLabs/alpharaw): raw data reader for different vendors.
- [AlphaDIA](https://github.com/MannLabs/alphadia): DIA search engine.
- [PeptDeep-HLA](https://github.com/MannLabs/peptdeep-hla): personalized HLA-binding peptide prediction.
- [AlphaViz](https://github.com/MannLabs/alphaviz): visualization for MS-based proteomics.
- [AlphaQuant](https://github.com/MannLabs/alphaquant): quantification for MS-based proteomics.

------------------------------------------------------------------------

## Citations

Wen-Feng Zeng, Xie-Xuan Zhou, Sander Willems, Constantin Ammar, Maria Wahle, Isabell Bludau, Eugenia Voytik, Maximillian T. Strauss & Matthias Mann. AlphaPeptDeep: a modular deep learning framework to predict peptide properties for proteomics. Nat Commun 13, 7238 (2022). https://doi.org/10.1038/s41467-022-34904-3

------------------------------------------------------------------------

## License

AlphaBase was developed by the [Mann Labs at the Max Planck Institute of Biochemistry](https://www.biochem.mpg.de/mann) and the [University of Copenhagen](https://www.cpr.ku.dk/research/proteomics/mann/) and is
freely available with an [Apache License](LICENSE.txt). External Python
packages (available in the [requirements](requirements) folder) have
their own licenses, which can be consulted on their respective websites.

------------------------------------------------------------------------

## Installation

AlphaBase can be installed and used on all major operating systems
(Windows, macOS and Linux). There are two different types of
installation possible:

- [**Pip installer:**](#pip) Choose this installation if you want to use
  AlphaBase as a Python package in an existing Python 3.8 environment
  (e.g. a Jupyter notebook).
- [**Developer installer:**](#developer) Choose this installation if you
  are familiar with [conda](https://docs.conda.io/en/latest/) and
  Python. This installation allows access to all available features of
  AlphaBase and even allows to modify its source code directly.
  Generally, the developer version of AlphaBase outperforms the
  precompiled versions which makes this the installation of choice for
  high-throughput experiments.

### Pip

AlphaBase can be installed in an existing Python 3.8 environment with a
single `bash` command. *This `bash` command can also be run directly
from within a Jupyter notebook by prepending it with a `!`*:

``` bash
pip install alphabase
```

Installing AlphaBase like this avoids conflicts when integrating it in
other tools, as this does not enforce strict versioning of dependencies.
However, if new versions of dependencies are released, they are not
guaranteed to be fully compatible with AlphaBase. While this should only
occur in rare cases where dependencies are not backwards compatible, you
can always force AlphaBase to use dependency versions which are known to
be compatible with:

``` bash
pip install "alphabase[stable]"
```

NOTE: You might need to run `pip install -U pip` before installing
AlphaBase like this. Also note the double quotes `"`.
If you are using the `quant_reader` module, it is advisable to add the
`dask-stable` or `dask` extras to speed up processing large files.
You need to install the `hdf` extra option of the package to be able to read alphapept protein group matrices in hdf format.

For those who are really adventurous, it is also possible to directly
install any branch (e.g. `@main`) with any extras
(e.g. `#egg=alphabase[stable,development]`) from GitHub with e.g.

``` bash
pip install "git+https://github.com/MannLabs/alphabase.git@main#egg=alphabase[stable,development]"
```

### Developer

AlphaBase can also be installed in editable (i.e. developer) mode with a
few `bash` commands. This allows to fully customize the software and
even modify the source code to your specific needs. When an editable
Python package is installed, its source code is stored in a transparent
location of your choice. While optional, it is advised to first (create
and) navigate to e.g. a general software folder:

``` bash
mkdir ~/folder/where/to/install/software
cd ~/folder/where/to/install/software
```

***The following commands assume you do not perform any additional `cd`
commands anymore***.

Next, download the AlphaBase repository from GitHub either directly or
with a `git` command. This creates a new AlphaBase subfolder in your
current directory.

``` bash
git clone https://github.com/MannLabs/alphabase.git
```

For any Python package, it is highly recommended to use a separate
[conda virtual environment](https://docs.conda.io/en/latest/), as
otherwise *dependency conflicts can occur with already existing
packages*.

``` bash
conda create --name alphabase python=3.9 -y
conda activate alphabase
```

Finally, AlphaBase and all its [dependencies](requirements) need to be
installed. To take advantage of all features and allow development (with
the `-e` flag), this is best done by also installing the [development
dependencies](requirements/requirements_development.txt) instead of only
the [core dependencies](requirements/requirements.txt):

``` bash
pip install -e "./alphabase[development]"
```

By default this installs loose dependencies (no explicit versioning),
although it is also possible to use stable dependencies
(e.g. `pip install -e "./alphabase[stable,development]"`).

***By using the editable flag `-e`, all modifications to the [AlphaBase
source code folder](alphabase) are directly reflected when running
AlphaBase. Note that the AlphaBase folder cannot be moved and/or renamed
if an editable version is installed. In case of confusion, you can
always retrieve the location of any Python module with e.g. the command
`import module` followed by `module.__file__`.***

------------------------------------------------------------------------

## Usage

TODO

------------------------------------------------------------------------

## Troubleshooting

In case of issues, check out the following:

- [Issues](https://github.com/MannLabs/alphabase/issues): Try a few
  different search terms to find out if a similar problem has been
  encountered before
- [Discussions](https://github.com/MannLabs/alphabase/discussions):
  Check if your problem or feature requests has been discussed before.

------------------------------------------------------------------------

## How to contribute

If you like this software, you can give us a
[star](https://github.com/MannLabs/alphabase/stargazers) to boost our
visibility! All direct contributions are also welcome. Feel free to post
a new [issue](https://github.com/MannLabs/alphabase/issues) or clone the
repository and create a [pull
request](https://github.com/MannLabs/alphabase/pulls) with a new branch.
For an even more interactive participation, check out the
[discussions](https://github.com/MannLabs/alphabase/discussions) and the
[the Contributors License Agreement](misc/CLA.md).

### Notes for developers

#### 1. Code Structure
While AlphaBase offers an object-oriented interface, algorithms for manipulating data should be implemented in a functional way and called from class methods. This allows the functions to be reused without instatiating a class.

#### 2. DataFrame Handling
- Return DataFrames in the same order as they were passed
- Minimize in-place modifications of DataFrames. Mention them explicitly in the docstring
- Implement low-level functions that operate on numpy arrays and return arrays. Use higher-level functions to assign array results to DataFrames

#### 3. Data Assumptions
Avoid making assumptions about:
- Precursor ordering by `nAA`
- Fragment indices ordering (e.g., `frag_start_idx`)
- Continuity of `frag_start_idx` where `frag_start_idx[i+1] == frag_stop_idx[i]`
- All fragments being assigned to a precursor

Assumptions are only permitted for low-level or optimized functions and should be documented in the docstring.

#### 3. Optimization Strategy
When performance optimization is needed:
1. Implement the general solution first
2. Add optimized versions for special cases for refined precursor df or order `nAA`
3. Check conditions at runtime to use optimized versions when applicable

#### 4. Code Quality
- Include python type hints
- Include docstrings in numpy style (see [numpy docstring example](https://www.sphinx-doc.org/en/master/usage/extensions/example_numpy.html#example-numpy))


#### 5. pre-commit hooks
It is highly recommended to use the provided pre-commit hooks, as the CI pipeline enforces all checks therein to
pass in order to merge a branch.

The hooks need to be installed once by
```bash
pre-commit install
```
You can run the checks yourself using:
```bash
pre-commit run --all-files
```

#### 6. Tagging of Pull Requests
In order to have release notes automatically generated, pull requests need to be tagged with labels.
The following labels are used (should be safe-explanatory):
`breaking-change`, `bug`, `enhancement`.

#### 7. Release a new version
This package uses a shared release process defined in the
[alphashared](https://github.com/MannLabs/alphashared) repository. Please see the instructions
[there](https://github.com/MannLabs/alphashared/blob/reusable-release-workflow/.github/workflows/README.md#release-a-new-version).


------------------------------------------------------------------------

## Changelog

For a full overview of the changes made in each version see [CHANGELOG.md](CHANGELOG.md) (until version 1.1.0) and the github release notes (from >1.1.0).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "alphabase",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mass spectrometry, proteomics, bioinformatics, AlphaPept, AlphaPept ecosystem, AlphaX ecosystem",
    "author": null,
    "author_email": "Mann Labs <jalew188@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d7/64/931aa318eb9a291d4cb1b46d4f5f065001d157f271b7a5a4fef1755f6909/alphabase-1.7.0.tar.gz",
    "platform": null,
    "description": "# AlphaBase\n\n![Pip installation](https://github.com/MannLabs/alphabase/workflows/Default%20installation%20and%20tests/badge.svg)\n![PyPi releases](https://github.com/MannLabs/alphabase/workflows/Publish%20on%20PyPi%20and%20release%20on%20GitHub/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/alphabase/badge/?version=latest)](https://alphabase.readthedocs.io/en/latest/?badge=latest)\n[![PyPI](https://img.shields.io/pypi/v/alphabase)](https://pypi.org/project/alphabase)\n[![pip downloads](https://img.shields.io/pypi/dm/alphabase?color=blue&label=pip%20downloads)](https://pypi.org/project/alphabase)\n![Python](https://img.shields.io/pypi/pyversions/alphabase)\n\nAlphaBase provides all basic python functionalities for AlphaPept\necosystem from the [Mann Labs at the Max Planck Institute of\nBiochemistry](https://www.biochem.mpg.de/mann) and the [University of\nCopenhagen](https://www.cpr.ku.dk/research/proteomics/mann/). To enable\nall hyperlinks in this document, please view it at\n[GitHub](https://github.com/MannLabs/alphabase). For documentation,\nplease see [readthedocs](https://alphabase.readthedocs.io/en/latest).\n\n- [**About**](#about)\n- [**License**](#license)\n- [**Installation**](#installation)\n  - [**Pip installer**](#pip)\n  - [**Developer installer**](#developer)\n- [**Usage**](#usage)\n- [**Troubleshooting**](#troubleshooting)\n- [**Citations**](#citations)\n- [**How to contribute**](#how-to-contribute)\n- [**Changelog**](#changelog)\n\n------------------------------------------------------------------------\n\n## About\n\nThe infrastructure package of AlphaX ecosystem for MS proteomics. It was first published with AlphaPeptDeep, see [Citations](#citations).\n\n### Packages built upon AlphaBase\n\n- [AlphaPeptDeep](https://github.com/MannLabs/alphapeptdeep): deep learning framework for proteomics.\n- [AlphaRaw](https://github.com/MannLabs/alpharaw): raw data reader for different vendors.\n- [AlphaDIA](https://github.com/MannLabs/alphadia): DIA search engine.\n- [PeptDeep-HLA](https://github.com/MannLabs/peptdeep-hla): personalized HLA-binding peptide prediction.\n- [AlphaViz](https://github.com/MannLabs/alphaviz): visualization for MS-based proteomics.\n- [AlphaQuant](https://github.com/MannLabs/alphaquant): quantification for MS-based proteomics.\n\n------------------------------------------------------------------------\n\n## Citations\n\nWen-Feng Zeng, Xie-Xuan Zhou, Sander Willems, Constantin Ammar, Maria Wahle, Isabell Bludau, Eugenia Voytik, Maximillian T. Strauss & Matthias Mann. AlphaPeptDeep: a modular deep learning framework to predict peptide properties for proteomics. Nat Commun 13, 7238 (2022). https://doi.org/10.1038/s41467-022-34904-3\n\n------------------------------------------------------------------------\n\n## License\n\nAlphaBase was developed by the [Mann Labs at the Max Planck Institute of Biochemistry](https://www.biochem.mpg.de/mann) and the [University of Copenhagen](https://www.cpr.ku.dk/research/proteomics/mann/) and is\nfreely available with an [Apache License](LICENSE.txt). External Python\npackages (available in the [requirements](requirements) folder) have\ntheir own licenses, which can be consulted on their respective websites.\n\n------------------------------------------------------------------------\n\n## Installation\n\nAlphaBase can be installed and used on all major operating systems\n(Windows, macOS and Linux). There are two different types of\ninstallation possible:\n\n- [**Pip installer:**](#pip) Choose this installation if you want to use\n  AlphaBase as a Python package in an existing Python 3.8 environment\n  (e.g.\u00a0a Jupyter notebook).\n- [**Developer installer:**](#developer) Choose this installation if you\n  are familiar with [conda](https://docs.conda.io/en/latest/) and\n  Python. This installation allows access to all available features of\n  AlphaBase and even allows to modify its source code directly.\n  Generally, the developer version of AlphaBase outperforms the\n  precompiled versions which makes this the installation of choice for\n  high-throughput experiments.\n\n### Pip\n\nAlphaBase can be installed in an existing Python 3.8 environment with a\nsingle `bash` command. *This `bash` command can also be run directly\nfrom within a Jupyter notebook by prepending it with a `!`*:\n\n``` bash\npip install alphabase\n```\n\nInstalling AlphaBase like this avoids conflicts when integrating it in\nother tools, as this does not enforce strict versioning of dependencies.\nHowever, if new versions of dependencies are released, they are not\nguaranteed to be fully compatible with AlphaBase. While this should only\noccur in rare cases where dependencies are not backwards compatible, you\ncan always force AlphaBase to use dependency versions which are known to\nbe compatible with:\n\n``` bash\npip install \"alphabase[stable]\"\n```\n\nNOTE: You might need to run `pip install -U pip` before installing\nAlphaBase like this. Also note the double quotes `\"`.\nIf you are using the `quant_reader` module, it is advisable to add the\n`dask-stable` or `dask` extras to speed up processing large files.\nYou need to install the `hdf` extra option of the package to be able to read alphapept protein group matrices in hdf format.\n\nFor those who are really adventurous, it is also possible to directly\ninstall any branch (e.g.\u00a0`@main`) with any extras\n(e.g.\u00a0`#egg=alphabase[stable,development]`) from GitHub with e.g.\n\n``` bash\npip install \"git+https://github.com/MannLabs/alphabase.git@main#egg=alphabase[stable,development]\"\n```\n\n### Developer\n\nAlphaBase can also be installed in editable (i.e.\u00a0developer) mode with a\nfew `bash` commands. This allows to fully customize the software and\neven modify the source code to your specific needs. When an editable\nPython package is installed, its source code is stored in a transparent\nlocation of your choice. While optional, it is advised to first (create\nand) navigate to e.g.\u00a0a general software folder:\n\n``` bash\nmkdir ~/folder/where/to/install/software\ncd ~/folder/where/to/install/software\n```\n\n***The following commands assume you do not perform any additional `cd`\ncommands anymore***.\n\nNext, download the AlphaBase repository from GitHub either directly or\nwith a `git` command. This creates a new AlphaBase subfolder in your\ncurrent directory.\n\n``` bash\ngit clone https://github.com/MannLabs/alphabase.git\n```\n\nFor any Python package, it is highly recommended to use a separate\n[conda virtual environment](https://docs.conda.io/en/latest/), as\notherwise *dependency conflicts can occur with already existing\npackages*.\n\n``` bash\nconda create --name alphabase python=3.9 -y\nconda activate alphabase\n```\n\nFinally, AlphaBase and all its [dependencies](requirements) need to be\ninstalled. To take advantage of all features and allow development (with\nthe `-e` flag), this is best done by also installing the [development\ndependencies](requirements/requirements_development.txt) instead of only\nthe [core dependencies](requirements/requirements.txt):\n\n``` bash\npip install -e \"./alphabase[development]\"\n```\n\nBy default this installs loose dependencies (no explicit versioning),\nalthough it is also possible to use stable dependencies\n(e.g.\u00a0`pip install -e \"./alphabase[stable,development]\"`).\n\n***By using the editable flag `-e`, all modifications to the [AlphaBase\nsource code folder](alphabase) are directly reflected when running\nAlphaBase. Note that the AlphaBase folder cannot be moved and/or renamed\nif an editable version is installed. In case of confusion, you can\nalways retrieve the location of any Python module with e.g.\u00a0the command\n`import module` followed by `module.__file__`.***\n\n------------------------------------------------------------------------\n\n## Usage\n\nTODO\n\n------------------------------------------------------------------------\n\n## Troubleshooting\n\nIn case of issues, check out the following:\n\n- [Issues](https://github.com/MannLabs/alphabase/issues): Try a few\n  different search terms to find out if a similar problem has been\n  encountered before\n- [Discussions](https://github.com/MannLabs/alphabase/discussions):\n  Check if your problem or feature requests has been discussed before.\n\n------------------------------------------------------------------------\n\n## How to contribute\n\nIf you like this software, you can give us a\n[star](https://github.com/MannLabs/alphabase/stargazers) to boost our\nvisibility! All direct contributions are also welcome. Feel free to post\na new [issue](https://github.com/MannLabs/alphabase/issues) or clone the\nrepository and create a [pull\nrequest](https://github.com/MannLabs/alphabase/pulls) with a new branch.\nFor an even more interactive participation, check out the\n[discussions](https://github.com/MannLabs/alphabase/discussions) and the\n[the Contributors License Agreement](misc/CLA.md).\n\n### Notes for developers\n\n#### 1. Code Structure\nWhile AlphaBase offers an object-oriented interface, algorithms for manipulating data should be implemented in a functional way and called from class methods. This allows the functions to be reused without instatiating a class.\n\n#### 2. DataFrame Handling\n- Return DataFrames in the same order as they were passed\n- Minimize in-place modifications of DataFrames. Mention them explicitly in the docstring\n- Implement low-level functions that operate on numpy arrays and return arrays. Use higher-level functions to assign array results to DataFrames\n\n#### 3. Data Assumptions\nAvoid making assumptions about:\n- Precursor ordering by `nAA`\n- Fragment indices ordering (e.g., `frag_start_idx`)\n- Continuity of `frag_start_idx` where `frag_start_idx[i+1] == frag_stop_idx[i]`\n- All fragments being assigned to a precursor\n\nAssumptions are only permitted for low-level or optimized functions and should be documented in the docstring.\n\n#### 3. Optimization Strategy\nWhen performance optimization is needed:\n1. Implement the general solution first\n2. Add optimized versions for special cases for refined precursor df or order `nAA`\n3. Check conditions at runtime to use optimized versions when applicable\n\n#### 4. Code Quality\n- Include python type hints\n- Include docstrings in numpy style (see [numpy docstring example](https://www.sphinx-doc.org/en/master/usage/extensions/example_numpy.html#example-numpy))\n\n\n#### 5. pre-commit hooks\nIt is highly recommended to use the provided pre-commit hooks, as the CI pipeline enforces all checks therein to\npass in order to merge a branch.\n\nThe hooks need to be installed once by\n```bash\npre-commit install\n```\nYou can run the checks yourself using:\n```bash\npre-commit run --all-files\n```\n\n#### 6. Tagging of Pull Requests\nIn order to have release notes automatically generated, pull requests need to be tagged with labels.\nThe following labels are used (should be safe-explanatory):\n`breaking-change`, `bug`, `enhancement`.\n\n#### 7. Release a new version\nThis package uses a shared release process defined in the\n[alphashared](https://github.com/MannLabs/alphashared) repository. Please see the instructions\n[there](https://github.com/MannLabs/alphashared/blob/reusable-release-workflow/.github/workflows/README.md#release-a-new-version).\n\n\n------------------------------------------------------------------------\n\n## Changelog\n\nFor a full overview of the changes made in each version see [CHANGELOG.md](CHANGELOG.md) (until version 1.1.0) and the github release notes (from >1.1.0).\n",
    "bugtrack_url": null,
    "license": "Apache License\n                                   Version 2.0, January 2004\n                                http://www.apache.org/licenses/\n        \n           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n        \n           1. Definitions.\n        \n              \"License\" shall mean the terms and conditions for use, reproduction,\n              and distribution as defined by Sections 1 through 9 of this document.\n        \n              \"Licensor\" shall mean the copyright owner or entity authorized by\n              the copyright owner that is granting the License.\n        \n              \"Legal Entity\" shall mean the union of the acting entity and all\n              other entities that control, are controlled by, or are under common\n              control with that entity. For the purposes of this definition,\n              \"control\" means (i) the power, direct or indirect, to cause the\n              direction or management of such entity, whether by contract or\n              otherwise, or (ii) ownership of fifty percent (50%) or more of the\n              outstanding shares, or (iii) beneficial ownership of such entity.\n        \n              \"You\" (or \"Your\") shall mean an individual or Legal Entity\n              exercising permissions granted by this License.\n        \n              \"Source\" form shall mean the preferred form for making modifications,\n              including but not limited to software source code, documentation\n              source, and configuration files.\n        \n              \"Object\" form shall mean any form resulting from mechanical\n              transformation or translation of a Source form, including but\n              not limited to compiled object code, generated documentation,\n              and conversions to other media types.\n        \n              \"Work\" shall mean the work of authorship, whether in Source or\n              Object form, made available under the License, as indicated by a\n              copyright notice that is included in or attached to the work\n              (an example is provided in the Appendix below).\n        \n              \"Derivative Works\" shall mean any work, whether in Source or Object\n              form, that is based on (or derived from) the Work and for which the\n              editorial revisions, annotations, elaborations, or other modifications\n              represent, as a whole, an original work of authorship. For the purposes\n              of this License, Derivative Works shall not include works that remain\n              separable from, or merely link (or bind by name) to the interfaces of,\n              the Work and Derivative Works thereof.\n        \n              \"Contribution\" shall mean any work of authorship, including\n              the original version of the Work and any modifications or additions\n              to that Work or Derivative Works thereof, that is intentionally\n              submitted to Licensor for inclusion in the Work by the copyright owner\n              or by an individual or Legal Entity authorized to submit on behalf of\n              the copyright owner. For the purposes of this definition, \"submitted\"\n              means any form of electronic, verbal, or written communication sent\n              to the Licensor or its representatives, including but not limited to\n              communication on electronic mailing lists, source code control systems,\n              and issue tracking systems that are managed by, or on behalf of, the\n              Licensor for the purpose of discussing and improving the Work, but\n              excluding communication that is conspicuously marked or otherwise\n              designated in writing by the copyright owner as \"Not a Contribution.\"\n        \n              \"Contributor\" shall mean Licensor and any individual or Legal Entity\n              on behalf of whom a Contribution has been received by Licensor and\n              subsequently incorporated within the Work.\n        \n           2. Grant of Copyright License. Subject to the terms and conditions of\n              this License, each Contributor hereby grants to You a perpetual,\n              worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n              copyright license to reproduce, prepare Derivative Works of,\n              publicly display, publicly perform, sublicense, and distribute the\n              Work and such Derivative Works in Source or Object form.\n        \n           3. Grant of Patent License. Subject to the terms and conditions of\n              this License, each Contributor hereby grants to You a perpetual,\n              worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n              (except as stated in this section) patent license to make, have made,\n              use, offer to sell, sell, import, and otherwise transfer the Work,\n              where such license applies only to those patent claims licensable\n              by such Contributor that are necessarily infringed by their\n              Contribution(s) alone or by combination of their Contribution(s)\n              with the Work to which such Contribution(s) was submitted. If You\n              institute patent litigation against any entity (including a\n              cross-claim or counterclaim in a lawsuit) alleging that the Work\n              or a Contribution incorporated within the Work constitutes direct\n              or contributory patent infringement, then any patent licenses\n              granted to You under this License for that Work shall terminate\n              as of the date such litigation is filed.\n        \n           4. Redistribution. You may reproduce and distribute copies of the\n              Work or Derivative Works thereof in any medium, with or without\n              modifications, and in Source or Object form, provided that You\n              meet the following conditions:\n        \n              (a) You must give any other recipients of the Work or\n                  Derivative Works a copy of this License; and\n        \n              (b) You must cause any modified files to carry prominent notices\n                  stating that You changed the files; and\n        \n              (c) You must retain, in the Source form of any Derivative Works\n                  that You distribute, all copyright, patent, trademark, and\n                  attribution notices from the Source form of the Work,\n                  excluding those notices that do not pertain to any part of\n                  the Derivative Works; and\n        \n              (d) If the Work includes a \"NOTICE\" text file as part of its\n                  distribution, then any Derivative Works that You distribute must\n                  include a readable copy of the attribution notices contained\n                  within such NOTICE file, excluding those notices that do not\n                  pertain to any part of the Derivative Works, in at least one\n                  of the following places: within a NOTICE text file distributed\n                  as part of the Derivative Works; within the Source form or\n                  documentation, if provided along with the Derivative Works; or,\n                  within a display generated by the Derivative Works, if and\n                  wherever such third-party notices normally appear. The contents\n                  of the NOTICE file are for informational purposes only and\n                  do not modify the License. You may add Your own attribution\n                  notices within Derivative Works that You distribute, alongside\n                  or as an addendum to the NOTICE text from the Work, provided\n                  that such additional attribution notices cannot be construed\n                  as modifying the License.\n        \n              You may add Your own copyright statement to Your modifications and\n              may provide additional or different license terms and conditions\n              for use, reproduction, or distribution of Your modifications, or\n              for any such Derivative Works as a whole, provided Your use,\n              reproduction, and distribution of the Work otherwise complies with\n              the conditions stated in this License.\n        \n           5. Submission of Contributions. Unless You explicitly state otherwise,\n              any Contribution intentionally submitted for inclusion in the Work\n              by You to the Licensor shall be under the terms and conditions of\n              this License, without any additional terms or conditions.\n              Notwithstanding the above, nothing herein shall supersede or modify\n              the terms of any separate license agreement you may have executed\n              with Licensor regarding such Contributions.\n        \n           6. Trademarks. This License does not grant permission to use the trade\n              names, trademarks, service marks, or product names of the Licensor,\n              except as required for reasonable and customary use in describing the\n              origin of the Work and reproducing the content of the NOTICE file.\n        \n           7. Disclaimer of Warranty. Unless required by applicable law or\n              agreed to in writing, Licensor provides the Work (and each\n              Contributor provides its Contributions) on an \"AS IS\" BASIS,\n              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n              implied, including, without limitation, any warranties or conditions\n              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n              PARTICULAR PURPOSE. You are solely responsible for determining the\n              appropriateness of using or redistributing the Work and assume any\n              risks associated with Your exercise of permissions under this License.\n        \n           8. Limitation of Liability. In no event and under no legal theory,\n              whether in tort (including negligence), contract, or otherwise,\n              unless required by applicable law (such as deliberate and grossly\n              negligent acts) or agreed to in writing, shall any Contributor be\n              liable to You for damages, including any direct, indirect, special,\n              incidental, or consequential damages of any character arising as a\n              result of this License or out of the use or inability to use the\n              Work (including but not limited to damages for loss of goodwill,\n              work stoppage, computer failure or malfunction, or any and all\n              other commercial damages or losses), even if such Contributor\n              has been advised of the possibility of such damages.\n        \n           9. Accepting Warranty or Additional Liability. While redistributing\n              the Work or Derivative Works thereof, You may choose to offer,\n              and charge a fee for, acceptance of support, warranty, indemnity,\n              or other liability obligations and/or rights consistent with this\n              License. However, in accepting such obligations, You may act only\n              on Your own behalf and on Your sole responsibility, not on behalf\n              of any other Contributor, and only if You agree to indemnify,\n              defend, and hold each Contributor harmless for any liability\n              incurred by, or claims asserted against, such Contributor by reason\n              of your accepting any such warranty or additional liability.\n        \n           END OF TERMS AND CONDITIONS\n        \n           APPENDIX: How to apply the Apache License to your work.\n        \n              To apply the Apache License to your work, attach the following\n              boilerplate notice, with the fields enclosed by brackets \"[]\"\n              replaced with your own identifying information. (Don't include\n              the brackets!)  The text should be enclosed in the appropriate\n              comment syntax for the file format. We also recommend that a\n              file or class name and description of purpose be included on the\n              same \"printed page\" as the copyright notice for easier\n              identification within third-party archives.\n        \n           Copyright 2020 MannLabs\n        \n           Licensed under the Apache License, Version 2.0 (the \"License\");\n           you may not use this file except in compliance with the License.\n           You may obtain a copy of the License at\n        \n               http://www.apache.org/licenses/LICENSE-2.0\n        \n           Unless required by applicable law or agreed to in writing, software\n           distributed under the License is distributed on an \"AS IS\" BASIS,\n           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n           See the License for the specific language governing permissions and\n           limitations under the License.\n        ",
    "summary": "An infrastructure Python package of the AlphaX ecosystem",
    "version": "1.7.0",
    "project_urls": {
        "Documentation": "https://alphabase.readthedocs.io/en/latest/",
        "Issues": "https://github.com/MannLabs/alphabase/issues",
        "Mann Labs Homepage": "https://www.biochem.mpg.de/mann",
        "Paper preprint": "https://www.biochem.mpg.de/mann",
        "Repository": "https://github.com/MannLabs/alphabase"
    },
    "split_keywords": [
        "mass spectrometry",
        " proteomics",
        " bioinformatics",
        " alphapept",
        " alphapept ecosystem",
        " alphax ecosystem"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a485f2ec3feda874e7f8c4a529263f2b43a6528e97f82f6ab02c5230372d8805",
                "md5": "53b6ca908928f78a788572258f057f59",
                "sha256": "48710d8dba06801ef105301847a82325601e6d4a43b339ebf482697d16037b4a"
            },
            "downloads": -1,
            "filename": "alphabase-1.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "53b6ca908928f78a788572258f057f59",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 293170,
            "upload_time": "2025-09-08T13:38:10",
            "upload_time_iso_8601": "2025-09-08T13:38:10.741369Z",
            "url": "https://files.pythonhosted.org/packages/a4/85/f2ec3feda874e7f8c4a529263f2b43a6528e97f82f6ab02c5230372d8805/alphabase-1.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d764931aa318eb9a291d4cb1b46d4f5f065001d157f271b7a5a4fef1755f6909",
                "md5": "ec75fd9de299f5082241b9ca8e5ef8e4",
                "sha256": "bdff50f73d67a2c83ba3be2a3c76b1c1c13d8ad546eb569ab3e3f8fcea03677c"
            },
            "downloads": -1,
            "filename": "alphabase-1.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ec75fd9de299f5082241b9ca8e5ef8e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 269922,
            "upload_time": "2025-09-08T13:38:12",
            "upload_time_iso_8601": "2025-09-08T13:38:12.063627Z",
            "url": "https://files.pythonhosted.org/packages/d7/64/931aa318eb9a291d4cb1b46d4f5f065001d157f271b7a5a4fef1755f6909/alphabase-1.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-08 13:38:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MannLabs",
    "github_project": "alphabase",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "alphabase"
}
        
Elapsed time: 1.08725s