@gmod/cram 1.5.9 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +90 -0
- package/README.md +182 -172
- package/dist/craiIndex.d.ts +37 -0
- package/dist/craiIndex.js +196 -301
- package/dist/craiIndex.js.map +1 -0
- package/dist/cram-bundle.js +6 -15
- package/dist/cramFile/codecs/_base.d.ts +6 -0
- package/dist/cramFile/codecs/_base.js +44 -53
- package/dist/cramFile/codecs/_base.js.map +1 -0
- package/dist/cramFile/codecs/beta.d.ts +4 -0
- package/dist/cramFile/codecs/beta.js +38 -48
- package/dist/cramFile/codecs/beta.js.map +1 -0
- package/dist/cramFile/codecs/byteArrayLength.d.ts +8 -0
- package/dist/cramFile/codecs/byteArrayLength.js +58 -78
- package/dist/cramFile/codecs/byteArrayLength.js.map +1 -0
- package/dist/cramFile/codecs/byteArrayStop.d.ts +6 -0
- package/dist/cramFile/codecs/byteArrayStop.js +62 -76
- package/dist/cramFile/codecs/byteArrayStop.js.map +1 -0
- package/dist/cramFile/codecs/external.d.ts +7 -0
- package/dist/cramFile/codecs/external.js +63 -81
- package/dist/cramFile/codecs/external.js.map +1 -0
- package/dist/cramFile/codecs/gamma.d.ts +4 -0
- package/dist/cramFile/codecs/gamma.js +43 -56
- package/dist/cramFile/codecs/gamma.js.map +1 -0
- package/dist/cramFile/codecs/huffman.d.ts +17 -0
- package/dist/cramFile/codecs/huffman.js +126 -199
- package/dist/cramFile/codecs/huffman.js.map +1 -0
- package/dist/cramFile/codecs/index.d.ts +2 -0
- package/dist/cramFile/codecs/index.js +31 -38
- package/dist/cramFile/codecs/index.js.map +1 -0
- package/dist/cramFile/codecs/subexp.d.ts +4 -0
- package/dist/cramFile/codecs/subexp.js +51 -64
- package/dist/cramFile/codecs/subexp.js.map +1 -0
- package/dist/cramFile/constants.d.ts +36 -0
- package/dist/cramFile/constants.js +52 -50
- package/dist/cramFile/constants.js.map +1 -0
- package/dist/cramFile/container/compressionScheme.d.ts +23 -0
- package/dist/cramFile/container/compressionScheme.js +115 -153
- package/dist/cramFile/container/compressionScheme.js.map +1 -0
- package/dist/cramFile/container/index.d.ts +13 -0
- package/dist/cramFile/container/index.js +169 -283
- package/dist/cramFile/container/index.js.map +1 -0
- package/dist/cramFile/file.d.ts +63 -0
- package/dist/cramFile/file.js +440 -766
- package/dist/cramFile/file.js.map +1 -0
- package/dist/cramFile/index.d.ts +2 -0
- package/dist/cramFile/index.js +7 -4
- package/dist/cramFile/index.js.map +1 -0
- package/dist/cramFile/record.d.ts +79 -0
- package/dist/cramFile/record.js +253 -308
- package/dist/cramFile/record.js.map +1 -0
- package/dist/cramFile/sectionParsers.d.ts +18 -0
- package/dist/cramFile/sectionParsers.js +324 -362
- package/dist/cramFile/sectionParsers.js.map +1 -0
- package/dist/cramFile/slice/decodeRecord.d.ts +2 -0
- package/dist/cramFile/slice/decodeRecord.js +278 -298
- package/dist/cramFile/slice/decodeRecord.js.map +1 -0
- package/dist/cramFile/slice/index.d.ts +20 -0
- package/dist/cramFile/slice/index.js +488 -789
- package/dist/cramFile/slice/index.js.map +1 -0
- package/dist/cramFile/util.d.ts +5 -0
- package/dist/cramFile/util.js +158 -144
- package/dist/cramFile/util.js.map +1 -0
- package/dist/errors.d.ts +23 -0
- package/dist/errors.js +66 -103
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -0
- package/dist/indexedCramFile.d.ts +39 -0
- package/dist/indexedCramFile.js +213 -315
- package/dist/indexedCramFile.js.map +1 -0
- package/dist/io/bufferCache.d.ts +12 -0
- package/dist/io/bufferCache.js +108 -128
- package/dist/io/bufferCache.js.map +1 -0
- package/dist/io/index.d.ts +5 -0
- package/dist/io/index.js +29 -27
- package/dist/io/index.js.map +1 -0
- package/dist/io/localFile.d.ts +10 -0
- package/dist/io/localFile.js +105 -162
- package/dist/io/localFile.js.map +1 -0
- package/dist/io/remoteFile.d.ts +16 -0
- package/dist/io/remoteFile.js +137 -206
- package/dist/io/remoteFile.js.map +1 -0
- package/dist/rans/constants.d.ts +3 -0
- package/dist/rans/constants.js +6 -6
- package/dist/rans/constants.js.map +1 -0
- package/dist/rans/d04.d.ts +1 -0
- package/dist/rans/d04.js +70 -99
- package/dist/rans/d04.js.map +1 -0
- package/dist/rans/d14.d.ts +1 -0
- package/dist/rans/d14.js +55 -93
- package/dist/rans/d14.js.map +1 -0
- package/dist/rans/decoding.d.ts +30 -0
- package/dist/rans/decoding.js +112 -159
- package/dist/rans/decoding.js.map +1 -0
- package/dist/rans/frequencies.d.ts +2 -0
- package/dist/rans/frequencies.js +110 -119
- package/dist/rans/frequencies.js.map +1 -0
- package/dist/rans/index.d.ts +1 -0
- package/dist/rans/index.js +111 -174
- package/dist/rans/index.js.map +1 -0
- package/dist/sam.d.ts +1 -0
- package/dist/sam.js +16 -41
- package/dist/sam.js.map +1 -0
- package/dist/unzip-pako.d.ts +2 -0
- package/dist/unzip-pako.js +9 -0
- package/dist/unzip-pako.js.map +1 -0
- package/dist/unzip.d.ts +2 -0
- package/dist/unzip.js +6 -0
- package/dist/unzip.js.map +1 -0
- package/errors.js +66 -103
- package/esm/craiIndex.d.ts +37 -0
- package/esm/craiIndex.js +158 -0
- package/esm/craiIndex.js.map +1 -0
- package/esm/cramFile/codecs/_base.d.ts +6 -0
- package/esm/cramFile/codecs/_base.js +42 -0
- package/esm/cramFile/codecs/_base.js.map +1 -0
- package/esm/cramFile/codecs/beta.d.ts +4 -0
- package/esm/cramFile/codecs/beta.js +15 -0
- package/esm/cramFile/codecs/beta.js.map +1 -0
- package/esm/cramFile/codecs/byteArrayLength.d.ts +8 -0
- package/esm/cramFile/codecs/byteArrayLength.js +35 -0
- package/esm/cramFile/codecs/byteArrayLength.js.map +1 -0
- package/esm/cramFile/codecs/byteArrayStop.d.ts +6 -0
- package/esm/cramFile/codecs/byteArrayStop.js +40 -0
- package/esm/cramFile/codecs/byteArrayStop.js.map +1 -0
- package/esm/cramFile/codecs/external.d.ts +7 -0
- package/esm/cramFile/codecs/external.js +40 -0
- package/esm/cramFile/codecs/external.js.map +1 -0
- package/esm/cramFile/codecs/gamma.d.ts +4 -0
- package/esm/cramFile/codecs/gamma.js +20 -0
- package/esm/cramFile/codecs/gamma.js.map +1 -0
- package/esm/cramFile/codecs/huffman.d.ts +17 -0
- package/esm/cramFile/codecs/huffman.js +107 -0
- package/esm/cramFile/codecs/huffman.js.map +1 -0
- package/esm/cramFile/codecs/index.d.ts +2 -0
- package/esm/cramFile/codecs/index.js +30 -0
- package/esm/cramFile/codecs/index.js.map +1 -0
- package/esm/cramFile/codecs/subexp.d.ts +4 -0
- package/esm/cramFile/codecs/subexp.js +28 -0
- package/esm/cramFile/codecs/subexp.js.map +1 -0
- package/esm/cramFile/constants.d.ts +36 -0
- package/esm/cramFile/constants.js +51 -0
- package/esm/cramFile/constants.js.map +1 -0
- package/esm/cramFile/container/compressionScheme.d.ts +23 -0
- package/esm/cramFile/container/compressionScheme.js +123 -0
- package/esm/cramFile/container/compressionScheme.js.map +1 -0
- package/esm/cramFile/container/index.d.ts +13 -0
- package/esm/cramFile/container/index.js +84 -0
- package/esm/cramFile/container/index.js.map +1 -0
- package/esm/cramFile/file.d.ts +63 -0
- package/esm/cramFile/file.js +281 -0
- package/esm/cramFile/file.js.map +1 -0
- package/esm/cramFile/index.d.ts +2 -0
- package/esm/cramFile/index.js +3 -0
- package/esm/cramFile/index.js.map +1 -0
- package/esm/cramFile/record.d.ts +79 -0
- package/esm/cramFile/record.js +297 -0
- package/esm/cramFile/record.js.map +1 -0
- package/esm/cramFile/sectionParsers.d.ts +18 -0
- package/esm/cramFile/sectionParsers.js +347 -0
- package/esm/cramFile/sectionParsers.js.map +1 -0
- package/esm/cramFile/slice/decodeRecord.d.ts +2 -0
- package/esm/cramFile/slice/decodeRecord.js +299 -0
- package/esm/cramFile/slice/decodeRecord.js.map +1 -0
- package/esm/cramFile/slice/index.d.ts +20 -0
- package/esm/cramFile/slice/index.js +364 -0
- package/esm/cramFile/slice/index.js.map +1 -0
- package/esm/cramFile/util.d.ts +5 -0
- package/esm/cramFile/util.js +161 -0
- package/esm/cramFile/util.js.map +1 -0
- package/esm/errors.d.ts +23 -0
- package/esm/errors.js +24 -0
- package/esm/errors.js.map +1 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +5 -0
- package/esm/index.js.map +1 -0
- package/esm/indexedCramFile.d.ts +39 -0
- package/esm/indexedCramFile.js +155 -0
- package/esm/indexedCramFile.js.map +1 -0
- package/esm/io/bufferCache.d.ts +12 -0
- package/esm/io/bufferCache.js +54 -0
- package/esm/io/bufferCache.js.map +1 -0
- package/esm/io/index.d.ts +5 -0
- package/esm/io/index.js +24 -0
- package/esm/io/index.js.map +1 -0
- package/esm/io/localFile.d.ts +10 -0
- package/esm/io/localFile.js +31 -0
- package/esm/io/localFile.js.map +1 -0
- package/esm/io/remoteFile.d.ts +16 -0
- package/esm/io/remoteFile.js +64 -0
- package/esm/io/remoteFile.js.map +1 -0
- package/esm/rans/constants.d.ts +3 -0
- package/esm/rans/constants.js +5 -0
- package/esm/rans/constants.js.map +1 -0
- package/esm/rans/d04.d.ts +1 -0
- package/esm/rans/d04.js +67 -0
- package/esm/rans/d04.js.map +1 -0
- package/esm/rans/d14.d.ts +1 -0
- package/esm/rans/d14.js +52 -0
- package/esm/rans/d14.js.map +1 -0
- package/esm/rans/decoding.d.ts +30 -0
- package/esm/rans/decoding.js +118 -0
- package/esm/rans/decoding.js.map +1 -0
- package/esm/rans/frequencies.d.ts +2 -0
- package/esm/rans/frequencies.js +110 -0
- package/esm/rans/frequencies.js.map +1 -0
- package/esm/rans/index.d.ts +1 -0
- package/esm/rans/index.js +195 -0
- package/esm/rans/index.js.map +1 -0
- package/esm/sam.d.ts +1 -0
- package/esm/sam.js +16 -0
- package/esm/sam.js.map +1 -0
- package/esm/unzip-pako.d.ts +2 -0
- package/esm/unzip-pako.js +5 -0
- package/esm/unzip-pako.js.map +1 -0
- package/esm/unzip.d.ts +2 -0
- package/esm/unzip.js +3 -0
- package/esm/unzip.js.map +1 -0
- package/package.json +38 -35
- package/src/craiIndex.js +180 -0
- package/src/cramFile/codecs/_base.js +49 -0
- package/src/cramFile/codecs/beta.js +23 -0
- package/src/cramFile/codecs/byteArrayLength.js +55 -0
- package/src/cramFile/codecs/byteArrayStop.js +50 -0
- package/src/cramFile/codecs/external.js +54 -0
- package/src/cramFile/codecs/gamma.js +30 -0
- package/src/cramFile/codecs/huffman.js +137 -0
- package/src/cramFile/codecs/index.js +38 -0
- package/src/cramFile/codecs/subexp.js +32 -0
- package/src/cramFile/constants.js +55 -0
- package/src/cramFile/container/compressionScheme.js +144 -0
- package/src/cramFile/container/index.js +119 -0
- package/src/cramFile/file.js +347 -0
- package/src/cramFile/index.js +3 -0
- package/src/cramFile/record.js +337 -0
- package/src/cramFile/sectionParsers.js +379 -0
- package/src/cramFile/slice/decodeRecord.js +362 -0
- package/src/cramFile/slice/index.js +497 -0
- package/src/cramFile/util.js +169 -0
- package/src/errors.js +22 -0
- package/src/index.js +5 -0
- package/src/indexedCramFile.js +191 -0
- package/src/io/bufferCache.js +66 -0
- package/src/io/index.js +26 -0
- package/src/io/localFile.js +35 -0
- package/src/io/remoteFile.js +71 -0
- package/src/rans/README.md +1 -0
- package/src/rans/constants.js +5 -0
- package/src/rans/d04.js +83 -0
- package/src/rans/d14.js +59 -0
- package/src/rans/decoding.js +141 -0
- package/src/rans/frequencies.js +121 -0
- package/src/rans/index.js +249 -0
- package/src/sam.js +15 -0
- package/src/unzip-pako.ts +5 -0
- package/src/unzip.ts +2 -0
|
@@ -1,290 +1,176 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var CramContainer =
|
|
34
|
-
/*#__PURE__*/
|
|
35
|
-
function () {
|
|
36
|
-
function CramContainer(cramFile, position) {
|
|
37
|
-
(0, _classCallCheck2.default)(this, CramContainer);
|
|
38
|
-
// cram file this container comes from
|
|
39
|
-
this.file = cramFile; // position of this container in the file
|
|
40
|
-
|
|
41
|
-
this.filePosition = position; // console.log(`container: ${this.filePosition}`)
|
|
42
|
-
} // memoize
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(0, _createClass2.default)(CramContainer, [{
|
|
46
|
-
key: "getHeader",
|
|
47
|
-
value: function getHeader() {
|
|
48
|
-
return this._readContainerHeader(this.filePosition);
|
|
49
|
-
} // memoize
|
|
50
|
-
|
|
51
|
-
}, {
|
|
52
|
-
key: "getCompressionHeaderBlock",
|
|
53
|
-
value: function () {
|
|
54
|
-
var _getCompressionHeaderBlock = (0, _asyncToGenerator2.default)(
|
|
55
|
-
/*#__PURE__*/
|
|
56
|
-
_regenerator.default.mark(function _callee() {
|
|
57
|
-
var containerHeader, sectionParsers, block, content;
|
|
58
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
59
|
-
while (1) {
|
|
60
|
-
switch (_context.prev = _context.next) {
|
|
61
|
-
case 0:
|
|
62
|
-
_context.next = 2;
|
|
63
|
-
return this.getHeader();
|
|
64
|
-
|
|
65
|
-
case 2:
|
|
66
|
-
containerHeader = _context.sent;
|
|
67
|
-
|
|
68
|
-
if (containerHeader.numRecords) {
|
|
69
|
-
_context.next = 5;
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return _context.abrupt("return", null);
|
|
74
|
-
|
|
75
|
-
case 5:
|
|
76
|
-
_context.next = 7;
|
|
77
|
-
return this.file.getSectionParsers();
|
|
78
|
-
|
|
79
|
-
case 7:
|
|
80
|
-
sectionParsers = _context.sent;
|
|
81
|
-
_context.next = 10;
|
|
82
|
-
return this.getFirstBlock();
|
|
83
|
-
|
|
84
|
-
case 10:
|
|
85
|
-
block = _context.sent;
|
|
86
|
-
|
|
87
|
-
if (!(block.contentType !== 'COMPRESSION_HEADER')) {
|
|
88
|
-
_context.next = 13;
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
throw new CramMalformedError("invalid content type ".concat(block.contentType, " in what is supposed to be the compression header block"));
|
|
93
|
-
|
|
94
|
-
case 13:
|
|
95
|
-
content = parseItem(block.content, sectionParsers.cramCompressionHeader.parser, 0, block.contentPosition);
|
|
96
|
-
block.content = content;
|
|
97
|
-
return _context.abrupt("return", block);
|
|
98
|
-
|
|
99
|
-
case 16:
|
|
100
|
-
case "end":
|
|
101
|
-
return _context.stop();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}, _callee, this);
|
|
105
|
-
}));
|
|
106
|
-
|
|
107
|
-
function getCompressionHeaderBlock() {
|
|
108
|
-
return _getCompressionHeaderBlock.apply(this, arguments);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return getCompressionHeaderBlock;
|
|
112
|
-
}()
|
|
113
|
-
}, {
|
|
114
|
-
key: "getFirstBlock",
|
|
115
|
-
value: function () {
|
|
116
|
-
var _getFirstBlock = (0, _asyncToGenerator2.default)(
|
|
117
|
-
/*#__PURE__*/
|
|
118
|
-
_regenerator.default.mark(function _callee2() {
|
|
119
|
-
var containerHeader;
|
|
120
|
-
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
121
|
-
while (1) {
|
|
122
|
-
switch (_context2.prev = _context2.next) {
|
|
123
|
-
case 0:
|
|
124
|
-
_context2.next = 2;
|
|
125
|
-
return this.getHeader();
|
|
126
|
-
|
|
127
|
-
case 2:
|
|
128
|
-
containerHeader = _context2.sent;
|
|
129
|
-
return _context2.abrupt("return", this.file.readBlock(containerHeader._endPosition));
|
|
130
|
-
|
|
131
|
-
case 4:
|
|
132
|
-
case "end":
|
|
133
|
-
return _context2.stop();
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
134
32
|
}
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
var errors_1 = require("../../errors");
|
|
43
|
+
var util_1 = require("../util");
|
|
44
|
+
var slice_1 = __importDefault(require("../slice"));
|
|
45
|
+
var compressionScheme_1 = __importDefault(require("./compressionScheme"));
|
|
46
|
+
var CramContainer = /** @class */ (function () {
|
|
47
|
+
function CramContainer(cramFile, position) {
|
|
48
|
+
// cram file this container comes from
|
|
49
|
+
this.file = cramFile;
|
|
50
|
+
// position of this container in the file
|
|
51
|
+
this.filePosition = position;
|
|
52
|
+
// console.log(`container: ${this.filePosition}`)
|
|
53
|
+
}
|
|
145
54
|
// memoize
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
55
|
+
CramContainer.prototype.getHeader = function () {
|
|
56
|
+
return this._readContainerHeader(this.filePosition);
|
|
57
|
+
};
|
|
58
|
+
// memoize
|
|
59
|
+
CramContainer.prototype.getCompressionHeaderBlock = function () {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
+
var containerHeader, sectionParsers, block, content;
|
|
62
|
+
return __generator(this, function (_a) {
|
|
63
|
+
switch (_a.label) {
|
|
64
|
+
case 0: return [4 /*yield*/, this.getHeader()
|
|
65
|
+
// if there are no records in the container, there will be no compression header
|
|
66
|
+
];
|
|
67
|
+
case 1:
|
|
68
|
+
containerHeader = _a.sent();
|
|
69
|
+
// if there are no records in the container, there will be no compression header
|
|
70
|
+
if (!containerHeader.numRecords) {
|
|
71
|
+
return [2 /*return*/, null];
|
|
72
|
+
}
|
|
73
|
+
return [4 /*yield*/, this.file.getSectionParsers()];
|
|
74
|
+
case 2:
|
|
75
|
+
sectionParsers = _a.sent();
|
|
76
|
+
return [4 /*yield*/, this.getFirstBlock()];
|
|
77
|
+
case 3:
|
|
78
|
+
block = _a.sent();
|
|
79
|
+
if (block.contentType !== 'COMPRESSION_HEADER') {
|
|
80
|
+
throw new errors_1.CramMalformedError("invalid content type ".concat(block.contentType, " in what is supposed to be the compression header block"));
|
|
81
|
+
}
|
|
82
|
+
content = (0, util_1.parseItem)(block.content, sectionParsers.cramCompressionHeader.parser, 0, block.contentPosition);
|
|
83
|
+
block.content = content;
|
|
84
|
+
return [2 /*return*/, block];
|
|
167
85
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}));
|
|
181
|
-
|
|
182
|
-
function getCompressionScheme() {
|
|
183
|
-
return _getCompressionScheme.apply(this, arguments);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return getCompressionScheme;
|
|
187
|
-
}()
|
|
188
|
-
}, {
|
|
189
|
-
key: "getSlice",
|
|
190
|
-
value: function getSlice(slicePosition, sliceSize) {
|
|
191
|
-
// note: slicePosition is relative to the end of the container header
|
|
192
|
-
// TODO: perhaps we should cache slices?
|
|
193
|
-
return new CramSlice(this, slicePosition, sliceSize);
|
|
194
|
-
}
|
|
195
|
-
}, {
|
|
196
|
-
key: "_readContainerHeader",
|
|
197
|
-
value: function () {
|
|
198
|
-
var _readContainerHeader2 = (0, _asyncToGenerator2.default)(
|
|
199
|
-
/*#__PURE__*/
|
|
200
|
-
_regenerator.default.mark(function _callee4(position) {
|
|
201
|
-
var sectionParsers, cramContainerHeader1, cramContainerHeader2, _ref, fileSize, bytes1, header1, numLandmarksSize, _context4, _context5, bytes2, header2, completeHeader;
|
|
202
|
-
|
|
203
|
-
return _regenerator.default.wrap(function _callee4$(_context6) {
|
|
204
|
-
while (1) {
|
|
205
|
-
switch (_context6.prev = _context6.next) {
|
|
206
|
-
case 0:
|
|
207
|
-
_context6.next = 2;
|
|
208
|
-
return this.file.getSectionParsers();
|
|
209
|
-
|
|
210
|
-
case 2:
|
|
211
|
-
sectionParsers = _context6.sent;
|
|
212
|
-
cramContainerHeader1 = sectionParsers.cramContainerHeader1, cramContainerHeader2 = sectionParsers.cramContainerHeader2;
|
|
213
|
-
_context6.next = 6;
|
|
214
|
-
return this.file.stat();
|
|
215
|
-
|
|
216
|
-
case 6:
|
|
217
|
-
_ref = _context6.sent;
|
|
218
|
-
fileSize = _ref.size;
|
|
219
|
-
|
|
220
|
-
if (!(position >= fileSize)) {
|
|
221
|
-
_context6.next = 10;
|
|
222
|
-
break;
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
CramContainer.prototype.getFirstBlock = function () {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
+
var containerHeader;
|
|
92
|
+
return __generator(this, function (_a) {
|
|
93
|
+
switch (_a.label) {
|
|
94
|
+
case 0: return [4 /*yield*/, this.getHeader()];
|
|
95
|
+
case 1:
|
|
96
|
+
containerHeader = _a.sent();
|
|
97
|
+
return [2 /*return*/, this.file.readBlock(containerHeader._endPosition)];
|
|
223
98
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
// parses the compression header data into a CramContainerCompressionScheme object
|
|
103
|
+
// memoize
|
|
104
|
+
CramContainer.prototype.getCompressionScheme = function () {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
+
var header;
|
|
107
|
+
return __generator(this, function (_a) {
|
|
108
|
+
switch (_a.label) {
|
|
109
|
+
case 0: return [4 /*yield*/, this.getCompressionHeaderBlock()];
|
|
110
|
+
case 1:
|
|
111
|
+
header = _a.sent();
|
|
112
|
+
if (!header) {
|
|
113
|
+
return [2 /*return*/, undefined];
|
|
114
|
+
}
|
|
115
|
+
return [2 /*return*/, new compressionScheme_1.default(header.content)];
|
|
241
116
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
CramContainer.prototype.getSlice = function (slicePosition, sliceSize) {
|
|
121
|
+
// note: slicePosition is relative to the end of the container header
|
|
122
|
+
// TODO: perhaps we should cache slices?
|
|
123
|
+
return new slice_1.default(this, slicePosition, sliceSize);
|
|
124
|
+
};
|
|
125
|
+
CramContainer.prototype._readContainerHeader = function (position) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
127
|
+
var sectionParsers, cramContainerHeader1, cramContainerHeader2, fileSize, bytes1, header1, numLandmarksSize, bytes2, header2, completeHeader;
|
|
128
|
+
return __generator(this, function (_a) {
|
|
129
|
+
switch (_a.label) {
|
|
130
|
+
case 0: return [4 /*yield*/, this.file.getSectionParsers()];
|
|
131
|
+
case 1:
|
|
132
|
+
sectionParsers = _a.sent();
|
|
133
|
+
cramContainerHeader1 = sectionParsers.cramContainerHeader1, cramContainerHeader2 = sectionParsers.cramContainerHeader2;
|
|
134
|
+
return [4 /*yield*/, this.file.stat()];
|
|
135
|
+
case 2:
|
|
136
|
+
fileSize = (_a.sent()).size;
|
|
137
|
+
if (position >= fileSize) {
|
|
138
|
+
return [2 /*return*/, undefined];
|
|
139
|
+
}
|
|
140
|
+
bytes1 = Buffer.allocUnsafe(cramContainerHeader1.maxLength);
|
|
141
|
+
return [4 /*yield*/, this.file.read(bytes1, 0, cramContainerHeader1.maxLength, position)];
|
|
142
|
+
case 3:
|
|
143
|
+
_a.sent();
|
|
144
|
+
header1 = (0, util_1.parseItem)(bytes1, cramContainerHeader1.parser);
|
|
145
|
+
numLandmarksSize = (0, util_1.itf8Size)(header1.numLandmarks);
|
|
146
|
+
if (position + header1.length >= fileSize) {
|
|
147
|
+
console.warn("".concat(this.file, ": container header at ").concat(position, " indicates that the container has length ").concat(header1.length, ", which extends beyond the length of the file. Skipping this container."));
|
|
148
|
+
return [2 /*return*/, undefined];
|
|
149
|
+
}
|
|
150
|
+
bytes2 = Buffer.allocUnsafe(cramContainerHeader2.maxLength(header1.numLandmarks));
|
|
151
|
+
return [4 /*yield*/, this.file.read(bytes2, 0, cramContainerHeader2.maxLength(header1.numLandmarks), position + header1._size - numLandmarksSize)];
|
|
152
|
+
case 4:
|
|
153
|
+
_a.sent();
|
|
154
|
+
header2 = (0, util_1.parseItem)(bytes2, cramContainerHeader2.parser);
|
|
155
|
+
if (!(this.file.validateChecksums && header2.crc32 !== undefined)) return [3 /*break*/, 6];
|
|
156
|
+
return [4 /*yield*/, this.file.checkCrc32(position, header1._size + header2._size - numLandmarksSize - 4, header2.crc32, "container header beginning at position ".concat(position))];
|
|
157
|
+
case 5:
|
|
158
|
+
_a.sent();
|
|
159
|
+
_a.label = 6;
|
|
160
|
+
case 6:
|
|
161
|
+
completeHeader = Object.assign(header1, header2, {
|
|
162
|
+
_size: header1._size + header2._size - numLandmarksSize,
|
|
163
|
+
_endPosition: header1._size + header2._size - numLandmarksSize + position,
|
|
164
|
+
});
|
|
165
|
+
return [2 /*return*/, completeHeader];
|
|
257
166
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
case 27:
|
|
270
|
-
case "end":
|
|
271
|
-
return _context6.stop();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}, _callee4, this);
|
|
275
|
-
}));
|
|
276
|
-
|
|
277
|
-
function _readContainerHeader(_x) {
|
|
278
|
-
return _readContainerHeader2.apply(this, arguments);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
return _readContainerHeader;
|
|
282
|
-
}()
|
|
283
|
-
}]);
|
|
284
|
-
return CramContainer;
|
|
285
|
-
}();
|
|
286
|
-
|
|
287
|
-
(0, _forEach.default)(_context7 = 'getHeader getCompressionHeaderBlock getCompressionScheme'.split(' ')).call(_context7, function (method) {
|
|
288
|
-
return tinyMemoize(CramContainer, method);
|
|
289
|
-
});
|
|
290
|
-
module.exports = CramContainer;
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
return CramContainer;
|
|
171
|
+
}());
|
|
172
|
+
exports.default = CramContainer;
|
|
173
|
+
'getHeader getCompressionHeaderBlock getCompressionScheme'
|
|
174
|
+
.split(' ')
|
|
175
|
+
.forEach(function (method) { return (0, util_1.tinyMemoize)(CramContainer, method); });
|
|
176
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cramFile/container/index.js"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export default class CramFile {
|
|
2
|
+
/**
|
|
3
|
+
* @param {object} args
|
|
4
|
+
* @param {object} [args.filehandle] - a filehandle that implements the stat() and
|
|
5
|
+
* read() methods of the Node filehandle API https://nodejs.org/api/fs.html#fs_class_filehandle
|
|
6
|
+
* @param {object} [args.path] - path to the cram file
|
|
7
|
+
* @param {object} [args.url] - url for the cram file. also supports file:// urls for local files
|
|
8
|
+
* @param {function} [args.seqFetch] - a function with signature
|
|
9
|
+
* `(seqId, startCoordinate, endCoordinate)` that returns a promise for a string of sequence bases
|
|
10
|
+
* @param {number} [args.cacheSize] optional maximum number of CRAM records to cache. default 20,000
|
|
11
|
+
* @param {boolean} [args.checkSequenceMD5] - default true. if false, disables verifying the MD5
|
|
12
|
+
* checksum of the reference sequence underlying a slice. In some applications, this check can cause an inconvenient amount (many megabases) of sequences to be fetched.
|
|
13
|
+
*/
|
|
14
|
+
constructor(args: {
|
|
15
|
+
filehandle?: object | undefined;
|
|
16
|
+
path?: object | undefined;
|
|
17
|
+
url?: object | undefined;
|
|
18
|
+
seqFetch?: Function | undefined;
|
|
19
|
+
cacheSize?: number | undefined;
|
|
20
|
+
checkSequenceMD5?: boolean | undefined;
|
|
21
|
+
});
|
|
22
|
+
file: any;
|
|
23
|
+
validateChecksums: boolean;
|
|
24
|
+
fetchReferenceSequenceCallback: Function | undefined;
|
|
25
|
+
options: {
|
|
26
|
+
checkSequenceMD5: boolean;
|
|
27
|
+
cacheSize: number;
|
|
28
|
+
};
|
|
29
|
+
featureCache: any;
|
|
30
|
+
toString(): any;
|
|
31
|
+
read(buffer: any, offset: any, length: any, position: any): any;
|
|
32
|
+
stat(): any;
|
|
33
|
+
getDefinition(): Promise<any>;
|
|
34
|
+
getSamHeader(): Promise<any[]>;
|
|
35
|
+
header: any;
|
|
36
|
+
getHeaderText(): Promise<any>;
|
|
37
|
+
getSectionParsers(): Promise<{
|
|
38
|
+
cramFileDefinition: {
|
|
39
|
+
parser: any;
|
|
40
|
+
maxLength: number;
|
|
41
|
+
};
|
|
42
|
+
cramBlockHeader: {
|
|
43
|
+
parser: any;
|
|
44
|
+
maxLength: number;
|
|
45
|
+
};
|
|
46
|
+
cramBlockCrc32: {
|
|
47
|
+
parser: any;
|
|
48
|
+
maxLength: number;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
getContainerById(containerNumber: any): Promise<CramContainer | undefined>;
|
|
52
|
+
checkCrc32(position: any, length: any, recordedCrc32: any, description: any): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* @returns {Promise[number]} the number of containers in the file
|
|
55
|
+
*/
|
|
56
|
+
containerCount(): any;
|
|
57
|
+
getContainerAtPosition(position: any): CramContainer;
|
|
58
|
+
readBlockHeader(position: any): Promise<any>;
|
|
59
|
+
_parseSection(section: any, position: any, size: any, preReadBuffer: any): Promise<any>;
|
|
60
|
+
_uncompress(compressionMethod: any, inputBuffer: any, outputBuffer: any): void;
|
|
61
|
+
readBlock(position: any): Promise<any>;
|
|
62
|
+
}
|
|
63
|
+
import CramContainer from "./container";
|