Skip to main content

Finding the perfect modification for your mass shift

Project description

Mumble

Finding the perfect unimod match for your mass shifted PSM

Overview

The PSM Modification Handler is a Python-based tool designed to find candidate unimod modifications for mass shifts. The tool allows users to apply modifications to PSMs, localize mass shifts, and generate lists of modified PSMs.

Features

  • PSM Modification: Apply specific modifications to PSMs and generate modified PSM lists.
  • Mass Shift Localization: Identify potential modifications in peptides by localizing mass shifts.
  • Flexible Input/Output: Read PSMs from various file formats, modify them, and write the results to different output formats.
  • Customizable Modifications: Supports the addition of amino acid combinations and handles custom modifications through the Unimod database.

Installation

Prerequisites

  • Python 3.9 or higher
  • pip (Python package installer)

Required Libraries

Install the required Python library using the following command:

pip install mumble

Basic Usage

Here's a quick example of how to use the PSM Modification Handler for single PSMs:

>>> from mumble import PSMHandler
>>> from psm_utils import PSM

>>> # Initialize the PSMHandler
>>> psm_handler = PSMHandler(aa_combinations=0, fasta_file=None, mass_error=0.02)

>>> # Create a minimal PSM to generate modified version from
>>> psm = PSM(
...     peptidoform="ARTHR/3",
...     precursor_mz=228.129628 # Required information
... )
>>> # Generate proteoforms for given PSM with a certain MZ
>>> modified_proteoforms = PSMHandler.get_modified_peptidoforms_list(psm, keep_original=False)


>>> # Write the modified PSM list to a file
>>> psm_handler.write_modified_psm_list(modified_proteoforms, output_file="modified_proteoforms.tsv", psm_file_type="tsv")

>>> print(modified_proteoforms)
# [
#     PSM(
#         peptidoform="[Acetyl]-ARTHR/3"
#         precursor_mz=228.129628
#     )
# ]

Here's a quick example of how to use the PSM Modification Handler for PSM lists:

>>> # Or load a PSM list (from a file or PSMList object)
>>> psm_list = psm_handler.parse_psm_list("path/to/psm_file.mzid", psm_file_type="mzid")

>>> # Add modified PSMs to the list
>>> modified_psm_list = psm_handler.add_modified_psms(psm_list, generate_modified_decoys=False, keep_original=True)

>>> # Write the modified PSM list to a file
>>> psm_handler.write_modified_psm_list(modified_psm_list, output_file="modified_psms.tsv", psm_file_type="tsv")

For more information on PSM objects and PSM lists visit psm_utils

Testing

The project includes unit tests using pytest to ensure code reliability.

Running Tests

To run the tests, simply use the following command:

pytest

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature-name).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature-name).
  5. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • PSMUtils: For providing core utilities for PSM handling. (psm_utils)
  • Pyteomics: For offering tools to handle mass spectrometry data. (pyteomics)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mumble-0.0.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Mumble-0.0.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file mumble-0.0.1.tar.gz.

File metadata

  • Download URL: mumble-0.0.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for mumble-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ce2b99c3e75cbc0e1d958caf1321d4d9592e59182ea086902f24898794583529
MD5 4a05b6aa38495c54f687db59595e8eae
BLAKE2b-256 fa05c91cc2edbf6ba223862b5ec497d655232dc211ac071fc37d4a5d35d2985d

See more details on using hashes here.

File details

Details for the file Mumble-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Mumble-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for Mumble-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8caae25466fe714cc8d5fefe8a59a8a18ec6ad856888f83d94e8994a362834b
MD5 2da11e5c407dc54f5f609583577afe05
BLAKE2b-256 9719b533ee2e6745f7248f3d9086754192104c2e653458916917b6634404ee45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page