{"_id":"peptide-modify","_rev":"3-bff4612f75b78569a81504ac265c16d9","name":"peptide-modify","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.4":{"name":"peptide-modify","version":"1.0.4","keywords":["peptide","protein","chemistry","modification"],"author":{"name":"Michael Porter","email":"michaelporter.chemistry@gmail.com"},"license":"MIT","_id":"peptide-modify@1.0.4","maintainers":[{"name":"richswift225","email":"rich.swift225@gmail.com"}],"homepage":"https://github.com/emptyport/peptide-modifier#readme","bugs":{"url":"https://github.com/emptyport/peptide-modifier/issues"},"dist":{"shasum":"2d3e96235c61e69b25f06ddcdfe5ce0ff89eb34a","tarball":"https://registry.npmjs.org/peptide-modify/-/peptide-modify-1.0.4.tgz","fileCount":8,"integrity":"sha512-RGRTUdyGV8n9II3R9V4YFRKHLJVAsqGnlzOhhGqT0IUlqc6B1KHXeiGB3QdkrZVbhYWbvcrIe5C8PBNfTHTROA==","signatures":[{"sig":"MEYCIQCRkaF3dDBv1SM0r4QfMJHgW2OXJBP7bXQoSP2FKMIy7QIhALFCzglT+UEHO/z48bOanJxbWKzao6T99+Dmw+ZUfr+4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18356},"main":"index.js","scripts":{"test":"node ./test/test-index.js | tap-spec"},"_npmUser":{"name":"richswift225","email":"rich.swift225@gmail.com"},"repository":{"url":"git+https://github.com/emptyport/peptide-modifier.git","type":"git"},"_npmVersion":"10.8.2","description":"A module to provide the potential modification sites of a peptide","directories":{"test":"test"},"_nodeVersion":"20.20.0","dependencies":{"js-unimode":"^1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.9.0","tap-spec":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/peptide-modify_1.0.4_1776067498791_0.8090908900828215","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"peptide-modify","version":"1.0.5","keywords":["peptide","protein","chemistry","modification"],"author":{"name":"Michael Porter","email":"michaelporter.chemistry@gmail.com"},"license":"MIT","_id":"peptide-modify@1.0.5","maintainers":[{"name":"richswift225","email":"rich.swift225@gmail.com"}],"homepage":"https://github.com/emptyport/peptide-modifier#readme","bugs":{"url":"https://github.com/emptyport/peptide-modifier/issues"},"dist":{"shasum":"d0aac3531c18ad7e59119d94f6a90e88d542e31c","tarball":"https://registry.npmjs.org/peptide-modify/-/peptide-modify-1.0.5.tgz","fileCount":8,"integrity":"sha512-3m4nnpsozqrHkVzY8hWOE3NqCe93kkWlNcDCX10mUyYB1W58G6MiNgK5jar9uu+pqg2RSM2zgI00WHmHkM3tSg==","signatures":[{"sig":"MEUCIQDuh7wyMtn2humyHdTBADyUENAebPFyyBKqjnHwanwlAwIgbI9/HEYZNdHxw/voqRdc6eI3oqkBNsBnsiRUyheJIa8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18356},"main":"index.js","scripts":{"test":"node ./test/test-index.js | tap-spec"},"_npmUser":{"name":"richswift225","email":"rich.swift225@gmail.com"},"repository":{"url":"git+https://github.com/emptyport/peptide-modifier.git","type":"git"},"_npmVersion":"10.8.2","description":"A module to provide the potential modification sites of a peptide","directories":{"test":"test"},"_nodeVersion":"20.20.0","dependencies":{"js-unimode":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.9.0","tap-spec":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/peptide-modify_1.0.5_1776069667653_0.6706117441262986","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"peptide-modify","version":"1.0.6","description":"A module to provide the potential modification sites of a peptide","main":"index.js","scripts":{"test":"node ./test/test-index.js | tap-spec"},"repository":{"type":"git","url":"git+https://github.com/emptyport/peptide-modifier.git"},"keywords":["peptide","protein","chemistry","modification"],"author":{"name":"Michael Porter","email":"michaelporter.chemistry@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/emptyport/peptide-modifier/issues"},"homepage":"https://github.com/emptyport/peptide-modifier#readme","devDependencies":{"tap-spec":"^5.0.0","tape":"^4.9.0"},"dependencies":{"js-unimode":"^1.1.3"},"directories":{"test":"test"},"_id":"peptide-modify@1.0.6","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-uYLUTqnbh1VSZmZJUqWFbZifBk7mSSVqXhPxMfdK2m7vt3S+QOBaq0bEdLgcYdtEi8B+6Dx3mkbFTmfJl1WpXA==","shasum":"38eeae7f188e23ee8807a225f8384201f82c1f69","tarball":"https://registry.npmjs.org/peptide-modify/-/peptide-modify-1.0.6.tgz","fileCount":8,"unpackedSize":18337,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDDJyJUcSQYQMIOv3bknX64XWl6hGmaiXNS959qVsZPrwIgaOAXGdFTeVazjHnwvZzREiOYX0/yYZkAirrSU5iUxdY="}]},"_npmUser":{"name":"richswift225","email":"rich.swift225@gmail.com"},"maintainers":[{"name":"richswift225","email":"rich.swift225@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/peptide-modify_1.0.6_1776094734633_0.27023321159296954"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-13T08:04:58.790Z","modified":"2026-04-13T15:38:54.879Z","1.0.4":"2026-04-13T08:04:58.926Z","1.0.5":"2026-04-13T08:41:07.779Z","1.0.6":"2026-04-13T15:38:54.770Z"},"bugs":{"url":"https://github.com/emptyport/peptide-modifier/issues"},"author":{"name":"Michael Porter","email":"michaelporter.chemistry@gmail.com"},"license":"MIT","homepage":"https://github.com/emptyport/peptide-modifier#readme","keywords":["peptide","protein","chemistry","modification"],"repository":{"type":"git","url":"git+https://github.com/emptyport/peptide-modifier.git"},"description":"A module to provide the potential modification sites of a peptide","maintainers":[{"name":"richswift225","email":"rich.swift225@gmail.com"}],"readme":"# peptide-modifier\n\n[![Build Status](https://travis-ci.org/emptyport/peptide-modifier.svg?branch=master)](https://travis-ci.org/emptyport/peptide-modifier)\n[![codecov](https://codecov.io/gh/emptyport/peptide-modifier/branch/master/graph/badge.svg)](https://codecov.io/gh/emptyport/peptide-modifier)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis 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.\n\n## Installation\nnpm install peptide-modifier --save\n\n## Usage\nExample usage:\n```javascript\nvar pepMod = require('peptide-modifier');\n\nvar modList = [\n    {\n      'name': 'Carbamidomethylation',\n      'residues': ['C'],\n      'type': 'fixed',\n      'mass': 57.02\n    },\n    {\n      'name': 'oxidation',\n      'residues': ['M'],\n      'type': 'variable'\n    },\n    {\n      'name': 'n-terminal acetyl',\n      'residues': ['[K'],\n      'type': 'variable',\n      'mass': 42\n    }\n  ];\n\nvar mods = pepMod.modify('KARATECAMPKID', modList, 2);\n```\n\nOutput:\n```javascript\n[ \n    [ { name: 'Carbamidomethylation',\n      residue: 'C',\n      type: 'fixed',\n      mass: 57.02,\n      position: 6 },\n    { name: 'oxidation',\n      residue: 'M',\n      type: 'variable',\n      mass: 15.994915,\n      position: 8 },\n    { name: 'n-terminal acetyl',\n      residue: '[K',\n      type: 'variable',\n      mass: 42,\n      position: 0 } ],\n      \n  [ { name: 'Carbamidomethylation',\n      residue: 'C',\n      type: 'fixed',\n      mass: 57.02,\n      position: 6 },\n    { name: 'oxidation',\n      residue: 'M',\n      type: 'variable',\n      mass: 15.994915,\n      position: 8 } ],\n\n  [ { name: 'Carbamidomethylation',\n      residue: 'C',\n      type: 'fixed',\n      mass: 57.02,\n      position: 6 },\n    { name: 'n-terminal acetyl',\n      residue: '[K',\n      type: 'variable',\n      mass: 42,\n      position: 0 } ],\n\n  [ { name: 'Carbamidomethylation',\n      residue: 'C',\n      type: 'fixed',\n      mass: 57.02,\n      position: 6 } ] \n]\n```\n\n### Parameters\nThe 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.\n\nThe second parameter is the list of potential modifications. This is a list of JavaScript objects in the following format:\n* ```name``` is the name of the modification\n* ```residues``` 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.\n* ```type``` can be either 'fixed' (meaning this modification always occurs) or 'variable' (meaning this modification may or may not occur).\n* ```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](https://www.npmjs.com/package/js-unimod) module.\n\nThe third parameter is the maximum number of variable modifications to allow. Fixed modifications do not count toward this value.\n\n### Output format\nThe 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.\n\nEach 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.\n\nIf there are no fixed modifications, one of the sublists will be an empty list signifying a variant with no modifications.\n\n## Tests\nYou can run `npm test` to run the tests after installing the development dependencies.\n\n## Future functionality\nI 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).\n\n## License\nThis software is released under the MIT license.\n\n## Support this project!\n\n[![Support this project on Patreon!](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/MikeTheBiochem)\n","readmeFilename":"README.md"}