Skip to content

Axl-Lvy/projet_web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Projet web

Web project of 2022-2023 in master AMI2B. The purpose is to build a web application with django to allow users to create and view annotations of bacterial genome. The site is still in confection, please refer to the todo list to follow the progress.

Environnement

We used for this project python 3.9.12. The list of external modules, including django 4.1.4, is available in the requirements file. To install them directly, just run :

pip install -r "requirements.txt"

Run the server

To run the server, be sure you have all the required packages installed (see requirements.txt) and the data folder at the root. You can perform python source/manage.py initialize-server to initialize the database, and then just run the server with python source/manage.py runserver.

How the site works

Permissions

Permissions are granted according to roles (Readers, Annotators, Validators, Admins).

  • Readers can only use the search functions on the site and comment on the annotations. This is the default group when you sign in.

  • Annotators can upload annotations for each sequence, and can propose another annotation if they think the current one is outdated. Annotators can promote anyone to annotator.

  • Validators can validate or not any annotation. An annotation considered as not validated is deleted.

  • Admins can do anything on the website. They can promote anyone to any group, and they are the only ones who can downgrade and ban people. They can manage the database as they want, by adding or deleting sequences, annotations or comments.

Pages

You can have acces to the html pages in templates. From the home page you have acces to :

  • login, which is simply the login page.
  • register where you can sign in. Page not functional for the moment.
  • acount, where you can manage your account. Page not functional for the moment.
  • annotate, where you can annotate a sequence. Page not functional for the moment.
  • addgenome where you can upload a genome. Page not functional for the moment.
  • parser where you can blast a sequence against the ncbi database. The blast is implemented but not the visualisation.
  • search where you can look for a sequence from differents entries such as the genome, the gene, the description or a k-mer. You can click on any sequence to view the next page : sequence.
  • search/sequence&id=<seq.id> where you find the annotations and informations about the sequence with seq.id as id, and you can click on BLAST, which will redirect you to parser with the blast of the sequence against the ncbi database.

Site schema

site schema

Import data

Genomes

You must put the data folder at the root of the project (where you find doc and source). You can run python source/manage.py import-my-data to import the genome and annotations. Note that it is also possible to compress the data using the functions in utils.py to gain around 10 Mo.

Users

You can run python source/manage.py create-groups and python source/manage.py create-users to create a bunch of example users, groups and permissions. Their logins and password are stored in default_users.txt. You can change or add lines in this file to custom the creation of users. The admin is the superuser (different from firstAdmin@gmail.com) and you can login as him in the admin site by default with :

login : admin@admin.com password : Ac1net0bactErb@umannii

Classes

Here is the UML class diagram, obtained directly from django-extensions.

diagram image

To recreate it, just run the two commands bellow:

python source/manage.py graph_models -g --dot -o doc/uml/diagram.dot bacterial_genome_annotation

dot -Tpng doc/uml/diagram.dot -o doc/uml/diagram.png

About

web project of 2022-2023 in master AMI2B

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 41.9%
  • CSS 27.6%
  • Python 20.5%
  • HTML 9.6%
  • Other 0.4%