spectrum_utils
Simple MS/MS spectrum preprocessing and visualization in Python.
Features
- Spectrum (pre)processing
- Precursor & noise peak removal
- Intensity filtering
- Intensity scaling
- Fragment ion annotating (powered by Pyteomics)
- Spectrum plotting
- Single spectrum with annotated ions
- Mirror plot of matching spectra
Example
import matplotlib.pyplot as plt
from spectrum_utils import plot
from spectrum_utils import spectrum
# Initialize spectrum information first...
spec = spectrum.MsmsSpectrum(identifier, precursor_mz, precursor_charge,
mz, intensity, retention_time=retention_time,
peptide=peptide)
# Preprocess the MS/MS spectrum.
fragment_tol_mass = 10
fragment_tol_mode = 'ppm'
spec = (spec.set_mz_range(min_mz=100, max_mz=1400)
.remove_precursor_peak(fragment_tol_mass, fragment_tol_mode)
.filter_intensity(min_intensity=0.05, max_num_peaks=150)
.scale_intensity(scaling='root')
.annotate_peaks(fragment_tol_mass, fragment_tol_mode,
ion_types='aby'))
# Plot the MS/MS spectrum.
plot.spectrum(spec)
plt.show()
plt.close()
(Condensed example. See here for the full code to generate the figure below.)
Installation
spectrum_utils can be installed easily via pip:
pip install spectrum_utils
Dependencies
spectrum_utils has the following dependencies:
Missing dependencies will be automatically installed when you install spectrum_utils.
API documentation
You can find the API documentation here.
Contact
For more information you can visit the official code website or send an email to wout.bittremieux@uantwerpen.be.
Metadata
Release files for spectrum-utils 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spectrum_utils-0.1.0.tar.gz | 10.9 kB | Without provenance | Details for spectrum_utils-0.1.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spectrum_utils-0.1.0-py3.7.egg | Legacy Egg format | - | - | Details for spectrum_utils-0.1.0-py3.7.egg |
| spectrum_utils-0.1.0-py3.6.egg | Legacy Egg format | - | - | Details for spectrum_utils-0.1.0-py3.6.egg |
| spectrum_utils-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for spectrum_utils-0.1.0-py3-none-any.whl |
Total release size: 65.8 kB
Release files / spectrum_utils-0.1.0.tar.gz
| Download URL | spectrum_utils-0.1.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83a4c39aca75022fd1fd14258b38ea01b94fb9d293411f0e165773fb72aca99a
|
|
BLAKE2b-256 checksum How to use checksums |
41e14566899e5d2cf69303f2c868c0640f85e49993a22a0fe24f4817793e2fbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2
|
Release files / spectrum_utils-0.1.0-py3.7.egg
| Download URL | spectrum_utils-0.1.0-py3.7.egg |
|---|---|
| Size | 20.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
b578f9af87f1f849ffadfc8d9777ba59a7d804a79eae11ab115718f6fc389a3d
|
|
BLAKE2b-256 checksum How to use checksums |
c84ccec33132602a39694d802b6a3990bca5b8e60559842bb897ce0993e1590f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2
|
Release files / spectrum_utils-0.1.0-py3.6.egg
| Download URL | spectrum_utils-0.1.0-py3.6.egg |
|---|---|
| Size | 20.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
0ea742b69b5488c924dd533e36d3e3dd51bd3553e45c976ce179923b5546c3cf
|
|
BLAKE2b-256 checksum How to use checksums |
dd3405027c1118dc223b8ee193f402f83b17ed378c34d67397e68c58e822acdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2
|
Release files / spectrum_utils-0.1.0-py3-none-any.whl
| Download URL | spectrum_utils-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
902610fb58c347e2cc4c5c9efe0e9996949df8169496abb0a5a738721cd019b6
|
|
BLAKE2b-256 checksum How to use checksums |
b2416846efe8156447d32e65025bb41ea8912baf3c6b8386c4a4e264e1629e30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2
|
Security for spectrum-utils 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.