Skip to content

Commit

Permalink
Adjust default coalescing params based on HLA-DRB1 stress test
Browse files Browse the repository at this point in the history
  • Loading branch information
abought committed Oct 14, 2020
1 parent 34e0c6f commit 6a90b58
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions esm/components/data_layer/scatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const default_layout = {
max_points: 800, // Many plots are 800-2400 px wide, so, more than 1 datum per pixel of average region width
// Define the "region of interest", like "bottom half of plot"; any points outside this region are taken as is
// Values are expressed in terms of data value and will be converted to pixels internally.
x_min: '-Infinity',
x_min: '-Infinity', // JSON doesn't handle some valid JS numbers. Kids, don't get a career in computers.
x_max: 'Infinity',
y_min: 0,
y_max: 2.0,
// Expressed in units of px apart. For circular points, point area 40 = radius ~3.5.
x_gap: 4,
y_gap: 4,
y_max: 3.0,
// Expressed in units of px apart. For circles, area 40 = radius ~3.5; aim for ~1 diameter distance.
x_gap: 7,
y_gap: 7,
},
fill_opacity: 1,
y_axis: {
Expand Down
4 changes: 4 additions & 0 deletions esm/helpers/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
/**
* A very simple function aimed at scatter plots: attempts to coalesce "low-significance" SNPs that are too close to
* visually distinguish, thus creating a dataset with fewer points that can be rendered more quickly.
*
* This depends on the strong and explicit assumption that points are ordered (typically in x position), so that
* nearby points can be grouped by iterating over the data in sequence.
*
* @param {Object[]} data Plot data, annotated with calculated `xc` and `yc` symbols for x and y coordinates (in px).
* @param {Number} x_min The smallest x value of an "insignificant region" rectangle
* @param {Number} x_max The largest x value of an "insignificant region" rectangle
Expand Down

0 comments on commit 6a90b58

Please sign in to comment.