Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gmod/bam

Package Overview
Dependencies
Maintainers
5
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gmod/bam - npm Package Compare versions

Comparing version 1.0.18 to 1.0.19

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## [1.0.19](https://github.com/GMOD/bam-js/compare/v1.0.18...v1.0.19) (2019-05-30)
- Added lineCount and hasRefSeq functions to BamFile, each accepting a string seqName
- Fixed aborting on index retrieval code
## [1.0.18](https://github.com/GMOD/bam-js/compare/v1.0.17...v1.0.18) (2019-05-01)

@@ -2,0 +10,0 @@

20

dist/bamFile.js

@@ -368,14 +368,20 @@ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _abortablePromiseCache = _interopRequireDefault(require("abortable-promise-cache"));

return sink;
} }, { key: "hasRefSeq", value: function hasRefSeq(
} }, { key: "hasRefSeq", value: function () {var _hasRefSeq = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(
seqId) {
return this.index.hasRefSeq(seqId);
} }, { key: "indexCov", value: function () {var _indexCov = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(
seqName) {var refId;return _regenerator.default.wrap(function _callee6$(_context6) {while (1) {switch (_context6.prev = _context6.next) {case 0:
refId = this.chrToIndex && this.chrToIndex[seqName];return _context6.abrupt("return",
this.index.hasRefSeq(refId));case 2:case "end":return _context6.stop();}}}, _callee6, this);}));function hasRefSeq(_x14) {return _hasRefSeq.apply(this, arguments);}return hasRefSeq;}() }, { key: "lineCount", value: function () {var _lineCount = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(
seqName, start, end) {var range, seqId;return _regenerator.default.wrap(function _callee6$(_context6) {while (1) {switch (_context6.prev = _context6.next) {case 0:_context6.next = 2;return (
seqName) {var refId;return _regenerator.default.wrap(function _callee7$(_context7) {while (1) {switch (_context7.prev = _context7.next) {case 0:
refId = this.chrToIndex && this.chrToIndex[seqName];return _context7.abrupt("return",
this.index.lineCount(refId));case 2:case "end":return _context7.stop();}}}, _callee7, this);}));function lineCount(_x15) {return _lineCount.apply(this, arguments);}return lineCount;}() }, { key: "indexCov", value: function () {var _indexCov = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(
seqName, start, end) {var range, seqId;return _regenerator.default.wrap(function _callee8$(_context8) {while (1) {switch (_context8.prev = _context8.next) {case 0:_context8.next = 2;return (
this.index.parse());case 2:
range = start !== undefined;
seqId = this.chrToIndex && this.chrToIndex[seqName];return _context6.abrupt("return",
seqId = this.chrToIndex && this.chrToIndex[seqName];return _context8.abrupt("return",
range ?
this.index.indexCov(seqId, start, end) :
this.index.indexCovTotal(seqId));case 5:case "end":return _context6.stop();}}}, _callee6, this);}));function indexCov(_x14, _x15, _x16) {return _indexCov.apply(this, arguments);}return indexCov;}() }]);return BamFile;}();exports.default = BamFile;
this.index.indexCovTotal(seqId));case 5:case "end":return _context8.stop();}}}, _callee8, this);}));function indexCov(_x16, _x17, _x18) {return _indexCov.apply(this, arguments);}return indexCov;}() }]);return BamFile;}();exports.default = BamFile;

@@ -24,7 +24,7 @@ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _abortablePromiseCache = _interopRequireDefault(require("abortable-promise-cache"));

abortSignal) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
abortSignal) {var _this = this;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
if (!this._parseCache)
this._parseCache = new _abortablePromiseCache.default({
cache: new _quickLru.default({ maxSize: 1 }),
fill: this._parse.bind(this) });return _context.abrupt("return",
fill: function fill(data, signal) {return _this._parse(signal);} });return _context.abrupt("return",

@@ -31,0 +31,0 @@ this._parseCache.get('index', null, abortSignal));case 2:case "end":return _context.stop();}}}, _callee, this);}));function parse(_x) {return _parse.apply(this, arguments);}return parse;}()

{
"name": "@gmod/bam",
"version": "1.0.18",
"version": "1.0.19",
"description": "Parser for BAM and BAM index (bai) files",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -47,3 +47,3 @@ [![Generated with nod](https://img.shields.io/badge/generator-nod-2196F3.svg?style=flat-square)](https://github.com/diegohaz/nod)

#### getRecordsForRange(refName, start, end, opts)
#### async getRecordsForRange(refName, start, end, opts)

@@ -58,3 +58,3 @@ * refName - a string for the chrom to fetch from

### indexCov(refName, start, end)
### async indexCov(refName, start, end)

@@ -67,2 +67,15 @@ * refName - a string for the chrom to fetch from

### async lineCount(refName)
* refName - a string for the chrom to fetch from
Returns number of features on refName, uses special pseudo-bin from the BAI/CSI index (e.g. bin 37450 from bai, returning n_mapped from SAM spec pdf) or -1 if refName not exist in sample
### async hasRefSeq(refName)
* refName - a string for the chrom to check
Returns whether we have this refName in the sample
### Returned features

@@ -69,0 +82,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc