pepfrag
pepfrag is a library for generating possible dissociation fragment ions of peptides in tandem mass spectrometry experiments.
Table of Contents
Installation
pepfrag can be installed from PyPI.
Compatibility
pepfrag is written using Python 3 and should be compatible with most
operating systems. The package has been tested on
- Windows 10
- MacOS 10.15
- Ubuntu 18.04 LTS
Because pepfrag includes C/C++ extensions, installation requires the
presence of a C++ 11 compatible compiler on your machine.
Instructions
- Install Python 3 (>= version 3.6).
- Install the latest version of the
pepfraglibrary usingpip:
pip install pepfrag
Usage
Peptide Construction
pepfrag provides one key public class: Peptide. This class includes public methods
for computing the mono/average mass of the peptide, including any configured modifications
(ModSites), and the peptide fragment ions, with configurable neutral losses.
A Peptide can be constructed from its amino acid sequence, charge state and modifications,
for example:
from pepfrag import MassType, ModSite, Peptide
peptide = Peptide(
"ABCMPK",
2,
(ModSite(15.994915, 4, "Oxidation"), ModSite(304.20536, "nterm", "iTRAQ8plex")),
mass_type=MassType.mono
)
Peptide modifications are defined using a sequence of ModSite instances, which
are namedtuples defined by the mass of the modification (float), the site of the
modification (string for terminal modifications or 1-indexed integer otherwise) and
the name of the modification.
The Peptide constructor has two keyword parameters:
mass_type:- Description: The type of mass to calculate.
- Type:
MassTypeenumeration. - Default:
MassType.mono.
radical:- Description: Flag indicating whether radical cation fragments should be generated.
- Type: bool.
- Default:
False.
Fragment Generation
Fragment ions can be generated using the fragment method; for efficiency when the
same Peptide instance is used repeatedly, the resulting fragments are cached on the
instance. This cache is invalidated if the instance attributes are changed.
The fragment method has two keyword parameters:
ion_types:- Description: The types of fragment ion species to generate. The default setup would generate precursor, immonium, b, y, a, c and z ions.
- Type: dictionary mapping
IonTypeenumeration instances to possible neutral loss species, represented as strings for the most common neutral losses (i.e. those configured inpepfrag, namely'H2O','NH3','CO2'and'CO'). For additional losses, these can be input as tuples of(name (str), mass (float)). - Default:
from pepfrag import IonType DEFAULT_IONS = { IonType.precursor: ['H2O', 'NH3', 'CO2'], IonType.imm: [], IonType.b: ['H2O', 'NH3', 'CO'], IonType.y: ['NH3', 'H2O'], IonType.a: [], IonType.c: [], IonType.z: [] }
- Example:
from pepfrag import IonType, Peptide peptide = Peptide('APYSMLK', 2, []) peptide.fragment(ion_types={ IonType.b: ['NH3', ('customLoss', 17.04)] })
force:- Description: Flag indicating whether fragments should be forcibly regenerated, i.e. bypassing the cached ions.
- Type: bool.
- Default:
False.
License
pepfrag is released under the terms of the MIT license.
Metadata
Release files for pepfrag 0.4.1
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 |
|---|---|---|---|---|
| pepfrag-0.4.1.tar.gz | 16.6 kB | Without provenance | Details for pepfrag-0.4.1.tar.gz |
Release files / pepfrag-0.4.1.tar.gz
| Download URL | pepfrag-0.4.1.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a192a9e305c98ad06ad67ae9237ae3c09b981b082fcdadc8be818c99198a0ba0
|
|
BLAKE2b-256 checksum How to use checksums |
b4a7fb039a1fe80e766c04a14c72442cc2a30c72dd05b50147d4723c942c9220
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
|
Security for pepfrag 0.4.1
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.