Skip to content

Instantly share code, notes, and snippets.

@emepyc
emepyc / README.md
Last active December 5, 2023 13:48
Limit panning/zooming in d3 v4

Example of how to use zoom.extent and zoom.translateExtent to limit panning/zooming in d3 v4. The initial state of the visualisation are centered on coordinates [500, 1500] using zoom.transform. The limits for panning/zooming are set to [0, 5000].

@emepyc
emepyc / ENSGT00390000003602.json
Last active January 4, 2021 13:03
Ensembl gene tree
{"tree":{"events":{"type":"speciation"},"branch_length":0,"children":[{"events":{"type":"speciation"},"branch_length":0,"children":[{"events":{"type":"speciation"},"branch_length":0.141044,"children":[{"events":{"type":"speciation"},"branch_length":0.137872,"children":[{"events":{"type":"speciation"},"branch_length":0.183219,"children":[{"events":{"type":"speciation"},"branch_length":0.007354,"children":[{"events":{"type":"speciation"},"branch_length":0.196061,"children":[{"exon_boundaries":{"boundaries":[28,138,163,195,208,246,284,307,685,2766,2800,2831,3003,3065,3128,3186,3314,3368,3419,3465,3535,3592,3651,3742,3811],"number_of_exons":26},"sequence":{"mol_seq":{"seq":"----MDSCIQN---MYDAFKDEIWK--ELGPLDPNWFEVLTAQASLNEGN---VADNDE--LCANQEGYFKVPLEKTAVESQLFSTPKVFRHCQIV---SP------------------------DTEDDTSFTAAQEKEMLPWMPTQSPCLFQP---PKLCVSNLKCEGVQPQTE----------A----SFDLLHSPE--KSP-ASYANHISESLGAQINPDISWTSSFNTPRALPSTLILSKTDESPCPESVTADR--KVVFV-----------------RKLFPSLSNSSLNTSR-TSLGPVFPVTDTCSKSPLNQSESHQQQ---K------VPDALEG-
@emepyc
emepyc / README.md
Last active October 10, 2018 08:50
Async tooltips

TnT Tooltip example simulating a tooltip to display async data. Clicking on the red circle fires a plain tooltip with a spinner. After 2 seconds, this spinner is substituted by a table tooltip displaying the data.

@emepyc
emepyc / README.md
Last active October 10, 2018 08:50
Mouseover tooltip

Example of TnT Tooltip showing on mouseover information.

@emepyc
emepyc / README.md
Last active October 10, 2018 08:49
Custom tooltip

TnT Tooltip example created using the generic tooltip interface.

@emepyc
emepyc / README.md
Last active October 10, 2018 08:48
Tooltip IDs

Example of TnT Tooltip showing how different IDs affect the displayed tooltips. Red circles display tooltips with the same ID which is different from the ID of the blue circles. For this reason only one tooltip of each type (red / blue) can be displayed at the same time.

@emepyc
emepyc / README.md
Last active October 10, 2018 08:45
Table tooltip example
@emepyc
emepyc / .block
Last active September 10, 2018 08:48
iHam widget example
height: 2500
@emepyc
emepyc / README.md
Last active November 18, 2017 23:56
y axis in track

Example of vertical axis in a track

@emepyc
emepyc / README.md
Last active November 9, 2017 18:03
TnT tree updates

Example of TnT visualisation showing tree updates.