Skip to main content

A package for proccesing and aligning peaklist Mass-spectrometry imaging data from .imzml files

Project description

Package pelmesha

pelmesha (Peak Extraction Library for Mass spectrometry Enhanced by Statistical High-throughput Analysis) is a Python package that allows users to process Mass Spectrometry Imaging (MSI) data from imzml files. It provides several features, including:

  1. Conversion of raw imzml data to the hdf5 format (function imzml2hdf5 from module pspectra)
  2. Processing of mass spectra (function Raw2proc from module pspectra)
  3. Creation of peaklists from the data (functions proc2peaklist and Raw2peaklist from module pspectra)
  4. Generation of a feature matrix from a single image's peaklist by grouping peaks (function Pgrouping_KD from module pfeats)
  5. Generation of a feature matrix for multiple images from the peaklists of each image (function Roi_Pgrouping_KD from module pfeats)

The processing of mass spectra includes several steps:

  • Data resampling — This process allows you to bring data to a uniform scale between points on the mz and to a single scale on the mz.
  • Alignment of spectra relative to reference peaks using the msalign tool. It should be noted that msalign does a worse job with non-continuous and non-uniform data, so it is strongly recommended to perform a resampling process before using it. Also msalign is modified in this package for correct work with other steps.
  • Baseline correction using the pybaselines package.
  • Smoothing — based on code snippets from the mMass library, which provide smoothing using the moving average, Gaussian, and Savitsky-Goley algorithms.
  • Peak-picking — peaks in the spectrum are searched and filtered.

In the mass spectra in the image, there is a slight difference in the peak values, even after alignment during processing. To further analyze these spectra, it will be necessary to group the peaks based on their relative positions and create a feature matrix as a result.

The Pgrouping_KD and Roi_Pgrouping_KD functions combine the wandering peak values from signals in mass spectra into a single mz value based on their kernel density estimation. This is achieved by determining the centers around which the peak values are located.

To ensure accurate results, high-quality bandwidth selection is required. This can be done manually or automatically. The probability density is estimated using the FFTKDE function from the kdepy package, which is extremely fast and uses Fourier transforms for calculation.

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

pelmesha-0.1.3.dev2.tar.gz (21.9 MB view details)

Uploaded Source

Built Distribution

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

pelmesha-0.1.3.dev2-py3-none-any.whl (61.1 kB view details)

Uploaded Python 3

File details

Details for the file pelmesha-0.1.3.dev2.tar.gz.

File metadata

  • Download URL: pelmesha-0.1.3.dev2.tar.gz
  • Upload date:
  • Size: 21.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pelmesha-0.1.3.dev2.tar.gz
Algorithm Hash digest
SHA256 1e0b1e8814a50240e95c48bf0edd56f6b33904391744fa24739a20e5db54e3bf
MD5 d59587d663f9906eed901058bbb03904
BLAKE2b-256 84cc7b349f52e19cc44c1bf64c25ec2fe6d1534117949e87495eaf19f6981bba

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelmesha-0.1.3.dev2.tar.gz:

Publisher: publish_to_pypi.yml on Testudinata/pelmesha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pelmesha-0.1.3.dev2-py3-none-any.whl.

File metadata

  • Download URL: pelmesha-0.1.3.dev2-py3-none-any.whl
  • Upload date:
  • Size: 61.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pelmesha-0.1.3.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 f87ef28e56ea2108575220b177b8a6f081f13df7b999d90e999da1aac5317bff
MD5 a77a9a93aeec58c1de6b83c11f23fb9e
BLAKE2b-256 a74a0f2c6fd9b0127859f2b73daa55aec02a61a5540d879e2169dff317b711a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelmesha-0.1.3.dev2-py3-none-any.whl:

Publisher: publish_to_pypi.yml on Testudinata/pelmesha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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