A python module for fast post translational modification localization.
Project description
Intro
The pyAscore package provides a blazingly fast implementation of the Ascore algorithm for localizing peptide post-translational modifications from mass spectrometry data. In order to provide efficient scoring, pyAscore implements dynamic programming over a custom modified peptide fragment tree and caches scoring calculations whenever possible. This allows the algorithm to tackle both high and low resolution MS/MS spectra, as well as peptides of any length or number of modified amino acids. The pyAscore package was also built without any assumptions on modification mass, and thus can be used to localize any feasible post-translational modification. All algorithm components are implemented in C++, wrapped with Cython, and acessible by Python API or command line interface depending on pipeline needs.
For more information, check out our documentation.
Getting Started
Install from PyPI
If you just want to use the pyAscore package, and don't want to contribute, you can get the most up to date version using pip.
pip install pyascore
Installing from a local clone
If you would like to contribute, first fork the main repository, and then follow the following steps to compile and test.
git clone https://github.com/[USERNAME]/pyAscore.git
cd pyAscore
python setup.py build_ext --inplace
python -m unittest
Usage
The pyAscore package can be used straight from the command line as a module.
A full list of parameters is available by running with the -h
flag.
$ pyascore -h
usage: pyAscore [-h] [--match_save] [--residues RESIDUES]
[--mod_mass MOD_MASS] [--mz_error MZ_ERROR]
[--mod_correction_tol MOD_CORRECTION_TOL]
[--zero_based ZERO_BASED]
[--neutral_loss_groups NEUTRAL_LOSS_GROUPS]
[--neutral_loss_masses NEUTRAL_LOSS_MASSES]
[--static_mod_groups STATIC_MOD_GROUPS]
[--static_mod_masses STATIC_MOD_MASSES]
[--fragment_types FRAGMENT_TYPES]
[--max_fragment_charge MAX_FRAGMENT_CHARGE]
[--hit_depth HIT_DEPTH] [--parameter_file PARAMETER_FILE]
[--spec_file_type SPEC_FILE_TYPE]
[--ident_file_type IDENT_FILE_TYPE]
spec_file ident_file out_file
The pyAscore module provides PTM localization analysis using a custom
implementation of the Ascore algorithm. It employees pyteomics for efficient
reading of spectra in mzML format and identifications in pepXML format. All
scoring has been implemented in custom c++ code which is exposed to python via
cython wrappers. Any PTM which be defined with a canonical amino acid and mass
shift can be analyzed.
positional arguments:
spec_file MS Spectra file.
ident_file Results of database search.
out_file Destination for Ascores.
optional arguments:
-h, --help show this help message and exit
--match_save
--residues RESIDUES Residues which can be modified.
--mod_mass MOD_MASS Modification mass to match to identifications. This is
often rounded by search engines so this argument
should be considered the most accurate mass.
--mz_error MZ_ERROR Tolerance in mz for deciding whether a spectral peak
matches to a theoretical peak.
--mod_correction_tol MOD_CORRECTION_TOL
MZ tolerance for deciding whether a reported
modification matches internal or user specified
modifications. A wide tolerance can help overcome
rounding. If more precission is needed, make sure to
set this parameter and that your search engine
provides for it.
--zero_based ZERO_BASED
Mod positions are by default assumed to be 1 based.
--neutral_loss_groups NEUTRAL_LOSS_GROUPS
Comma separated clusters of amino acids which are
expected to have a neutral loss. To specify that the
modified versions of the amino acids should have the
neutral loss, use lower case letters. Example: 'st' vs
'ST'.
--neutral_loss_masses NEUTRAL_LOSS_MASSES
Comma separated neutral loss masses for each of the
neutral_loss_groups. Should have one mass per group.
Positive masses indicate a loss, e.g. '18.0153' for
water loss, while negative masses can be used to
indicate a gain.
--static_mod_groups STATIC_MOD_GROUPS
Comma separated clusters of amino acids which will be
read in with a constant modification.
--static_mod_masses STATIC_MOD_MASSES
Comma separated masses for each of the
static_mod_groups.
--fragment_types FRAGMENT_TYPES
Fragment ion types to score. Supported: bcyzZ. The
special character Z indicates a z+H fragment.
--max_fragment_charge MAX_FRAGMENT_CHARGE
Max fragment charge to use for calculating theoretical
peaks. Internally, the max fragment charge will not be
allowed to be greater than the PSM charge - 1.
However, if a more stringent limit needs to be set,
this argument can be used.
--hit_depth HIT_DEPTH
Number of PSMS to take from each scan. Set to negative
to always analyze all.
--parameter_file PARAMETER_FILE
A file containing parameters. Example: 'residues =
STY'.
--spec_file_type SPEC_FILE_TYPE
The type of file supplied for spectra. One of mzML or
mzXML. Default: mzML.
--ident_file_type IDENT_FILE_TYPE
The type of file supplied for identifications. One of
pepXML, mzIdentML, percolatorTXT, or mokapotTXT.
Default: pepXML.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pyascore-1.0.1.tar.gz
.
File metadata
- Download URL: pyascore-1.0.1.tar.gz
- Upload date:
- Size: 478.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f434be0b39a36ed8bdb4db90a234ef4e42b12a7dbdfb4d3c941a4e136050c15 |
|
MD5 | 808130bd8ea002be75e93872a7fc3176 |
|
BLAKE2b-256 | 9bb6b14d0cab47574fd421e4aca53e52037fa15065b8b97d63ba57131e960c7b |
File details
Details for the file pyascore-1.0.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 166.2 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b488025ac5a8c15d3cede456910b6c6648c153b33e3db601f837b0710340616f |
|
MD5 | 17cf0eb2c1255d463924482b0cfd017c |
|
BLAKE2b-256 | 0b99a62b930cb0a5661808f64c012f1651ee426c219e5b8b0b69198d3fbca334 |
File details
Details for the file pyascore-1.0.1-cp39-cp39-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp39-cp39-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 915.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a74b49b93e04bd915c30b7d1bd00b69dbcfc9f91ce5f4d7ec89f423126daa7d2 |
|
MD5 | ddc1b4ab46697748910093a2557fffef |
|
BLAKE2b-256 | 23f0f4047bd5554ce23661ed229419d8562d201b332767f085118e0f1dc3c6ae |
File details
Details for the file pyascore-1.0.1-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 191.8 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae1aeec51ba9212bd5071fa5c806ad52bb58f83ab15a6b0a43b2aca5e03c115d |
|
MD5 | 7d156c2c26dd4e18351689b48dd87686 |
|
BLAKE2b-256 | cb95bac0777ee1e825856421be2ebac443d5eb04e94b642a8ddf9f153f51d228 |
File details
Details for the file pyascore-1.0.1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 166.4 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caa0c9c9d0bf89891644b3bb5ab2bf45fc0d18f34f39835bada4e2fc5d3a2c3b |
|
MD5 | 6c26afd1ff8d84126cbff94a60229f50 |
|
BLAKE2b-256 | 68ff6fb876bd0bec36ac6c8329f1f6c7ed1c3e85ec8d65d83f67b05bdafc2f1a |
File details
Details for the file pyascore-1.0.1-cp38-cp38-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp38-cp38-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 937.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1047c1d5f0ca6298c70d1c3a4ba3119c248e6410aace22c39cb404e84351418f |
|
MD5 | 7aa0dbcf3f57d1eda69085849b216afa |
|
BLAKE2b-256 | 99d2c8c83ab2ed726bd24685d032c21b2749b42af86061e469d67e63a71b7fe3 |
File details
Details for the file pyascore-1.0.1-cp38-cp38-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp38-cp38-macosx_11_0_x86_64.whl
- Upload date:
- Size: 191.2 kB
- Tags: CPython 3.8, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b8d8166f22b7e640a1cf0d106050e023f5ecf1fa786d8019be0aa5be2b5d68c |
|
MD5 | 9685e9d0f8fc2cd21aa03bafe7a2c629 |
|
BLAKE2b-256 | 1d8726aac6d679c4a7cca5713d05341d935b764042014e2a77178401976a42af |
File details
Details for the file pyascore-1.0.1-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 167.1 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64a17f44ec5e97f0924ea0be30857fdc81ae3daa8c344c702b57a7861f298d08 |
|
MD5 | e68c2c226d67746cfbcd76aadc19d087 |
|
BLAKE2b-256 | 0a6aa7c82e4f6979b324fccedd0414a4a57d98944515ef80d9701973fc5cb2a2 |
File details
Details for the file pyascore-1.0.1-cp37-cp37m-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp37-cp37m-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 906.4 kB
- Tags: CPython 3.7m, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2d8dfcb23e7a9923a639897448caac92c3d3f7157d8563c969f7260b0055406 |
|
MD5 | ce5743cb6d5e924ece1e1dc08d1ace0b |
|
BLAKE2b-256 | 35d66bfe98679f7fc89100f3424ea2dce230f9750e7d8e17edb8de991a22891c |
File details
Details for the file pyascore-1.0.1-cp37-cp37m-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp37-cp37m-macosx_11_0_x86_64.whl
- Upload date:
- Size: 192.1 kB
- Tags: CPython 3.7m, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3be0285082c46d2307584daa6f16dd640bd89b0658613528bee597d0dd371bb |
|
MD5 | ed4c314507236da7517ea1df47130f31 |
|
BLAKE2b-256 | e60f7452631049f3d667eedfd84279c72740a2d40321d9c858ec60ba55c6216c |
File details
Details for the file pyascore-1.0.1-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 179.5 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeacb6462cf240274a0c287a0e6a083edee9fcd2d755d1245bba3334f8e5d16c |
|
MD5 | d8bb9778e8d7626fdff392832bf96403 |
|
BLAKE2b-256 | b8e7544440e939290fb2d270556651b6bc8c10f41ebf5d0c2bfb42739d432b97 |
File details
Details for the file pyascore-1.0.1-cp36-cp36m-manylinux_2_31_x86_64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp36-cp36m-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 898.0 kB
- Tags: CPython 3.6m, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4be378faf6fca07c3f524d6397e84bb773283406b430b0762163d3a68afef8b4 |
|
MD5 | 210fed87c031a9e60da2ecf1b11008d5 |
|
BLAKE2b-256 | d7881ec424664d2cb8991b2baff40291fedff174102d59402eb942e30e9cca96 |
File details
Details for the file pyascore-1.0.1-cp36-cp36m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: pyascore-1.0.1-cp36-cp36m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 188.4 kB
- Tags: CPython 3.6m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0ae3a27d653736407415ccbdf5fdffe60ee92b6e8d413ba8402e332b3f0f88a |
|
MD5 | 82402d750c846ccac08288acf49b7e25 |
|
BLAKE2b-256 | a69462f85e5722f9462e886f23b8a839a62f901f7b3db19c09725e05040a918a |