Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
peptide-modifier
Advanced tools
A module to provide the potential modification sites of a peptide
This module returns all the possible combinations of modifications for a given peptide sequence given a list of modifications and the maximum number of allowed variable modifications.
npm install peptide-modifier --save
Example usage:
var pepMod = require('peptide-modifier');
var modList = [
{
'name': 'Carbamidomethylation',
'residues': ['C'],
'type': 'fixed',
'mass': 57.02
},
{
'name': 'oxidation',
'residues': ['M'],
'type': 'variable'
},
{
'name': 'n-terminal acetyl',
'residues': ['[K'],
'type': 'variable',
'mass': 42
}
];
var mods = pepMod.modify('KARATECAMPKID', modList, 2);
Output:
[
[ { name: 'Carbamidomethylation',
residue: 'C',
type: 'fixed',
mass: 57.02,
position: 6 },
{ name: 'oxidation',
residue: 'M',
type: 'variable',
mass: 15.994915,
position: 8 },
{ name: 'n-terminal acetyl',
residue: '[K',
type: 'variable',
mass: 42,
position: 0 } ],
[ { name: 'Carbamidomethylation',
residue: 'C',
type: 'fixed',
mass: 57.02,
position: 6 },
{ name: 'oxidation',
residue: 'M',
type: 'variable',
mass: 15.994915,
position: 8 } ],
[ { name: 'Carbamidomethylation',
residue: 'C',
type: 'fixed',
mass: 57.02,
position: 6 },
{ name: 'n-terminal acetyl',
residue: '[K',
type: 'variable',
mass: 42,
position: 0 } ],
[ { name: 'Carbamidomethylation',
residue: 'C',
type: 'fixed',
mass: 57.02,
position: 6 } ]
]
The first parameter passed to peptide-modifier
is the sequence you want to modify. The module does not check to make sure you only send in valid amino acids.
The second parameter is the list of potential modifications. This is a list of JavaScript objects in the following format:
name
is the name of the modificationresidues
is a list of the residues on which this modification can occur. Use '[' for the N-terminus and ']' for the C-terminus. Each residue can only be a single character, unless you are modifying a specific terminal residue. For example, '[A' will specify an N-terminal alanine.type
can be either 'fixed' (meaning this modification always occurs) or 'variable' (meaning this modification may or may not occur).mass
is the mass of the modification and can be either positive or negative. If this value is omitted, the name
parameter will be used to look up the mass from the js-unimod module.The third parameter is the maximum number of variable modifications to allow. Fixed modifications do not count toward this value.
The output of the modify call is a list of lists. The master list is the number of variants when taking into consideration the combinations of modifications.
Each sublist then contains a list of all the modifications for each variant. This will have the name, residue, mass, type, and position (0-based index) of the modification.
If there are no fixed modifications, one of the sublists will be an empty list signifying a variant with no modifications.
You can run npm test
to run the tests after installing the development dependencies.
I may add in support for non-canonical amino acids e.g. J would modify both I and L (but for now you could pass in ['L','I']
for your residues if you want to modify both those residues).
This software is released under the MIT license.
FAQs
A module to provide the potential modification sites of a peptide
The npm package peptide-modifier receives a total of 5 weekly downloads. As such, peptide-modifier popularity was classified as not popular.
We found that peptide-modifier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.