chemcalc-extended
v2.1.0
Published
chemcalc-extended project - extends chemcalc with new methods
Downloads
8
Readme
chemcalc-extended
chemcalc-extended project - Extend chemcalc-js to allow experimental spectra similarity search
Configuration
mfFromMonoisotopicMassSimilarity(mass, experimental, options)
- experimental : an array of [[x1,y1],[x2,y2],...] or [[x1,x2,x3,...][y1,y2,y3,...]]
options are the same as mfFromMonoisotopicMass with the following added possibilities:
- widthTop : top width of the trapezoid
- widthBottom : bottom width of the trapezoid
- widthFunction : code that allows to calculate the
widthBottom
andwidthTop
frommass
andcharge
.
var widthTop=mass*0.005;
var widthBottom=mass*0.010;
- from : mass "from" which calculate the similarity
- to : mass "to" which calculate the similarity
- decimalsPPM : number of decimals for PPM
- decimalsMass : number decimals for the mass
analyseMF(mf, options)
Extends analyseMF from chemcalc to return a property atoms that contains the number of each of the atoms.
Arguments
- mf - string with a molecular formula to charge
- options
matchMFs
We will try to find the molecular formula that match
matchMFs(mfs, experimental, options)
- experimental : an array of [[x1,y1],[x2,y2],...] or [[x1,x2,x3,...][y1,y2,y3,...]]
- mfs: array of array (or simple array) of all the possibilities to test / combine
- options
- widthTop : top width of the trapezoid
- widthBottom : bottom width of the trapezoid
- from : mass "from" which calculate the similarity
- to : mass "to" which calculate the similarity
- decimalsPPM : number of decimals for PPM
- decimalsMass : number of decimals for the mass
- zone : zone on which to calculate similarity. It is based on monoisotopic mass. It is an object that contains "low" and "high". Those values will be divided by the charge of the current molecular formula. Default: zone: {low: -0.5, high: 4.5}
- bestOf : keep only the best result in the defined range of mass. By default, 0 = not used
- maxResults : keep only the best similarity. This process is done after "bestOf". By default: 500
- minSimilarity : minimal similarity value (between 0 and 1). By default: 50
- common : only consider the common part for similarity calculation based on the widthBottom value (Default: '', possible values: '', 'first', 'second', 'both')
combineMFs(array)
We may have array of array of string and we combine to get all the possible MFs
ex:
- combineMFs([["C","H$YY"],[],[""],["Cl","Br$XX"]])
- combineMFs(["C.H.O","+,++",['Cl','Br$XX']])
enumerateMF(string|regexp, options)
Enumerate molecules given a regular expression:
Example:
var result = CE.enumerateMF('HCys(C(Gly|Ala10)|C{50,50}|C{90,10})OH');
/*
result should be:
[
'HCys(C(Ala10))OH',
'HCys(C(Gly))OH',
'HCys(C{50,50})OH',
'HCys(C{90,10})OH'
]
*/
The options are the same as regexp-enumerator library
getEutrophicationPotential
getEutrophicationPotential(mf)
Returns an object containing the eutrophication potential of the given molecular formula.
Peptides
convertAASequence(sequence)
Returns a peptidic sequence from a PDB or one letter code to the internal molecular formula format
Arguments
sequence
- string with the amino acids sequence
chargePeptide(mf, options)
Charge the peptide at a specific pH. 'mf' is either a 3 letter peptide sequence or an array of peptide sequences.
Arguments
mf
- string with a molecular formula to charge- options:
- pH : you may specify the pH to calculate the protonation state. By default: 0, it has the consequence to add a positive charge on Arg, His and Lys.
allowNeutralLoss(mf, options)
Allow neutral loss for the follow residues:
- H2O for S, T, E, D
- NH3 for R, K, Q, N
The residues may not be side-chain modified.
generatePeptideFragments(mf, [options])
Generate peptide fragmentation. Returns an array of molecular formulas with the different fragments.
Arguments
mf
- string with the molecular formulaoptions
- object with requested fragments. Default:{a:false, b:true, c:false, x:false, y:true, z:false, i:false}
splitPeptide(sequence)
Split a 3 letter code sequence respecting uppercase, lowercase in an array of residu.
Arguments
sequence
- string with the amino acids sequence
digestPeptide(sequence, options)
Allows to digest virtually a peptide
Arguments
sequence
- string with the amino acids sequenceoptions
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)
Development
Install dev dependencies
npm install
Execute test suite
npm test