peptide-score 2.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +149 -0
- package/lib/src/allowNeutralLoss.d.ts +7 -0
- package/lib/src/allowNeutralLoss.d.ts.map +1 -0
- package/lib/src/allowNeutralLoss.js +25 -0
- package/lib/src/allowNeutralLoss.js.map +1 -0
- package/lib/src/aminoAcids.d.ts +29 -0
- package/lib/src/aminoAcids.d.ts.map +1 -0
- package/lib/src/aminoAcids.js +247 -0
- package/lib/src/aminoAcids.js.map +1 -0
- package/lib/src/chargePeptide.d.ts +2 -0
- package/lib/src/chargePeptide.d.ts.map +1 -0
- package/lib/src/chargePeptide.js +50 -0
- package/lib/src/chargePeptide.js.map +1 -0
- package/lib/src/digestPeptide.d.ts +2 -0
- package/lib/src/digestPeptide.d.ts.map +1 -0
- package/lib/src/digestPeptide.js +83 -0
- package/lib/src/digestPeptide.js.map +1 -0
- package/lib/src/generatePeptideFragments.d.ts +2 -0
- package/lib/src/generatePeptideFragments.d.ts.map +1 -0
- package/lib/src/generatePeptideFragments.js +89 -0
- package/lib/src/generatePeptideFragments.js.map +1 -0
- package/lib/src/getAA.d.ts +29 -0
- package/lib/src/getAA.d.ts.map +1 -0
- package/lib/src/getAA.js +21 -0
- package/lib/src/getAA.js.map +1 -0
- package/lib/src/index.d.ts +44 -0
- package/lib/src/index.d.ts.map +1 -0
- package/lib/src/index.js +74 -0
- package/lib/src/index.js.map +1 -0
- package/lib/src/isoElectricPoint.d.ts +10 -0
- package/lib/src/isoElectricPoint.d.ts.map +1 -0
- package/lib/src/isoElectricPoint.js +134 -0
- package/lib/src/isoElectricPoint.js.map +1 -0
- package/lib/src/sequenceToMF.d.ts +2 -0
- package/lib/src/sequenceToMF.d.ts.map +1 -0
- package/lib/src/sequenceToMF.js +99 -0
- package/lib/src/sequenceToMF.js.map +1 -0
- package/lib/src/splitPeptide.d.ts +2 -0
- package/lib/src/splitPeptide.d.ts.map +1 -0
- package/lib/src/splitPeptide.js +17 -0
- package/lib/src/splitPeptide.js.map +1 -0
- package/lib/tsconfig.build.tsbuildinfo +1 -0
- package/lib/tsconfig.test.tsbuildinfo +1 -0
- package/package.json +29 -0
- package/src/allowNeutralLoss.js +22 -0
- package/src/aminoAcids.js +244 -0
- package/src/chargePeptide.js +48 -0
- package/src/digestPeptide.js +87 -0
- package/src/generatePeptideFragments.js +89 -0
- package/src/getAA.js +18 -0
- package/src/index.js +37 -0
- package/src/isoElectricPoint.js +124 -0
- package/src/sequenceToMF.js +96 -0
- package/src/splitPeptide.js +13 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 cheminfo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# peptide
|
|
2
|
+
|
|
3
|
+
[![NPM version][npm-image]][npm-url]
|
|
4
|
+
[![build status][travis-image]][travis-url]
|
|
5
|
+
[![David deps][david-image]][david-url]
|
|
6
|
+
[![npm download][download-image]][download-url]
|
|
7
|
+
|
|
8
|
+
Peptide
|
|
9
|
+
|
|
10
|
+
## Amino acids
|
|
11
|
+
|
|
12
|
+
#### getInfo()
|
|
13
|
+
|
|
14
|
+
Returns an array of information about amino acids
|
|
15
|
+
|
|
16
|
+
## Amino acids sequence
|
|
17
|
+
|
|
18
|
+
#### sequenceToMF(sequence)
|
|
19
|
+
|
|
20
|
+
Previously convertAASequence(sequence) (deprecated)
|
|
21
|
+
|
|
22
|
+
Returns a peptidic sequence from a PDB or one letter code to the internal molecular formula format
|
|
23
|
+
|
|
24
|
+
**Arguments**
|
|
25
|
+
|
|
26
|
+
- `sequence` - string with the amino acids sequence
|
|
27
|
+
|
|
28
|
+
#### chargePeptide(mf, options)
|
|
29
|
+
|
|
30
|
+
Charge the peptide at a specific pH. 'mf' is either a 3 letter peptide sequence or an array of peptide sequences.
|
|
31
|
+
|
|
32
|
+
**Arguments**
|
|
33
|
+
|
|
34
|
+
- `mf` - string with a molecular formula to charge
|
|
35
|
+
- options:
|
|
36
|
+
- pH : you may specify the pH to calculate the protonation state. By default: 0,
|
|
37
|
+
it has the consequence to add a positive charge on Arg, His and Lys.
|
|
38
|
+
|
|
39
|
+
#### allowNeutralLoss(mf, options)
|
|
40
|
+
|
|
41
|
+
Allow neutral loss :
|
|
42
|
+
|
|
43
|
+
- H2O for S, T, E, D residues
|
|
44
|
+
- NH3 for R, K, Q, N residues
|
|
45
|
+
|
|
46
|
+
The residues may not be modified.
|
|
47
|
+
|
|
48
|
+
**Arguments**
|
|
49
|
+
|
|
50
|
+
- `mf` - string with a molecular formula to charge
|
|
51
|
+
|
|
52
|
+
#### generatePeptideFragments(mf, [options])
|
|
53
|
+
|
|
54
|
+
Generate [peptide fragmentation](http://en.wikipedia.org/wiki/Peptide_sequence_tag).
|
|
55
|
+
Returns an array of molecular formulas with the different fragments.
|
|
56
|
+
|
|
57
|
+
**Arguments**
|
|
58
|
+
|
|
59
|
+
- `mf` - string with the molecular formula
|
|
60
|
+
- `options` - object with requested fragments. Default: `{a:false, b:true, c:false, x:false, y:true, z:false, i:false}`
|
|
61
|
+
|
|
62
|
+
You can also specify internal fragments using the options 'ya', 'yb', 'yc' and 'zc' as well as the minimal length of internal fragments 'minInternal'
|
|
63
|
+
and the maximal length of internal fragments 'maxInternal'
|
|
64
|
+
|
|
65
|
+
## Isoelectric Point
|
|
66
|
+
|
|
67
|
+
pKa of amino acids is based on https://en.wikipedia.org/wiki/Amino_acid.
|
|
68
|
+
|
|
69
|
+
#### calculateCharge(sequence, ph)
|
|
70
|
+
|
|
71
|
+
Calculate the charge for a specific amino acid sequence. The sequence should be entered in the form "HAlaGlyOH".
|
|
72
|
+
Please take care about the N and C terminal end. You may use the methods "convertAASequence" to create such a sequence
|
|
73
|
+
from other format.
|
|
74
|
+
|
|
75
|
+
**Arguments**
|
|
76
|
+
|
|
77
|
+
- `sequence` - string with the amino acids sequence
|
|
78
|
+
- `ph` - ph for which to calculate the charge. Default: 7.0
|
|
79
|
+
|
|
80
|
+
#### splitPeptide(sequence)
|
|
81
|
+
|
|
82
|
+
Split a 3 letter code sequence respecting uppercase, lowercase in an array of residu.
|
|
83
|
+
|
|
84
|
+
**Arguments**
|
|
85
|
+
|
|
86
|
+
- `sequence` - string with the amino acids sequence
|
|
87
|
+
|
|
88
|
+
#### digestPeptide(sequence, options)
|
|
89
|
+
|
|
90
|
+
Allows to digest virtually a peptide
|
|
91
|
+
|
|
92
|
+
**Arguments**
|
|
93
|
+
|
|
94
|
+
- `sequence` - string with the amino acids sequence
|
|
95
|
+
- `options`
|
|
96
|
+
- `minMissed` - minimal missed cleavage (default: 0)
|
|
97
|
+
- `maxMissed` - maximal missed cleavage (default: 0)
|
|
98
|
+
- `minResidue` - minimal number of residues (default: 0)
|
|
99
|
+
- `maxResidue` - maximal number of residues (default: infinity)
|
|
100
|
+
- `enzyme` - enzyme used for digestion
|
|
101
|
+
- chymotrypsin : (Phe|Tyr|Trp)(?!Pro)
|
|
102
|
+
- trypsin : (Lys|Arg)(?!Pro)
|
|
103
|
+
- lysc : (Lys)(?!Pro)
|
|
104
|
+
- glucph4 : (Glu)(?!Pro|Glu)
|
|
105
|
+
- glucph8 : (Asp|Glu)(?!Pro|Glu)
|
|
106
|
+
- thermolysin : (Leu|Ile|Met|Phe|Trp)
|
|
107
|
+
- cyanogenbromide : (Met)
|
|
108
|
+
|
|
109
|
+
#### calculateIEP(sequence)
|
|
110
|
+
|
|
111
|
+
Calculate the isoelectric point for a specific amino acid sequence. The sequence should be entered in the form "HAlaGlyOH".
|
|
112
|
+
Please take care about the N and C terminal end. You may use the methods "convertAASequence" to create such a sequence
|
|
113
|
+
from other format.
|
|
114
|
+
|
|
115
|
+
**Arguments**
|
|
116
|
+
|
|
117
|
+
- `sequence` - string with the amino acids sequence
|
|
118
|
+
|
|
119
|
+
#### calculateIEPChart(sequence)
|
|
120
|
+
|
|
121
|
+
Returns an object containing the y and yAbs array of the charge of the peptide for a pH that goes from 0 to 14.
|
|
122
|
+
|
|
123
|
+
**Arguments**
|
|
124
|
+
|
|
125
|
+
- `sequence` - string with the amino acids sequence
|
|
126
|
+
|
|
127
|
+
#### getColorForIEP(iep)
|
|
128
|
+
|
|
129
|
+
Returns a color based on the isoelectric point :
|
|
130
|
+
|
|
131
|
+
- 0 -> 7 means that at pH 7 it is charged negatively (blue)
|
|
132
|
+
- 7 -> 14 means that at pH7 it is charged positively (red)
|
|
133
|
+
|
|
134
|
+
**Arguments**
|
|
135
|
+
|
|
136
|
+
- `iep` - the value of the isoelectric point
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
|
|
140
|
+
[MIT](./LICENSE)
|
|
141
|
+
|
|
142
|
+
[npm-image]: https://img.shields.io/npm/v/peptide.svg?style=flat-square
|
|
143
|
+
[npm-url]: https://www.npmjs.com/package/peptide
|
|
144
|
+
[travis-image]: https://img.shields.io/travis/cheminfo-js/peptide/main.svg?style=flat-square
|
|
145
|
+
[travis-url]: https://travis-ci.org/cheminfo-js/peptide
|
|
146
|
+
[david-image]: https://img.shields.io/david/cheminfo-js/peptide.svg?style=flat-square
|
|
147
|
+
[david-url]: https://david-dm.org/cheminfo-js/peptide
|
|
148
|
+
[download-image]: https://img.shields.io/npm/dm/peptide.svg?style=flat-square
|
|
149
|
+
[download-url]: https://www.npmjs.com/package/peptide
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allowNeutralLoss.d.ts","sourceRoot":"","sources":["../../src/allowNeutralLoss.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qCAHW,GAAC,OAYX"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allowNeutralLoss = allowNeutralLoss;
|
|
4
|
+
/**
|
|
5
|
+
* Add neutral loss on natural amino acids
|
|
6
|
+
* @param {*} mf
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
function allowNeutralLoss(mf) {
|
|
10
|
+
if (Array.isArray(mf)) {
|
|
11
|
+
for (let i = 0; i < mf.length; i++) {
|
|
12
|
+
mf[i] = allowOneNeutralLoss(mf[i]);
|
|
13
|
+
}
|
|
14
|
+
return mf;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return allowOneNeutralLoss(mf);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function allowOneNeutralLoss(mf) {
|
|
21
|
+
mf = mf.replaceAll(/(Ser|Thr|Asp|Glu)(?!\()/g, '$1(H-2O-1)0-1');
|
|
22
|
+
mf = mf.replaceAll(/(Arg|Lys|Asn|Gln)(?!\()/g, '$1(N-1H-3)0-1');
|
|
23
|
+
return mf;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=allowNeutralLoss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allowNeutralLoss.js","sourceRoot":"","sources":["../../src/allowNeutralLoss.js"],"names":[],"mappings":";;AAKA,4CASC;AAdD;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,EAAE;IACjC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACnC,EAAE,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;SAAM,CAAC;QACN,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,EAAE;IAC7B,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;IAChE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;IAEhE,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const aminoAcids: ({
|
|
2
|
+
name: string;
|
|
3
|
+
aa3: string;
|
|
4
|
+
aa1: string;
|
|
5
|
+
sc: {
|
|
6
|
+
type: string;
|
|
7
|
+
pKa?: undefined;
|
|
8
|
+
};
|
|
9
|
+
pKaC: number;
|
|
10
|
+
pKaN: number;
|
|
11
|
+
} | {
|
|
12
|
+
name: string;
|
|
13
|
+
aa3: string;
|
|
14
|
+
aa1: string;
|
|
15
|
+
sc: {
|
|
16
|
+
type: string;
|
|
17
|
+
pKa: number;
|
|
18
|
+
};
|
|
19
|
+
pKaC: number;
|
|
20
|
+
pKaN: number;
|
|
21
|
+
} | {
|
|
22
|
+
name: string;
|
|
23
|
+
aa3: string;
|
|
24
|
+
aa1: string;
|
|
25
|
+
sc?: undefined;
|
|
26
|
+
pKaC?: undefined;
|
|
27
|
+
pKaN?: undefined;
|
|
28
|
+
})[];
|
|
29
|
+
//# sourceMappingURL=aminoAcids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aminoAcids.d.ts","sourceRoot":"","sources":["../../src/aminoAcids.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgPE"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aminoAcids = void 0;
|
|
4
|
+
// SOURCE: https://en.wikipedia.org/wiki/Amino_acid
|
|
5
|
+
// Link for UTF8 code for modified: https://codepoints.net/search?sc=Grek
|
|
6
|
+
exports.aminoAcids = [
|
|
7
|
+
// Standard amino acids
|
|
8
|
+
{
|
|
9
|
+
name: 'Alanine',
|
|
10
|
+
aa3: 'Ala',
|
|
11
|
+
aa1: 'A',
|
|
12
|
+
sc: {
|
|
13
|
+
type: 'hydrophobic',
|
|
14
|
+
},
|
|
15
|
+
pKaC: 2.33,
|
|
16
|
+
pKaN: 9.71,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Arginine',
|
|
20
|
+
aa3: 'Arg',
|
|
21
|
+
aa1: 'R',
|
|
22
|
+
sc: {
|
|
23
|
+
type: 'positive',
|
|
24
|
+
pKa: 12.1,
|
|
25
|
+
},
|
|
26
|
+
pKaC: 2.03,
|
|
27
|
+
pKaN: 9,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Asparagine',
|
|
31
|
+
aa3: 'Asn',
|
|
32
|
+
aa1: 'N',
|
|
33
|
+
sc: {
|
|
34
|
+
type: 'polar',
|
|
35
|
+
},
|
|
36
|
+
pKaC: 2.13,
|
|
37
|
+
pKaN: 9.05,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'Aspartic acid',
|
|
41
|
+
aa3: 'Asp',
|
|
42
|
+
aa1: 'D',
|
|
43
|
+
sc: {
|
|
44
|
+
type: 'negative',
|
|
45
|
+
pKa: 3.71,
|
|
46
|
+
},
|
|
47
|
+
pKaC: 1.95,
|
|
48
|
+
pKaN: 9.66,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Cysteine',
|
|
52
|
+
aa3: 'Cys',
|
|
53
|
+
aa1: 'C',
|
|
54
|
+
sc: {
|
|
55
|
+
type: 'special',
|
|
56
|
+
pKa: 8.14,
|
|
57
|
+
},
|
|
58
|
+
pKaC: 1.91,
|
|
59
|
+
pKaN: 10.28,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Glutamic acid',
|
|
63
|
+
aa3: 'Glu',
|
|
64
|
+
aa1: 'E',
|
|
65
|
+
sc: {
|
|
66
|
+
type: 'negative',
|
|
67
|
+
pKa: 4.15,
|
|
68
|
+
},
|
|
69
|
+
pKaC: 2.16,
|
|
70
|
+
pKaN: 9.58,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'Glutamine',
|
|
74
|
+
aa3: 'Gln',
|
|
75
|
+
aa1: 'Q',
|
|
76
|
+
sc: {
|
|
77
|
+
type: 'polar',
|
|
78
|
+
},
|
|
79
|
+
pKaC: 2.18,
|
|
80
|
+
pKaN: 9,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Glycine',
|
|
84
|
+
aa3: 'Gly',
|
|
85
|
+
aa1: 'G',
|
|
86
|
+
sc: {
|
|
87
|
+
type: 'special',
|
|
88
|
+
},
|
|
89
|
+
pKaC: 2.34,
|
|
90
|
+
pKaN: 9.58,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'Histidine',
|
|
94
|
+
aa3: 'His',
|
|
95
|
+
aa1: 'H',
|
|
96
|
+
sc: {
|
|
97
|
+
type: 'positive',
|
|
98
|
+
pKa: 6.04,
|
|
99
|
+
},
|
|
100
|
+
pKaC: 1.7,
|
|
101
|
+
pKaN: 9.09,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'Isoleucine',
|
|
105
|
+
aa3: 'Ile',
|
|
106
|
+
aa1: 'I',
|
|
107
|
+
sc: {
|
|
108
|
+
type: 'hydrophobic',
|
|
109
|
+
},
|
|
110
|
+
pKaC: 2.26,
|
|
111
|
+
pKaN: 9.6,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'Leucine',
|
|
115
|
+
aa3: 'Leu',
|
|
116
|
+
aa1: 'L',
|
|
117
|
+
sc: {
|
|
118
|
+
type: 'hydrophobic',
|
|
119
|
+
},
|
|
120
|
+
pKaC: 2.32,
|
|
121
|
+
pKaN: 9.58,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: 'Lysine',
|
|
125
|
+
aa3: 'Lys',
|
|
126
|
+
aa1: 'K',
|
|
127
|
+
sc: {
|
|
128
|
+
type: 'positive',
|
|
129
|
+
pKa: 10.67,
|
|
130
|
+
},
|
|
131
|
+
pKaC: 2.15,
|
|
132
|
+
pKaN: 9.16,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'Methionine',
|
|
136
|
+
aa3: 'Met',
|
|
137
|
+
aa1: 'M',
|
|
138
|
+
sc: {
|
|
139
|
+
type: 'hydrophobic',
|
|
140
|
+
},
|
|
141
|
+
pKaC: 2.16,
|
|
142
|
+
pKaN: 9.08,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'Phenylalanine',
|
|
146
|
+
aa3: 'Phe',
|
|
147
|
+
aa1: 'F',
|
|
148
|
+
sc: {
|
|
149
|
+
type: 'hydrophobic',
|
|
150
|
+
},
|
|
151
|
+
pKaC: 2.18,
|
|
152
|
+
pKaN: 9.09,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'Proline',
|
|
156
|
+
aa3: 'Pro',
|
|
157
|
+
aa1: 'P',
|
|
158
|
+
sc: {
|
|
159
|
+
type: 'special',
|
|
160
|
+
},
|
|
161
|
+
pKaC: 1.95,
|
|
162
|
+
pKaN: 10.47,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'Serine',
|
|
166
|
+
aa3: 'Ser',
|
|
167
|
+
aa1: 'S',
|
|
168
|
+
sc: {
|
|
169
|
+
type: 'polar',
|
|
170
|
+
},
|
|
171
|
+
pKaC: 2.13,
|
|
172
|
+
pKaN: 9.05,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'Threonine',
|
|
176
|
+
aa3: 'Thr',
|
|
177
|
+
aa1: 'T',
|
|
178
|
+
sc: {
|
|
179
|
+
type: 'polar',
|
|
180
|
+
},
|
|
181
|
+
pKaC: 2.2,
|
|
182
|
+
pKaN: 8.96,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'Tryptophan',
|
|
186
|
+
aa3: 'Trp',
|
|
187
|
+
aa1: 'W',
|
|
188
|
+
sc: {
|
|
189
|
+
type: 'hydrophobic',
|
|
190
|
+
},
|
|
191
|
+
pKaC: 2.38,
|
|
192
|
+
pKaN: 9.34,
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'Tyrosine',
|
|
196
|
+
aa3: 'Tyr',
|
|
197
|
+
aa1: 'Y',
|
|
198
|
+
sc: {
|
|
199
|
+
type: 'hydrophobic',
|
|
200
|
+
},
|
|
201
|
+
pKaC: 2.24,
|
|
202
|
+
pKaN: 9.04,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'Valine',
|
|
206
|
+
aa3: 'Val',
|
|
207
|
+
aa1: 'V',
|
|
208
|
+
sc: {
|
|
209
|
+
type: 'hydrophobic',
|
|
210
|
+
},
|
|
211
|
+
pKaC: 2.27,
|
|
212
|
+
pKaN: 9.52,
|
|
213
|
+
},
|
|
214
|
+
// Additional
|
|
215
|
+
{
|
|
216
|
+
name: 'Selenocysteine',
|
|
217
|
+
aa3: 'Sec',
|
|
218
|
+
aa1: 'U',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: 'Pyrrolysine',
|
|
222
|
+
aa3: 'Pyl',
|
|
223
|
+
aa1: 'O',
|
|
224
|
+
},
|
|
225
|
+
// Ambiguous
|
|
226
|
+
{
|
|
227
|
+
name: 'Asparagine or aspartic acid',
|
|
228
|
+
aa3: 'Asx',
|
|
229
|
+
aa1: 'B',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'Glutamine or glutamic acid',
|
|
233
|
+
aa3: 'Glx',
|
|
234
|
+
aa1: 'Z',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: 'Leucine or isoleucine',
|
|
238
|
+
aa3: 'Xle',
|
|
239
|
+
aa1: 'J',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: 'Unspecified or unknown',
|
|
243
|
+
aa3: 'Xaa',
|
|
244
|
+
aa1: 'X',
|
|
245
|
+
},
|
|
246
|
+
];
|
|
247
|
+
//# sourceMappingURL=aminoAcids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aminoAcids.js","sourceRoot":"","sources":["../../src/aminoAcids.js"],"names":[],"mappings":";;;AAAA,mDAAmD;AACnD,yEAAyE;AAC5D,QAAA,UAAU,GAAG;IACxB,uBAAuB;IACvB;QACE,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,GAAG;QACR,EAAE,EAAE;YACF,IAAI,EAAE,aAAa;SACpB;QACD,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,UAAU;QAChB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QACE,IAAI,EAAE,uBAAuB;QAC7B,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,GAAG;KACT;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,GAAG;KACT;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chargePeptide.d.ts","sourceRoot":"","sources":["../../src/chargePeptide.js"],"names":[],"mappings":"AAIA,0DASC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chargePeptide = chargePeptide;
|
|
4
|
+
const getAA_1 = require("./getAA");
|
|
5
|
+
// SOURCE: https://en.wikipedia.org/wiki/Amino_acid
|
|
6
|
+
function chargePeptide(mf, options = {}) {
|
|
7
|
+
if (Array.isArray(mf)) {
|
|
8
|
+
for (let i = 0; i < mf.length; i++) {
|
|
9
|
+
mf[i] = chargeOnePeptide(mf[i], options);
|
|
10
|
+
}
|
|
11
|
+
return mf;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return chargeOnePeptide(mf, options);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function chargeOnePeptide(mf, options) {
|
|
18
|
+
const { pH = 0 } = options;
|
|
19
|
+
// we will allow to charge the peptide at a specific pH
|
|
20
|
+
// first amino acids (N-terminal)
|
|
21
|
+
if (mf.match(/^H[A-Z][a-z]{2}/)) {
|
|
22
|
+
let firstAA = mf.replace(/^H([A-Z][a-z]{2}).*/, '$1');
|
|
23
|
+
if ((0, getAA_1.getAA)(firstAA) && pH < (0, getAA_1.getAA)(firstAA).pKaN) {
|
|
24
|
+
mf = mf.replace(/^H([^+])/, 'H+H$1');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
// last amino acids (C-terminal)
|
|
28
|
+
if (mf.match(/[A-Z][a-z]{2}OH$/)) {
|
|
29
|
+
let lastAA = mf.replace(/.*([A-Z][a-z]{2})OH$/, '$1');
|
|
30
|
+
if ((0, getAA_1.getAA)(lastAA) && pH > (0, getAA_1.getAA)(lastAA).pKaC) {
|
|
31
|
+
mf = mf.replace(/OH$/, 'O-');
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// basic AA
|
|
35
|
+
if (pH < (0, getAA_1.getAA)('Arg').sc.pKa)
|
|
36
|
+
mf = mf.replaceAll(/(Arg)(?!\()/g, '$1(H+)');
|
|
37
|
+
if (pH < (0, getAA_1.getAA)('His').sc.pKa)
|
|
38
|
+
mf = mf.replaceAll(/(His)(?!\()/g, '$1(H+)');
|
|
39
|
+
if (pH < (0, getAA_1.getAA)('Lys').sc.pKa)
|
|
40
|
+
mf = mf.replaceAll(/(Lys)(?!\()/g, '$1(H+)');
|
|
41
|
+
// acid AA
|
|
42
|
+
if (pH > (0, getAA_1.getAA)('Asp').sc.pKa)
|
|
43
|
+
mf = mf.replaceAll(/(Asp)(?!\()/g, '$1(H-1-)');
|
|
44
|
+
if (pH > (0, getAA_1.getAA)('Glu').sc.pKa)
|
|
45
|
+
mf = mf.replaceAll(/(Glu)(?!\()/g, '$1(H-1-)');
|
|
46
|
+
if (pH > (0, getAA_1.getAA)('Cys').sc.pKa)
|
|
47
|
+
mf = mf.replaceAll(/(Cys)(?!\()/g, '$1(H-1-)');
|
|
48
|
+
return mf;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=chargePeptide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chargePeptide.js","sourceRoot":"","sources":["../../src/chargePeptide.js"],"names":[],"mappings":";;AAIA,sCASC;AAbD,mCAAgC;AAEhC,mDAAmD;AAEnD,SAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE;IAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EA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,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC3E,IAAI,EAAE,GAAG,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG;QAAE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC3E,IAAI,EAAE,GAAG,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG;QAAE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAE3E,UAAU;IACV,IAAI,EAAE,GAAG,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG;QAAE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IAC7E,IAAI,EAAE,GAAG,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG;QAAE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IAE7E,IAAI,EAAE,GAAG,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG;QAAE,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IAE7E,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digestPeptide.d.ts","sourceRoot":"","sources":["../../src/digestPeptide.js"],"names":[],"mappings":"AASA,qEAsDC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Iotuibs:
|
|
4
|
+
* minMissed (default: 0)
|
|
5
|
+
* maxMissed (default: 0)
|
|
6
|
+
* minResidue: 0;
|
|
7
|
+
* maxResidue: infinity
|
|
8
|
+
* enzyme: chymotrypsin, trypsin, glucph4, glucph8, thermolysin, cyanogenbromide : Mandatory, no default value !
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.digestPeptide = digestPeptide;
|
|
12
|
+
function digestPeptide(sequence, options = {}) {
|
|
13
|
+
sequence = sequence.replace(/^H([^a-z])/, '$1').replace(/OH$/, '');
|
|
14
|
+
options.enzyme = options.enzyme || 'trypsin';
|
|
15
|
+
if (options.minMissed === undefined)
|
|
16
|
+
options.minMissed = 0;
|
|
17
|
+
if (options.maxMissed === undefined)
|
|
18
|
+
options.maxMissed = 0;
|
|
19
|
+
if (options.minResidue === undefined)
|
|
20
|
+
options.minResidue = 0;
|
|
21
|
+
if (options.maxResidue === undefined)
|
|
22
|
+
options.maxResidue = Number.MAX_VALUE;
|
|
23
|
+
let regexp = getRegexp(options.enzyme);
|
|
24
|
+
let fragments = sequence.replace(regexp, '$1 ').split(/ /).filter(Boolean);
|
|
25
|
+
{
|
|
26
|
+
let from = 0;
|
|
27
|
+
for (let i = 0; i < fragments.length; i++) {
|
|
28
|
+
let nbResidue = fragments[i]
|
|
29
|
+
.replaceAll(/([A-Z][a-z]{2})/g, ' $1')
|
|
30
|
+
.split(/ /)
|
|
31
|
+
.filter(Boolean).length;
|
|
32
|
+
fragments[i] = {
|
|
33
|
+
sequence: fragments[i],
|
|
34
|
+
nbResidue,
|
|
35
|
+
from,
|
|
36
|
+
to: from + nbResidue - 1,
|
|
37
|
+
};
|
|
38
|
+
from += nbResidue;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
let results = [];
|
|
42
|
+
for (let i = 0; i < fragments.length - options.minMissed; i++) {
|
|
43
|
+
for (let j = options.minMissed; j <= Math.min(options.maxMissed, fragments.length - i - 1); j++) {
|
|
44
|
+
let fragment = '';
|
|
45
|
+
let nbResidue = 0;
|
|
46
|
+
for (let k = i; k <= i + j; k++) {
|
|
47
|
+
fragment += fragments[k].sequence;
|
|
48
|
+
nbResidue += fragments[k].nbResidue;
|
|
49
|
+
}
|
|
50
|
+
let from = fragments[i].from + 1;
|
|
51
|
+
let to = fragments[i + j].to + 1;
|
|
52
|
+
if (fragment &&
|
|
53
|
+
nbResidue >= options.minResidue &&
|
|
54
|
+
nbResidue <= options.maxResidue) {
|
|
55
|
+
results.push(`H${fragment}OH$D${from}>${to}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return results;
|
|
60
|
+
}
|
|
61
|
+
function getRegexp(enzyme) {
|
|
62
|
+
switch (enzyme.toLowerCase().replaceAll(/[^\da-z]/g, '')) {
|
|
63
|
+
case 'chymotrypsin':
|
|
64
|
+
return /(Phe|Tyr|Trp)(?!Pro)/g;
|
|
65
|
+
case 'trypsin':
|
|
66
|
+
return /(Lys|Arg)(?!Pro)/g;
|
|
67
|
+
case 'lysc':
|
|
68
|
+
return /(Lys)(?!Pro)/g;
|
|
69
|
+
case 'glucph4':
|
|
70
|
+
return /(Glu)(?!Pro|Glu)/g;
|
|
71
|
+
case 'glucph8':
|
|
72
|
+
return /(Asp|Glu)(?!Pro|Glu)/g;
|
|
73
|
+
case 'thermolysin': // N-term of Leu, Phe, Val, Ile, Ala, Met
|
|
74
|
+
return /()(?=Ile|Leu|Val|Ala|Met|Phe)/g;
|
|
75
|
+
case 'cyanogenbromide':
|
|
76
|
+
return /(Met)/g;
|
|
77
|
+
case 'any':
|
|
78
|
+
return /()(?=[A-Z][a-z]{2})/g;
|
|
79
|
+
default:
|
|
80
|
+
throw new Error(`Digestion enzyme: ${enzyme} is unknown`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=digestPeptide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digestPeptide.js","sourceRoot":"","sources":["../../src/digestPeptide.js"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAEH,sCAsDC;AAtDD,SAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,EAAE;IAClD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