Skip to content

Commit

Permalink
Fix example page bug where data is not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
bovee committed Oct 18, 2024
1 parent 4f0e715 commit 5f15f31
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions entab-js/example/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,21 +562,21 @@ async function calculateBounds(reader) {
const columns = [];
let nPoints = 0;
for (const column of reader.headers) {
const value = datum[column];
const value = datum.get(column);
// TODO: handle dates, booleans?
if (typeof value === "string") {
bounds[`length(${column})`] = [v => v[column].length, value.length, value.length];
bounds[`length(${column})`] = [v => v.get(column).length, value.length, value.length];
columns.push(`length(${column})`);
if (column === "sequence") {
bounds[`gc(${column})`] = [v => FUNCTIONS.gc(v[column]), FUNCTIONS.gc(value), FUNCTIONS.gc(value)];
bounds[`gc(${column})`] = [v => FUNCTIONS.gc(v.get(column)), FUNCTIONS.gc(value), FUNCTIONS.gc(value)];
columns.push(`gc(${column})`);
} else if (column === "quality") {
bounds[`average(quality)`] = [v => FUNCTIONS.avgQual(v[column]), FUNCTIONS.avgQual(value), FUNCTIONS.avgQual(value)];
bounds[`average(quality)`] = [v => FUNCTIONS.avgQual(v.get(column)), FUNCTIONS.avgQual(value), FUNCTIONS.avgQual(value)];
columns.push(`average(quality)`);
}
} else {
// it's a number
bounds[column] = [v => v[column], value, value];
bounds[column] = [v => v.get(column), value, value];
columns.push(column);
}
}
Expand Down

0 comments on commit 5f15f31

Please sign in to comment.