Skip to content

Commit

Permalink
Merge remote-tracking branch 'wilhelmlab/development' into OpenMS_sup…
Browse files Browse the repository at this point in the history
…port
  • Loading branch information
picciama committed Nov 22, 2024
2 parents 0395b3f + 728b111 commit 4043fae
Show file tree
Hide file tree
Showing 61 changed files with 72,059 additions and 69,583 deletions.
2 changes: 1 addition & 1 deletion .cookietemple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ full_name: Victor Giurcoiu
email: [email protected]
project_name: spectrum_fundamentals
project_short_description: Fundamentals public repo
version: 0.5.2
version: 0.7.8
license: MIT
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name-template: "0.5.2 🌈" # <<COOKIETEMPLE_FORCE_BUMP>>
tag-template: 0.5.2 # <<COOKIETEMPLE_FORCE_BUMP>>
name-template: "0.7.8 " # <<COOKIETEMPLE_FORCE_BUMP>>
tag-template: 0.7.8 # <<COOKIETEMPLE_FORCE_BUMP>>
exclude-labels:
- "skip-changelog"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: [3.8, 3.9]
python: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Setup Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.3
uses: actions/checkout@v4

- name: Run Labeler
uses: crazy-max/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main_master_branch_protection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: "3.8"
python-version: "3.9"
# PRs to the repository master branch are only ok if coming from any patch or release branch
- name: Install mlf-core
run: pip install mlf-core
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Setup Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: 3.8
python-version: 3.9

- name: Install pip
run: |
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Deploy
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'}}
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
6 changes: 3 additions & 3 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: "3.9"

Expand All @@ -29,7 +29,7 @@ jobs:
poetry build --ansi
- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@v1.8.14
uses: pypa/gh-action-pypi-publish@v1.10.3
with:
# TODO COOKIETEMPLE: Configure your PyPI Token to enable automatic deployment to PyPi on releases
# https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 2 additions & 2 deletions .github/workflows/run_cookietemple_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Setup Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: 3.9

Expand Down
41 changes: 21 additions & 20 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,47 @@ jobs:
matrix:
include:
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "pre-commit",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "safety",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "mypy",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "tests",
}
- {
python-version: 3.8,
python-version: 3.9,
os: windows-latest,
session: "tests",
}
- {
python-version: 3.8,
python-version: 3.9,
os: macos-latest,
session: "tests",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "typeguard",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "xdoctest",
}
- {
python-version: 3.8,
python-version: 3.9,
os: ubuntu-latest,
session: "docs-build",
}
Expand All @@ -69,10 +69,10 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -116,15 +116,16 @@ jobs:
run: nox --force-color --python=${{ matrix.python-version }}

- name: Upload coverage data
if: always() && matrix.session == 'tests'
uses: actions/upload-artifact@v3
if: always() && matrix.session == 'tests' && matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
include-hidden-files: "true"
name: coverage-data
path: ".coverage.*"

- name: Upload documentation
if: matrix.session == 'docs-build'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/_build
Expand All @@ -134,12 +135,12 @@ jobs:
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v5.1.0
- name: Set up Python 3.9
uses: actions/setup-python@v5.2.0
with:
python-version: 3.8
python-version: 3.9

- name: Install Poetry
run: |
Expand All @@ -154,7 +155,7 @@ jobs:
nox --version
- name: Download coverage data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage-data

Expand All @@ -165,4 +166,4 @@ jobs:
run: nox --force-color --session=coverage -- xml -i

- name: Upload coverage report
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v4.6.0
6 changes: 3 additions & 3 deletions .github/workflows/sync_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.2.0
with:
python-version: 3.8
python-version: 3.9

- name: Install cookietemple
run: pip install cookietemple

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: "${{ secrets.CT_SYNC_TOKEN }}"
Expand Down
49 changes: 11 additions & 38 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spectrum_fundamentals
===========================
Spectrum Fundamentals
=====================

|PyPI| |Python Version| |License| |Read the Docs| |Build| |Tests| |Codecov| |pre-commit| |Black|

Expand All @@ -13,15 +13,15 @@ spectrum_fundamentals
:target: https://opensource.org/licenses/MIT
:alt: License
.. |Read the Docs| image:: https://img.shields.io/readthedocs/spectrum_fundamentals/latest.svg?label=Read%20the%20Docs
:target: https://spectrum_fundamentals.readthedocs.io/
:alt: Read the documentation at https://spectrum_fundamentals.readthedocs.io/
:target: https://spectrum-fundamentals.readthedocs.io/
:alt: Read the documentation at https://spectrum-fundamentals.readthedocs.io/
.. |Build| image:: https://github.com/wilhelm-lab/spectrum_fundamentals/workflows/Build%20spectrum_fundamentals%20Package/badge.svg
:target: https://github.com/wilhelm-lab/spectrum_fundamentals/actions?workflow=Package
:alt: Build Package Status
.. |Tests| image:: https://github.com/wilhelm-lab/spectrum_fundamentals/workflows/Run%20spectrum_fundamentals%20Tests/badge.svg
:target: https://github.com/wilhelm-lab/spectrum_fundamentals/actions?workflow=Tests
:alt: Run Tests Status
.. |Codecov| image:: https://codecov.io/gh/wilhelm-lab/spectrum_fundamentals/branch/master/graph/badge.svg
.. |Codecov| image:: https://codecov.io/gh/wilhelm-lab/spectrum_fundamentals/branch/main/graph/badge.svg
:target: https://codecov.io/gh/wilhelm-lab/spectrum_fundamentals
:alt: Codecov
.. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
Expand All @@ -31,37 +31,10 @@ spectrum_fundamentals
:target: https://github.com/psf/black
:alt: Black

spectrum_fundamentals is a package primarily developed for usage within the rescoring and spectral library generation pipeline oktoberfest (https://github.com/wilhelm-lab/oktoberfest).

Features
--------

* TODO


Installation
------------

You can install *spectrum_fundamentals* via pip_ from PyPI_:

.. code:: console
$ pip install spectrum_fundamentals
Usage
-----

Please see the `Command-line Reference <Usage_>`_ for details.


Credits
-------

This package was created with cookietemple_ using Cookiecutter_ based on Hypermodern_Python_Cookiecutter_.

.. _cookietemple: https://cookietemple.com
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _PyPI: https://pypi.org/
.. _Hypermodern_Python_Cookiecutter: https://github.com/cjolowicz/cookiecutter-hypermodern-python
.. _pip: https://pip.pypa.io/
.. _Usage: https://spectrum_fundamentals.readthedocs.io/en/latest/usage.html
It provides the following functionalities:
- conversion between search engine-specific modstrings and the ProForma standard
- calculation of theoretical peptide / ion masses
- annotation of spectra
- spectral similarity calculation with various metrics
47 changes: 21 additions & 26 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
# Spectrum Fundamentals

Spectrum Fundamentals is a package we use in our rescoring pipeline. It was created to be able to handle spectra from different files.

## Features
[![PyPI](https://img.shields.io/pypi/v/spectrum_fundamentals.svg)](https://pypi.org/project/spectrum_fundamentals/)
[![Python Version](https://img.shields.io/pypi/pyversions/spectrum_fundamentals)](https://pypi.org/project/spectrum_fundamentals)
[![License](https://img.shields.io/github/license/wilhelm-lab/spectrum_fundamentals)](https://opensource.org/licenses/MIT)
[![Read the Docs](https://img.shields.io/readthedocs/spectrum_fundamentals/latest.svg?label=Read%20the%20Docs)](https://spectrum-fundamentals.readthedocs.io/)
[![Build](https://github.com/wilhelm-lab/spectrum_fundamentals/workflows/Build%20spectrum_fundamentals%20Package/badge.svg)](https://github.com/wilhelm-lab/spectrum_fundamentals/actions?workflow=Package)
[![Tests](https://github.com/wilhelm-lab/spectrum_fundamentals/workflows/Run%20spectrum_fundamentals%20Tests/badge.svg)](https://github.com/wilhelm-lab/spectrum_fundamentals/actions?workflow=Tests)
[![Codecov](https://codecov.io/gh/wilhelm-lab/spectrum_fundamentals/branch/main/graph/badge.svg)](https://codecov.io/gh/wilhelm-lab/spectrum_fundamentals)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

- Annotate Spectra.
- Modify peptide sequence to follow one of the recommended notations of ProForma.
- Generate features than can be used by percoltor for rescoring (spectral angle, cosine similarity, Pearson's correlation, Spearman's correlation, etc.).

## Installation

Install with:
# Spectrum Fundamentals

```
pip install git+https://github.com/wilhelm-lab/spectrum_fundamentals
```
spectrum_fundamentals is a package primarily developed for usage within the rescoring and spectral library generation pipeline oktoberfest (https://github.com/wilhelm-lab/oktoberfest).

## Usage
It provides the following functionalities:

### Annotation Pipeline
- conversion between search engine-specific modstrings and the ProForma standard
- calculation of theoretical peptide / ion masses
- annotation of spectra
- spectral similarity calculation with various metrics

The annotation script can be found in the package in annotation/annotation.py.
## Documentation

- Install and import the function:
The official documentation can be found at https://spectrum-fundamentals.readthedocs.io

```
from spectrum_fundamentals.annotation.annotation import annotate_spectra
```
## How to cite

- Apply the function on any given dataframe with peptides meta data, raw intensities and mz:
Please always cite the main publication:

```
annotate_spectra(dataframe)
```
[Oktoberfest] Picciani M, Gabriel W, Giurcoiu VG et al. (2023), _Oktoberfest: Open-source spectral library generation and rescoring pipeline based on Prosit_, [Proteomics](https://doi.org/10.1002/pmic.202300112)
Loading

0 comments on commit 4043fae

Please sign in to comment.