@gmod/bam 1.1.6 → 1.1.10
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 +30 -2
- package/README.md +3 -3
- package/dist/bai.d.ts +2 -0
- package/dist/bai.js +300 -548
- package/dist/bai.js.map +1 -0
- package/dist/bamFile.d.ts +6 -13
- package/dist/bamFile.js +670 -1197
- package/dist/bamFile.js.map +1 -0
- package/dist/chunk.js +34 -69
- package/dist/chunk.js.map +1 -0
- package/dist/constants.js +27 -35
- package/dist/constants.js.map +1 -0
- package/dist/csi.js +317 -515
- package/dist/csi.js.map +1 -0
- package/dist/errors.js +64 -120
- package/dist/errors.js.map +1 -0
- package/dist/htsget.js +275 -396
- package/dist/htsget.js.map +1 -0
- package/dist/index.js +16 -54
- package/dist/index.js.map +1 -0
- package/dist/indexFile.d.ts +1 -2
- package/dist/indexFile.js +77 -163
- package/dist/indexFile.js.map +1 -0
- package/dist/record.d.ts +2 -2
- package/dist/record.js +496 -707
- package/dist/record.js.map +1 -0
- package/dist/sam.js +16 -49
- package/dist/sam.js.map +1 -0
- package/dist/util.d.ts +0 -1
- package/dist/util.js +115 -126
- package/dist/util.js.map +1 -0
- package/dist/virtualOffset.js +44 -77
- package/dist/virtualOffset.js.map +1 -0
- package/esm/bai.d.ts +26 -0
- package/esm/bai.js +191 -0
- package/esm/bai.js.map +1 -0
- package/esm/bamFile.d.ts +77 -0
- package/esm/bamFile.js +383 -0
- package/esm/bamFile.js.map +1 -0
- package/esm/chunk.d.ts +18 -0
- package/esm/chunk.js +33 -0
- package/esm/chunk.js.map +1 -0
- package/esm/constants.d.ts +15 -0
- package/esm/constants.js +27 -0
- package/esm/constants.js.map +1 -0
- package/esm/csi.d.ts +35 -0
- package/esm/csi.js +209 -0
- package/esm/csi.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/htsget.d.ts +33 -0
- package/esm/htsget.js +100 -0
- package/esm/htsget.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +7 -0
- package/esm/index.js.map +1 -0
- package/esm/indexFile.d.ts +27 -0
- package/esm/indexFile.js +27 -0
- package/esm/indexFile.js.map +1 -0
- package/esm/record.d.ts +88 -0
- package/esm/record.js +534 -0
- package/esm/record.js.map +1 -0
- package/esm/sam.d.ts +7 -0
- package/esm/sam.js +16 -0
- package/esm/sam.js.map +1 -0
- package/esm/util.d.ts +35 -0
- package/esm/util.js +92 -0
- package/esm/util.js.map +1 -0
- package/esm/virtualOffset.d.ts +10 -0
- package/esm/virtualOffset.js +37 -0
- package/esm/virtualOffset.js.map +1 -0
- package/package.json +21 -30
- package/dist/declare.d.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
1
|
-
<a name="1.1.
|
|
2
|
-
## [1.1.
|
|
1
|
+
<a name="1.1.10"></a>
|
|
2
|
+
## [1.1.10](https://github.com/GMOD/bam-js/compare/v1.1.9...v1.1.10) (2022-01-18)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
- Make _refID and flags public fields
|
|
7
|
+
- Small internal changes to the handling of opts
|
|
8
|
+
|
|
9
|
+
<a name="1.1.9"></a>
|
|
10
|
+
## [1.1.9](https://github.com/GMOD/bam-js/compare/v1.1.8...v1.1.9) (2021-12-14)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- Add ESM module export in package.json (smaller bundle size for consumers)
|
|
15
|
+
- Cache BAI readFile result for compatibility with node.js native filehandles (which otherwise fail if re-reading the filehandle twice)
|
|
3
16
|
|
|
17
|
+
<a name="1.1.8"></a>
|
|
18
|
+
## [1.1.8](https://github.com/GMOD/bam-js/compare/v1.1.7...v1.1.8) (2021-05-21)
|
|
4
19
|
|
|
5
20
|
|
|
21
|
+
|
|
22
|
+
- Fix types for yieldThreadTime
|
|
23
|
+
|
|
24
|
+
<a name="1.1.7"></a>
|
|
25
|
+
|
|
26
|
+
## [1.1.7](https://github.com/GMOD/bam-js/compare/v1.1.6...v1.1.7) (2021-05-21)
|
|
27
|
+
|
|
28
|
+
- New param yieldThreadTime to constructor to yield while processing
|
|
29
|
+
|
|
30
|
+
<a name="1.1.6"></a>
|
|
31
|
+
|
|
32
|
+
## [1.1.6](https://github.com/GMOD/bam-js/compare/v1.1.5...v1.1.6) (2021-02-20)
|
|
33
|
+
|
|
6
34
|
- Add qualRaw function on records for getting raw qual score array instead of string
|
|
7
35
|
|
|
8
36
|
<a name="1.1.5"></a>
|
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
[](https://github.com/diegohaz/nod)
|
|
2
1
|
[](https://npmjs.org/package/@gmod/bam)
|
|
3
|
-
[](https://travis-ci.org/GMOD/bam-js)
|
|
4
2
|
[](https://codecov.io/gh/GMOD/bam-js/branch/master)
|
|
3
|
+
[](https://github.com/GMOD/bam-js/actions?query=branch%3Amaster+workflow%3APush+)
|
|
5
4
|
|
|
6
5
|
## Install
|
|
7
6
|
|
|
@@ -47,12 +46,13 @@ const records = await ti.getRecordsForRange(1, 2000000, 2000001)
|
|
|
47
46
|
|
|
48
47
|
The BAM class constructor accepts arguments
|
|
49
48
|
|
|
50
|
-
- bamPath/
|
|
49
|
+
- bamPath/bamUrl/bamFilehandle - a string file path to a local file or a class object with a read method
|
|
51
50
|
- csiPath/csiUrl/csiFilehandle - a CSI index for the BAM file, required for long chromosomes greater than 2^29 in length
|
|
52
51
|
- baiPath/baiUrl/baiFilehandle - a BAI index for the BAM file
|
|
53
52
|
- fetchSizeLimit - total size of the number of chunks being fetched at once. default: ~50MB
|
|
54
53
|
- chunkSizeLimit - size limit on any individual chunk. default: ~10MB
|
|
55
54
|
- cacheSize - limit on number of chunks to cache. default: 50
|
|
55
|
+
- yieldThreadTime - the interval at which the code yields to the main thread when it is parsing a lot of data. default: 100ms. Set to 0 to performed no yielding
|
|
56
56
|
|
|
57
57
|
Note: filehandles implement the Filehandle interface from https://www.npmjs.com/package/generic-filehandle. This module offers the path and url arguments as convenience methods for supplying the LocalFile and RemoteFile
|
|
58
58
|
|
package/dist/bai.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ import Chunk from './chunk';
|
|
|
3
3
|
import IndexFile from './indexFile';
|
|
4
4
|
import { BaseOpts } from './util';
|
|
5
5
|
export default class BAI extends IndexFile {
|
|
6
|
+
baiP?: Promise<Buffer>;
|
|
6
7
|
parsePseudoBin(bytes: Buffer, offset: number): {
|
|
7
8
|
lineCount: number;
|
|
8
9
|
};
|
|
9
10
|
lineCount(refId: number, opts?: BaseOpts): Promise<any>;
|
|
11
|
+
fetchBai(opts?: BaseOpts): Promise<Buffer>;
|
|
10
12
|
_parse(opts?: BaseOpts): Promise<{
|
|
11
13
|
[key: string]: any;
|
|
12
14
|
}>;
|