Skip to content

Commit

Permalink
Fix parsing of arrays of values
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 26, 2018
1 parent 658979f commit 7ece42f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/JBrowse/Store/SeqFeature/BEDTabix.js
Expand Up @@ -65,14 +65,13 @@ return declare( [ SeqFeatureStore, DeferredStatsMixin, DeferredFeaturesMixin, In
csiFilehandle: csiBlob && new BlobFilehandleWrapper(csiBlob),
chunkSizeLimit: args.chunkSizeLimit || 1000000,
renameRefSeqs: n => this.browser.regularizeReferenceName(n)
})
});

this.parser = new Parser({
commentCallback: (this.config.commentCallback || function(i) { }),
store: this
})
});

console.log(args.autoSql)
this.autoSql = Util.parseAutoSql(args.autoSql) || Util.defaultAutoSql

this.getHeader()
Expand Down
8 changes: 5 additions & 3 deletions src/JBrowse/Util.js
Expand Up @@ -689,6 +689,8 @@ Util = {
]
},



parseAutoSql(string) {
return string && parser.parse(string)
},
Expand Down Expand Up @@ -719,9 +721,9 @@ Util = {
if (!autoField._requestWorkerCache) {
const match = /^(\w+)\[/.exec(autoField.type)
autoField._requestWorkerCache = {
isNumeric: numericTypes.includes(autoField.type),
isArray: !!match,
arrayIsNumeric: match && numericTypes.includes(match[1])
isNumeric: !autoField.size && numericTypes.includes(autoField.type),
isArray: autoField.size,
arrayIsNumeric: autoField.size && numericTypes.includes(autoField.type)
}
}
if (autoField._requestWorkerCache.isNumeric) {
Expand Down

0 comments on commit 7ece42f

Please sign in to comment.