Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
js-mzML is a node module for parsing mzML files used in mass spectrometry.
This module is based off of cheminfo-js/mzML found here, but some changes have been made. Notably:
General information on how to decode mzML files also comes from here.
js-mzML is installed with npm install -s js-mzml
To use:
var jsmzml = require('js-mzml');
filename = 'your-file-name-here.mzML';
var mzml = new jsmzml(filename);
var options = {
'level': 'Both',
'rtBegin': 0,
'rtEnd': 0.005
};
var spectra = mzml.retrieve(options, function() {
console.log(mzml.spectra);
});
The spectra will be of this form:
{'1':
{
currentId: 'controllerType=0 controllerNumber=1 scan=1',
msLevel: '1',
time: 0.004935,
mass:
Float32Array [
data ...
],
intensity:
Float32Array [
data ...
]
}
}
There is also an example.js
that you can modify to test things out.
js-mzML uses file streams under the hood which means that it is memory efficient and asynchronous-ish. Each js-mzML object has two variables associated with it, spectra
(as discussed above) and isFinished
. The variable isFinished
changes to false when the retrive method is called. This value will change to true once the file stream is finished and then the callback will be called.
The options that can be passed to js-mzML are:
level
: Either '1', '2', or 'Both'. '1' gives you MS data, '2' gives you MS/MS data, and 'Both' gives you both types. The default is 'Both'.rtBegin
: This is the earliest retention time you want to return data from. The default is 0.rtEnd
: This is the latest retention time you want to return data from. The default is 9999999999.There is currently to way to declare the units of the retention time, so you will have to make sure those match the units of the files you are processing.
Tests can be run with npm run test
There are spectra in the test folder from http://psidev.info/index.php?q=node/257
No breaking changes are expected in future versions, but this module was created to be part of a larger project, so changes may occur.
FAQs
An mzML parser
The npm package js_mzml receives a total of 7 weekly downloads. As such, js_mzml popularity was classified as not popular.
We found that js_mzml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.