Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
$ npm install --save @gmod/bam
const {BamFile} = require('@gmod/bam');
const t = new BamFile({
bamPath: 'test.bam',
});
var header = await t.getHeader()
var records = await t.getRecordsForRange('ctgA', 1, 50000)
Input are 0-based half-open coordinates (note: not the same as samtools view coordinate inputs!)
BAM class constructor infers BAI by default as bamPath+'.bai', or you can specify it explicitely via baiPath (also accepts csiPath)
BAM({ bamPath: "yourfile.bam", baiPath: "yourfile.bai" })
Or accepts filehandles, this is an abstract filehandle concept that can represent remote files. The remote file concept is not built into this repository, but see @gmod/cram for example of the remoteFile.js class
BAM({ bamFilehandle: new FileHandle("http://localhost/file.bam", baiFilehandle: new FileHandle("yourfile.bai") })
The method getRecordsForRange(refName, start, end, opts) has the opts blob that can contain
The returned features from BAM are lazy features meaning that it delays processing of all the feature tags until necessary. You can perform feature.get('field') to get the value of a feature attribute
Example
feature.get('seq_id')
feature.get('start')
feature.get('name') // QNAME
feature.get('seq') // get feature sequence
This may change in future versions to make it raw records but will be a major version bump
MIT © Colin Diesh
1.0.15 (2019-04-04)
<a name="1.0.14"></a>
FAQs
Parser for BAM and BAM index (bai) files
The npm package @gmod/bam receives a total of 1,839 weekly downloads. As such, @gmod/bam popularity was classified as popular.
We found that @gmod/bam demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.