Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "peptide", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Peptide", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "peptide", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Peptide", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -49,3 +49,4 @@ # peptide | ||
You can also specify internal fragments using the options 'ya' and 'yb' as well as the maximal length for internal fragments 'maxInternal' | ||
You can also specify internal fragments using the options 'ya' and 'yb' as well as the minimal length of internal fragments 'minInternal' | ||
and the maximal length of internal fragments 'maxInternal' | ||
@@ -67,2 +68,31 @@ ## Isoelectric Point | ||
#### splitSequence(sequence) | ||
Split a 3 letter code sequence respecting uppercase, lowercase in an array of residu. | ||
__Arguments__ | ||
* `sequence` - string with the amino acids sequence | ||
#### digestSequence(sequence, options) | ||
Allows to digest virtually a sequence | ||
__Arguments__ | ||
* `sequence` - string with the amino acids sequence | ||
* `options` | ||
* `minMissed` - minimal missed cleavage (default: 0) | ||
* `maxMissed` - maximal missed cleavage (default: 0) | ||
* `minResidue` - minimal number of residues (default: 0) | ||
* `maxResidue` - maximal number of residues (default: infinity) | ||
* `enzyme` - enzyme used for digestion | ||
* chymotrypsin : (Phe|Tyr|Trp)(?!Pro) | ||
* trypsin : (Lys|Arg)(?!Pro) | ||
* lysc : (Lys)(?!Pro) | ||
* glucph4 : (Glu)(?!Pro|Glu) | ||
* glucph8 : (Asp|Glu)(?!Pro|Glu) | ||
* thermolysin : (Leu|Ile|Met|Phe|Trp) | ||
* cyanogenbromide : (Met) | ||
#### calculateIEP(sequence) | ||
@@ -69,0 +99,0 @@ |
@@ -6,2 +6,4 @@ 'use strict'; | ||
var chargePeptide = require('./chargePeptide'); | ||
var splitSequence = require('./splitSequence'); | ||
var digestSequence = require('./digestSequence'); | ||
@@ -14,5 +16,7 @@ exports.getInfo = function () { | ||
exports.splitSequence=splitSequence; | ||
exports.digestSequence=digestSequence; | ||
exports.calculateIEP = function (sequence) { | ||
var aas=sequence.replace(/([A-Z])/g," $1").split(/ /); | ||
aas=aas.slice(2,aas.length-2); | ||
var aas=splitSequence(sequence); | ||
var result=IEP.calculateIEP(aas); | ||
@@ -23,4 +27,3 @@ return result; | ||
exports.calculateIEPChart = function (sequence) { | ||
var aas=sequence.replace(/([A-Z])/g," $1").split(/ /); | ||
aas=aas.slice(2,aas.length-2); | ||
var aas=splitSequence(sequence); | ||
var result=IEP.calculateChart(aas); | ||
@@ -36,4 +39,3 @@ return result; | ||
exports.calculateCharge = function (sequence, ph) { | ||
var aas=sequence.replace(/([A-Z])/g," $1").split(/ /); | ||
aas=aas.slice(2,aas.length-2); | ||
var aas=splitSequence(sequence); | ||
return IEP.calculateCharge(aas, ph); | ||
@@ -57,2 +59,3 @@ } | ||
options.maxInternal = options.maxInternal || Number.MAX_VALUE; | ||
options.minInternal = options.minInternal || 0; | ||
@@ -75,6 +78,8 @@ var mfs = []; | ||
var iTerm=''; | ||
for (var k=i; k<j; k++) { | ||
iTerm+=mfparts[k]; | ||
if ((j-i)>=options.minInternal){ | ||
for (var k = i; k < j; k++) { | ||
iTerm += mfparts[k]; | ||
} | ||
addITerm(mfs, iTerm, mfparts.length - i, j, options); | ||
} | ||
addITerm(mfs, iTerm, mfparts.length-i, j, options); | ||
} | ||
@@ -81,0 +86,0 @@ } |
24087
16
666
137