Comparing version
{ | ||
"name": "hic-straw", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Utilities for reading .files (contact matrix files)", | ||
@@ -24,2 +24,3 @@ "main": "src/index.js", | ||
"mocha": "^5.2.0", | ||
"nyc": "^13.3.0", | ||
"webpack": "^4.28.4", | ||
@@ -26,0 +27,0 @@ "webpack-cli": "^3.2.3" |
@@ -6,2 +6,3 @@ const zlib = require('zlib') | ||
const RemoteFile = require("./io/remoteFile") | ||
const BufferedFile = require("./io/bufferedFile") | ||
const BinaryParser = require("./binary") | ||
@@ -501,3 +502,3 @@ const Matrix = require("./matrix") | ||
const range = {start: parseInt(nviArray[0]), size: parseInt(nviArray[1])}; | ||
await this.readNormVectorIndex(range) | ||
return this.readNormVectorIndex(range) | ||
} | ||
@@ -585,2 +586,3 @@ else { | ||
// Recursively process entries | ||
await processEntries.call(this, nEntries, data) | ||
@@ -623,5 +625,5 @@ | ||
const file = this.file | ||
const file = new BufferedFile({file: this.file, size: 256000}) | ||
const range = {start: start, size: 4}; | ||
const data = await this.file.read(range.start, range.size) | ||
const data = await file.read(range.start, range.size) | ||
const binaryParser = new BinaryParser(new DataView(data)); | ||
@@ -628,0 +630,0 @@ const nEntries = binaryParser.getInt(); // Total # of expected value chunks |
@@ -19,3 +19,3 @@ const fetch = require('cross-fetch') | ||
let url = this.url | ||
let url = this.url.slice() // slice => copy | ||
if(jsEnv.isNode) { | ||
@@ -22,0 +22,0 @@ headers['User-Agent'] = 'straw' |
Sorry, the diff of this file is too big to display
205371
2.18%16
6.67%1573
5.5%12
9.09%