d3.boxplot¶
- d3.boxplot.init(id_res, from_file)¶
Initialize dotplot
- Arguments
id_res (
string()
) – job idfrom_file (
boolean()
) – true to load data from a file (default: false, load from server)
- d3.boxplot.change_color_theme(theme)¶
Change color theme to the given one
- Arguments
theme (
string()
) – theme name
- d3.boxplot.draw(x_contigs, x_order, y_contigs, y_order)¶
Draw dot plot
- Arguments
x_contigs (
object()
) – length associated to each contig of the queryx_order (
array()
) – order of query contigsy_contigs (
object()
) – length associated to each chromosome of the targety_order (
array()
) – order of target chromosomes
- d3.boxplot.draw_axis_bckgd()¶
Draw backgrounds of all axis
- d3.boxplot.draw_bottom_axis(x_max, x_min)¶
Draw bottom axis
- Arguments
x_max (
int()
) – max value of x on the X axisx_min (
int()
) – min value of x on the X axis
- d3.boxplot.draw_left_axis(y_max, y_min)¶
Draw left axis
- Arguments
y_max (
int()
) – max value of y on the Y axisy_min (
int()
) – min value of y on the Y axis
- d3.boxplot.draw_legend()¶
Draw legend
- d3.boxplot.draw_lines(lines, x_len, y_len)¶
Draw matches on dot plot
- Arguments
lines (
object()
) – matches definitionx_len (
number()
) – total len of targety_len (
number()
) – total len of query
- d3.boxplot.draw_right_axis(y_zones)¶
Draw right axis
- Arguments
y_zones (
object()
) – name of contigs of the query
- d3.boxplot.draw_top_axis(x_zones:)¶
Draw top axis
- Arguments
x_zones: (
object()
) – name of chromosomes of the target
- d3.boxplot.get_human_readable_size(nbases, precision, space)¶
Get human readable size in Kb or Mb for a number in bases
- Arguments
nbases (
int()
) – size in basesprecision (
int()
) – unit to use (auto: select according to number size)space (
string()
) – space before unit (space or non-breaking space for example)
- Returns
string – human readable size
- d3.boxplot.launch(res, update, noise_change)¶
Launch draw of dot plot
- Arguments
res (
string()
) –update (
boolean()
) – if true, just update the existing dot plot (don’t initialize events)noise_change (
boolean()
) – if false, set noise to true
- d3.boxplot.select_query(y)¶
Find query contig where the user click
- Arguments
y (
float()
) – coordinate on Y axis
- Returns
string|null – contig name
- d3.boxplot.select_target(x)¶
Find target chromosome where the user click
- Arguments
x (
float()
) – coordinate on X axis
- Returns
string|null – chromosome name
- d3.boxplot.select_zone(x, y, x_zone, y_zone, force)¶
Find zone (query contig and target chromosome) based on coordinates
- Arguments
x (
float()
) – coordinate on X axisy (
float()
) – coordinate on Y axisx_zone (
string()
) – selected chromosome on X axis (target)y_zone (
string()
) – selected contig on Y axis (query)force (
boolean()
) – if true, select zone even if a zone is already selected
- d3.boxplot.switch_color_theme()¶
Switch to next color theme
- d3.boxplot.zoom_bottom_axis()¶
Zoom on bottom axis
- d3.boxplot.zoom_left_axis()¶
Zoom on left axis
- d3.boxplot.__draw_idy_lines(idy, lines, x_len, y_len)¶
Draw matches on dot plot for the given identity class
- Arguments
idy (
string()
) – identity class of matches to drawlines (
object()
) – matches definitionsx_len (
number()
) – total length of targety_len (
number()
) – total length of query
- d3.boxplot.__lineFunction(d, min_size, max_size, x_len, y_len)¶
Build line data for D3.js
- Arguments
d (
object()
) – data object of the linemin_size (
int()
) – min size of line. Beside it, don’t draw the linemax_size (
int|null()
) – max size of line. Over it, don’t draw the linex_len (
number()
) – length of x (target)y_len (
number()
) – length of y (query)
- Returns
string – path object
- d3.boxplot._get_line_len(line)¶
Get length of a given line
- Arguments
line (
array()
) – line object
- Returns
number – line length
- d3.boxplot._sort_color_idy(a, b)¶
Sort function key for color identity
- Arguments
a –
b –
- Returns
number –
- d3.boxplot._sort_lines(l1, l2)¶
Sort lines with their length (DESC)
- Arguments
l1 (
array()
) – line objectl2 (
array()
) – line object
- Returns
number –
- d3.boxplot._sort_lines_by_idy(l1, l2)¶
Sort lines with their identity (DESC)
- Arguments
l1 (
array()
) – line objectl2 (
array()
) – line object
- Returns
number –
d3.boxplot.events¶
- d3.boxplot.events.init()¶
Initialise events
- d3.boxplot.events.filter_identity(min_idy)¶
Remove low identity matches
- Arguments
min_idy (
number()
) – minimum of identity. Beside it, hide matches
- d3.boxplot.events.filter_size(min_size)¶
Remove too small matches
- Arguments
min_size (
number()
) – minimum size. Beside it, hide matches
Initialise context menu
- d3.boxplot.events.set_break_lines_visibility(value:)¶
Set break lines visibility: color and thickness, or hidden
- Arguments
value: (
string()
) – visibility value: “0”-> hidden to “5” -> max visibility value
- d3.boxplot.events.stroke_linecap(rounded)¶
If stroke precision checked, strole-linecap is set to “butt”. Else “round” to improve visibility of matches
- Arguments
rounded (
boolean()
) – if true, improve bisibility by add round cap to lines
- d3.boxplot.events.stroke_width(width)¶
Change matches lines stroke width
- Arguments
width (
string()
) – new width class (“1”, “2”, or “3”)
d3.boxplot.mousetip¶
- $.fn.mousetip(my_tip, relative_to, x, y)¶
Mouse tip basis
- Arguments
my_tip –
relative_to –
x (
int()
) –y (
int()
) –
- d3.boxplot.mousetip.init()¶
Initialise tooltip
- d3.boxplot.mousetip.getColorByBgColor(bgColor)¶
Get color (black/white) depending on bgColor so it would be clearly seen.
- Arguments
bgColor –
- Returns
string –
- d3.boxplot.mousetip.get_label(label)¶
get label to show
- Arguments
label (
string()
) – initial label
- Returns
string – new label
- d3.boxplot.mousetip.get_match(e)¶
Get match override by mouse cursor
- Arguments
e – mouse event
- Returns
Object –
- d3.boxplot.mousetip.hide()¶
Hide tooltip
d3.boxplot.zoom¶
- d3.boxplot.zoom.init()¶
Initialize zoom.init module
- d3.boxplot.zoom.click()¶
Click event action
- d3.boxplot.zoom.mousedown()¶
Mousedown event action
- d3.boxplot.zoom.mouseup()¶
Mouseup event action
- d3.boxplot.zoom.reset_scale(temp, after, force)¶
Reset scale
- Arguments
temp (
boolean()
) – if true, reset it temporarilyafter (
function()
) – function to launch after staffforce (
boolean()
) – do it even if events are disabled
- Returns
boolean – true if done, else false
- d3.boxplot.zoom.restore_scale(transform:)¶
Restore previous scale
- Arguments
transform: – transform object
- d3.boxplot.zoom.translate()¶
Translate event action
- d3.boxplot.zoom.zoom()¶
Zoom staff
- d3.boxplot.zoom._cursor_pos(rect)¶
Get cursor position
- Arguments
rect (
DOMRect()
) – if given, dont get it from DOM
- Returns