Skip to content

Commit

Permalink
documentation prepared for filling
Browse files Browse the repository at this point in the history
  • Loading branch information
picciama committed Jul 31, 2024
1 parent 0484fcd commit 3fa1562
Show file tree
Hide file tree
Showing 17 changed files with 91 additions and 236 deletions.
51 changes: 9 additions & 42 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 @@ -21,7 +21,7 @@ spectrum_fundamentals
.. |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,43 +31,10 @@ spectrum_fundamentals
:target: https://github.com/psf/black
:alt: Black

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
--------

- 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
------------

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_.
spectrum_fundamentals is a package primarily developed for usage within the rescoring and spectral library generation pipeline oktoberfest (https://github.com/wilhelm-lab/oktoberfest).

.. _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%20oktoberfest%20Package/badge.svg)](https://github.com/wilhelm-lab/spectrum_fundamentals/actions?workflow=Package)
[![Tests](https://github.com/wilhelm-lab/spectrum_fundamentals/workflows/Run%20oktoberfest%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)
36 changes: 14 additions & 22 deletions docs/API.rst
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
.. module:: spectrum_io
.. module:: spectrum_fundamentals

.. automodule:: spectrum_io
.. automodule:: spectrum_fundamentals
:noindex:

API
===

Import SpectrumIO using
Import spectrum_fundamentals using

.. code-block:: python
import spectrum_io as specio
import spectrum_fundamentals as specfun
File conversions
----------------
.. module:: spectrum_io.d
Modstring conversions: :code:`convert`
--------------------------------------

.. currentmodule:: spectrum_io

Todo: add functions for bruker d conversions here
Peptide and ion mass / mz calculations: :code:`peptide`
-------------------------------------------------------

.. autosummary::
:toctree: api/d

.. module:: spectrum_io.raw
Annotation of spectra: :code:`annot`
------------------------------------

.. currentmodule:: spectrum_io

Todo: add functions for thermoraw here

Modstring conversions
---------------------

Todo
----

other modules
Spectral similarity calculation: :code:`similarity`
---------------------------------------------------


Further utility functions: :code:`utils`
----------------------------------------
4 changes: 2 additions & 2 deletions docs/_key_contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* `Mario Picciani <https://github.com/picciama>`_: lead developer since 2022, maintainer
* `Mostafa Kalhor <https://github.com/mostafakalhor>`_: developer, crosslinking
* `Wassim Gabriel <https://github.com/WassimG>`_: developer, PTMs, neutral losses, GUI
* Arne van den Berg: developer, diverse contributions
* `Arne van den Berg <https://github.com/arne-vdb>`_: developer, diverse contributions
* `Victor-George Giurcoiu <https://github.com/victorgiurcoiu>`_: developer, diverse contributions
* `Ludwig Lautenbacher <https://github.com/LLautenbacher>`_: developer, Koina, GUI
* `Armin Soleymaniniya <https://github.com/arminsl>`_: developer, GUI
* Ayla Schröder: developer, pickedGroupFDR
* `Ayla Schröder <https://github.com/ayla-s>`_: developer, pickedGroupFDR
* Zixuan Xiao: developer, GUI

Previous developers
Expand Down
13 changes: 0 additions & 13 deletions docs/authors.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Request features on the `Issue Tracker`_.
How to set up your development environment
------------------------------------------

You need Python 3.8+ and the following tools:
You need Python 3.9+ and the following tools:

- Poetry_
- Nox_
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
reference

.. _github: https://github.com/wilhelm-lab/spectrum_fundamentals

11 changes: 7 additions & 4 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.. highlight:: shell

============
Installation
============

.. include:: ../README.rst
:start-line: 40
:end-line: 47
spectrum_fundamentals is listed on the Python Package Index (PyPI) and can be installed with pip.

.. code-block:: bash
pip install spectrum_fundamentals
3 changes: 2 additions & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Quickstart

- Discuss usage, development and issues on `GitHub <https://github.com/wilhelm-lab/spectrum_fundamentals>`_.
- Check the `usage principles <./usage.html>`_ or the `API <./API.html>`_.
- Check the `Contributor Guide <./contributing.html>`_ if you want to participate in developing.
- Check the `Contributor Guide <./contributing.html>`_ if you want to participate in developing.
- Consider citing the main publication, `Oktoberfest <https://doi.org/10.1002/pmic.202300112>`_.
10 changes: 8 additions & 2 deletions docs/reference.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
References
==========
How to cite
===========

If you want to cite spectrum_fundamentals in your work, please cite the main Oktoberfest publication following:

.. [1] 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>`__.
21 changes: 0 additions & 21 deletions docs/spectrum_fundamentals.annotation.rst

This file was deleted.

45 changes: 0 additions & 45 deletions docs/spectrum_fundamentals.metrics.rst

This file was deleted.

54 changes: 0 additions & 54 deletions docs/spectrum_fundamentals.rst

This file was deleted.

Loading

0 comments on commit 3fa1562

Please sign in to comment.