@gmod/bam 1.1.7 → 1.1.11

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/README.md +2 -3
  3. package/dist/bai.d.ts +2 -0
  4. package/dist/bai.js +300 -548
  5. package/dist/bai.js.map +1 -0
  6. package/dist/bamFile.d.ts +5 -7
  7. package/dist/bamFile.js +670 -1203
  8. package/dist/bamFile.js.map +1 -0
  9. package/dist/chunk.js +34 -69
  10. package/dist/chunk.js.map +1 -0
  11. package/dist/constants.js +27 -35
  12. package/dist/constants.js.map +1 -0
  13. package/dist/csi.js +317 -515
  14. package/dist/csi.js.map +1 -0
  15. package/dist/errors.js +64 -120
  16. package/dist/errors.js.map +1 -0
  17. package/dist/htsget.js +275 -396
  18. package/dist/htsget.js.map +1 -0
  19. package/dist/index.js +16 -54
  20. package/dist/index.js.map +1 -0
  21. package/dist/indexFile.d.ts +2 -2
  22. package/dist/indexFile.js +83 -162
  23. package/dist/indexFile.js.map +1 -0
  24. package/dist/record.d.ts +2 -2
  25. package/dist/record.js +496 -707
  26. package/dist/record.js.map +1 -0
  27. package/dist/sam.js +16 -49
  28. package/dist/sam.js.map +1 -0
  29. package/dist/util.d.ts +0 -1
  30. package/dist/util.js +115 -126
  31. package/dist/util.js.map +1 -0
  32. package/dist/virtualOffset.js +44 -77
  33. package/dist/virtualOffset.js.map +1 -0
  34. package/esm/bai.d.ts +26 -0
  35. package/esm/bai.js +191 -0
  36. package/esm/bai.js.map +1 -0
  37. package/esm/bamFile.d.ts +77 -0
  38. package/esm/bamFile.js +383 -0
  39. package/esm/bamFile.js.map +1 -0
  40. package/esm/chunk.d.ts +18 -0
  41. package/esm/chunk.js +33 -0
  42. package/esm/chunk.js.map +1 -0
  43. package/esm/constants.d.ts +15 -0
  44. package/esm/constants.js +27 -0
  45. package/esm/constants.js.map +1 -0
  46. package/esm/csi.d.ts +35 -0
  47. package/esm/csi.js +209 -0
  48. package/esm/csi.js.map +1 -0
  49. package/esm/errors.d.ts +23 -0
  50. package/esm/errors.js +24 -0
  51. package/esm/errors.js.map +1 -0
  52. package/esm/htsget.d.ts +33 -0
  53. package/esm/htsget.js +100 -0
  54. package/esm/htsget.js.map +1 -0
  55. package/esm/index.d.ts +6 -0
  56. package/esm/index.js +7 -0
  57. package/esm/index.js.map +1 -0
  58. package/esm/indexFile.d.ts +28 -0
  59. package/esm/indexFile.js +33 -0
  60. package/esm/indexFile.js.map +1 -0
  61. package/esm/record.d.ts +88 -0
  62. package/esm/record.js +534 -0
  63. package/esm/record.js.map +1 -0
  64. package/esm/sam.d.ts +7 -0
  65. package/esm/sam.js +16 -0
  66. package/esm/sam.js.map +1 -0
  67. package/esm/util.d.ts +35 -0
  68. package/esm/util.js +92 -0
  69. package/esm/util.js.map +1 -0
  70. package/esm/virtualOffset.d.ts +10 -0
  71. package/esm/virtualOffset.js +37 -0
  72. package/esm/virtualOffset.js.map +1 -0
  73. package/package.json +20 -29
  74. package/dist/declare.d.js +0 -2
package/CHANGELOG.md CHANGED
@@ -1,8 +1,37 @@
1
- <a name="1.1.7"></a>
2
- ## [1.1.7](https://github.com/GMOD/bam-js/compare/v1.1.6...v1.1.7) (2021-05-21)
1
+ <a name="1.1.11"></a>
2
+ ## [1.1.11](https://github.com/GMOD/bam-js/compare/v1.1.10...v1.1.11) (2022-01-26)
3
+
4
+
5
+
6
+ - Cache setup of index file parsing
7
+
8
+ <a name="1.1.10"></a>
9
+ ## [1.1.10](https://github.com/GMOD/bam-js/compare/v1.1.9...v1.1.10) (2022-01-18)
10
+
11
+
12
+
13
+ - Make _refID and flags public fields
14
+ - Small internal changes to the handling of opts
15
+
16
+ <a name="1.1.9"></a>
17
+ ## [1.1.9](https://github.com/GMOD/bam-js/compare/v1.1.8...v1.1.9) (2021-12-14)
3
18
 
4
19
 
5
20
 
21
+ - Add ESM module export in package.json (smaller bundle size for consumers)
22
+ - Cache BAI readFile result for compatibility with node.js native filehandles (which otherwise fail if re-reading the filehandle twice)
23
+
24
+ <a name="1.1.8"></a>
25
+ ## [1.1.8](https://github.com/GMOD/bam-js/compare/v1.1.7...v1.1.8) (2021-05-21)
26
+
27
+
28
+
29
+ - Fix types for yieldThreadTime
30
+
31
+ <a name="1.1.7"></a>
32
+
33
+ ## [1.1.7](https://github.com/GMOD/bam-js/compare/v1.1.6...v1.1.7) (2021-05-21)
34
+
6
35
  - New param yieldThreadTime to constructor to yield while processing
7
36
 
8
37
  <a name="1.1.6"></a>
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
- [![Generated with nod](https://img.shields.io/badge/generator-nod-2196F3.svg?style=flat-square)](https://github.com/diegohaz/nod)
2
1
  [![NPM version](https://img.shields.io/npm/v/@gmod/bam.svg?style=flat-square)](https://npmjs.org/package/@gmod/bam)
3
- [![Build Status](https://img.shields.io/travis/GMOD/bam-js/master.svg?style=flat-square)](https://travis-ci.org/GMOD/bam-js)
4
2
  [![Coverage Status](https://img.shields.io/codecov/c/github/GMOD/bam-js/master.svg?style=flat-square)](https://codecov.io/gh/GMOD/bam-js/branch/master)
3
+ [![Build Status](https://img.shields.io/github/workflow/status/GMOD/bam-js/Push/master?logo=github&style=flat-query)](https://github.com/GMOD/bam-js/actions?query=branch%3Amaster+workflow%3APush+)
5
4
 
6
5
  ## Install
7
6
 
@@ -47,7 +46,7 @@ const records = await ti.getRecordsForRange(1, 2000000, 2000001)
47
46
 
48
47
  The BAM class constructor accepts arguments
49
48
 
50
- - bamPath/baiUrl/bamFilehandle - a string file path to a local file or a class object with a read method
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
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
  }>;