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.12 to 1.0.13

8

CHANGELOG.md

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

<a name="1.0.13"></a>
## [1.0.13](https://github.com/GMOD/bam-js/compare/v1.0.12...v1.0.13) (2018-12-25)
- Use ascii decoding for read names
- Fix error with large BAM headers with many refseqs
<a name="1.0.12"></a>

@@ -2,0 +10,0 @@ ## [1.0.12](https://github.com/GMOD/bam-js/compare/v1.0.11...v1.0.12) (2018-11-25)

35

dist/bamFile.js

@@ -224,10 +224,19 @@ 'use strict';

buf = Buffer.alloc(refSeqBytes + blockLen);
_context2.next = 3;
if (!(start > refSeqBytes)) {
_context2.next = 3;
break;
}
return _context2.abrupt('return', this._readRefSeqs(start, refSeqBytes * 2));
case 3:
_context2.next = 5;
return this.bam.read(buf, 0, refSeqBytes + blockLen);
case 3:
case 5:
bytesRead = _context2.sent;
if (bytesRead) {
_context2.next = 6;
_context2.next = 8;
break;

@@ -238,3 +247,3 @@ }

case 6:
case 8:
if (bytesRead < refSeqBytes) {

@@ -245,6 +254,6 @@ buf = buf.slice(0, bytesRead);

}
_context2.next = 9;
_context2.next = 11;
return unzip(buf);
case 9:
case 11:
uncba = _context2.sent;

@@ -257,5 +266,5 @@ nRef = uncba.readInt32LE(start);

case 15:
case 17:
if (!(i < nRef)) {
_context2.next = 29;
_context2.next = 31;
break;

@@ -277,3 +286,3 @@ }

if (!(p > uncba.length)) {
_context2.next = 26;
_context2.next = 28;
break;

@@ -285,11 +294,11 @@ }

case 26:
case 28:
i += 1;
_context2.next = 15;
_context2.next = 17;
break;
case 29:
case 31:
return _context2.abrupt('return', { chrToIndex: chrToIndex, indexToChr: indexToChr });
case 30:
case 32:
case 'end':

@@ -296,0 +305,0 @@ return _context2.stop();

@@ -190,3 +190,3 @@ 'use strict';

var nl = this._get('_l_read_name');
return this.bytes.byteArray.toString('utf8', this.bytes.start + 36, this.bytes.start + 36 + nl - 1);
return this.bytes.byteArray.toString('ascii', this.bytes.start + 36, this.bytes.start + 36 + nl - 1);
}

@@ -193,0 +193,0 @@

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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