Genoscapist

How to modify Genoscapist?


Requirement: a Genoscapist instance up and running

Follow the Genoscapist Git deployement or use the Genoscapist Virtual Machine provided to get the code distribution.

Content of the GitHub repository

The Git repository contains:

  • a configuration file config.py (database connection parameters, ...)
  • a database queries file database.py
  • a main Flask file __init__.py
  • a scripts directory with all integration data scripts and a dataset files
  • a static directory with all static files (images, files, JavaScript)
  • a templates directory with all HTML files

Server side

The server side is developed with Flask.

The __init__.py file defines all URL of Genoscapist application with the route() decorator to tell Flask what URL should trigger our function.

The database.py file contains all the queries to the database.

Client side

The client side is developed with HTML and JavaScript.

All HTML templates are available in the templates sub-directory which contains:

  • the home page index.html
  • the gene page gene.html
  • the contact page contact.html
  • the references page references.html

All Javascript files are available in the static/js sub-directory which contains:

  • table.js for the index.html page
  • svg.js for the construction of the gene.html page
  • event.js for the events of the gene.html
  • the modules sub-directory contains all Javascript files needed to create the SVG

Here, it is an example of JavaScript code dedicated to the visualization of CDS feature.

Extract of svg.jsExtract of draw_cds() of cds.js module

Here, it is an example of JavaScript code dedicated to the visualization of samples.

Extract of svg.jsExtract of draw_profiles() of profiles.js module