A framework-agnostic library for showing gene information as a tooltip
npm install gene-tooltipsA framework-agnostic JavaScript/TypeScript library for displaying interactive gene information tooltips.
This library can be used to enrich any text within an HTML document to provide a 'glimpse' of information on a gene using the MyGene.info API, providing an immediate definition alongside links to further reading for genes of interest.
The library is similar in principle to Gene Hints, but does not require an ideogram as the 'launching point'.
gene-tooltips.bash
npm install gene-tooltips
`Usage
At minimum, you must include the javascript code for this project (either installed via NPM or built locally). For all features, you will also need to include ideogram.js and the D3 libraries.
The file
examples/index.html shows a working example - simply clone this repository, run npm install and npm run build, then open index.html in a browser.To initialize gene tooltip object, add something like this (with configurable options) to your HTML:
`html
Here is a human gene: TP53.
And here is a mouse gene: Trp53.
``You can also add the class to a list of consistently delimited gene names (as long as they belong to the same species)
Full documentation and examples are available in the docs
folder or at the project site.
Issues and pull requests are welcome. Please open a discussion if you’d like to propose a new feature or bug fix.