Peptide Fragmenter
A library for in silico fragmentation of proteins and peptides.
View on npm here.
Installation
npm install peptide-fragmenter --save
Usage
Quickstart
var pepFrag = ;let fragments = pepFrag;console;
Output
b:'1':72044386466812232073576466812347100516466812054761431064668120762321151646681268023297646681281729188646681293037594646681210584709064668121171554966466812130259545646681214166383864668121513691146466812116417497264668123179785083646681231884882866466812419859305464668123208499895646681222710782664668122'2':365258314668121165404264668120117405389646681223857519146681202312109396466812033406201264668120540914958146681204465691611466812055297390914668119586281121466811965180136646681197088228314668127573492114668128213785014668128994290564668121942945071466812199346891146681211043003116466812111360427714668122y:'1':238111505146681222210858614668122106058921466811619770163314668118182994792146681171772926461466811816358675514668118152278349146681213946885314668121281604471466812111505639814668121036521051466812939468291466811981140971146681196553086014668125682765714668124672288914668123681604814668120318208117146681198'2':119106116396681211110465689668121053533098966811898901180396681189154775989668118886966868966811881843741396681187618953839668119697847903966811964130587396681257578562896681195187641639668119470237783966812406208493966812328157938966812284641923966812042341180839668119818458387896681291544223966812
fragment(sequence, ion_types, fragment_charges, modifications)
sequence
is the only required parameter for this method and is the amino acid sequence you wish to fragment. B, J, O, U, X, and Z are not valid residues and will result in no fragments being returned.ion_types
is an array of ion types to calculate. The default is['b', 'y']
. You can also calculate a, c, x, and z ions.fragment_charges
is an array of charge states to predict for the fragments. The default is[1]
. You can pass in any integer values.modifications
is an array of objects containing information about the position and mass of modifications. The default is[]
being no modifications.
The output of this function is an object in which the keys are the ion types. Each ion type itself is an object with the fragment charges as the keys. Each charge key holds an array of m/z values correlating to each fragment. The final fragment (corresponding to the full length peptide) is excluded from all ion types.
The m/z values match pretty closely with the online Proteomics Toolkit Fragment Ion Calculator, but the values don't quite exactly match, probably just due to slightly different input values for the residue masses and whatnot. In most cases the m/z values are within 1 ppm. The lower the m/z value the higher the deviation (up to about 3 ppm), but generally speaking these differences are not significant, especially given the fact that the tolerances for peptide spectrum matching are often either 0.5 Da or 20 ppm (which are both far above my 1 ppm deviation). Even a tolerance of 0.01 Da is above that deviation (0.01 Da is 5 ppm at m/z 2000 and 50 ppm at m/z 200).
Tests
You can run npm test
to run the tests after installing the development dependencies.
Future functionality
There are currently no planned improvements to this module. I am open to suggestions so let me know if you think something is missing.
License
This software is released under the MIT license