This is a prototype web application that draws gene transcripts using data from Ensembl REST API.
- Download this repo, go to its root folder, and launch a web server:
npm start #launches a python server: 'python -m SimpleHTTPServer 8000'
#or, for python 3: python3 -m http.server 8000
#or, use a node module: npm i -g http-server && http-server -a localhost -p 8000
- Point your web browser to http://localhost:8000
Serverless mode
The webapp can also be run offline:
- Double-click
index.html
in the root folder - Load the example gene or use gene history (see usage)
- Type a gene ID to the search bar and press Enter (or click the arrow icon) to render the transcripts
- Submitting empty input will load an example gene (also works in offline mode)
- The transcripts stretch to maximize the visualization space
- Hover interface elements, gene IDs or transcripts for additional info
- Blue transcripts are on the forward strand, red on the reverse strand
- Vue webapp, written in HTML, JavaScript and CSS
- Optimized for performance, small bundle size, and ease of use
- Works out of the box, without bundlers or build pipelines (quick setup and development)
- Single dependency: Vue.js JavaScript library (for reactive UI)
- Minimum: web browsers with fetch support (from 2015 onwards)
- Recommended: web browsers with grid support (from 2017 onwards)
Use the Vue development version (see index.html
) and a hot-reloading server.
npm install -g live-server #installs a development server
live-server --port=8000 #starts the server & opens the webapp
- Webapp component functions are covered with unit tests (located in
tests/unit
folder) - Integration and end-to-end (e2e) tests simulate user interaction in the webapp (
tests/integration
) - Jest and Vue Testing Library are used for unit tests, and Cypress for integration/e2e
- All the tests are run without a build step (no need for Babel, WebPack, etc.)
- Install the testing tools
npm install
- Run the unit tests
jest #or: 'npm run test:unit'
- Run the integration tests
npm start #launch a web server (if not already running)
npm run test:e2e #in a separate terminal window
Note: run all the commands in the webapp root foler
MIT
Author: Andres Veidenberg