Skip to content

Commit

Permalink
fix(editor): use correct field names in circos example (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
sehilyi authored Jul 18, 2022
1 parent a81be97 commit 29bb840
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions editor/example/json-spec/circos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const EX_SPEC_CIRCOS: GoslingSpec = {
x: { field: 'p1', type: 'genomic' },
xe: { field: 'p1_2', type: 'genomic' },
x1: { field: 'p2', type: 'genomic' },
x1e: { field: 'P2_2', type: 'genomic' },
x1e: { field: 'p2_2', type: 'genomic' },
stroke: { value: 'lightgray' },
strokeWidth: { value: 1 }
},
Expand All @@ -137,7 +137,7 @@ export const EX_SPEC_CIRCOS: GoslingSpec = {
x: { field: 'p1', type: 'genomic' },
xe: { field: 'p1_2', type: 'genomic' },
x1: { field: 'p2', type: 'genomic' },
x1e: { field: 'P2_2', type: 'genomic' },
x1e: { field: 'p2_2', type: 'genomic' },
stroke: {
field: 'chr_2',
type: 'nominal',
Expand Down
4 changes: 2 additions & 2 deletions src/data-fetchers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export function filterUsingGenoPos(
return minX < value && value <= maxX;
} else {
// filter based on two genomic positions, i.e., check overlaps
const values = definedXFields.map(f => +d[f]);
const maxValue = Math.max(...values);
const values = definedXFields.map(f => +d[f]).filter(v => +v);
const minValue = Math.min(...values);
const maxValue = Math.max(...values);
return minX <= maxValue && minValue <= maxX;
}
});
Expand Down

0 comments on commit 29bb840

Please sign in to comment.