How noefp/easy_gdb works
Main Components
• Client Interface: Represent the web browsers (Chrome, Firefox, etc.) that users interact with via HTML/CSS/JS. Note that the UI is built using PHP-generated HTML pages, and the frontend includes assets such as CSS (Bootstrap and custom stylesheets), JavaScript libraries (DataTables, blast_canvas_graph.js, etc.), and image assets.
• Web Server / Application Server: Show the Apache/PHP-based server that processes requests. In the Docker scenario, include the container (“easy_gdb”) containing the PHP code and static assets. Indicate that there is an “install” component with scripts (e.g., setup.sh, Dockerfile, docker-compose.yml) used for provisioning the system.
• Business Logic Layer: Illustrate the core PHP application. This includes numerous entry points (e.g., index.php, gene.php, species_view.php) and helper libraries (such as the “tools” folder with BLAST, expression, lookup, and annotation extraction scripts) that implement the various genomic data functions.
• Data Layer:
• File System: Emphasize that many data types are stored on the file system. There are annotation files, sequence datasets (in folders like “annotations”, “downloads”, “expression_data”), JSON configuration files for customization, and templates providing example data for tool integration.
• External Tools / Services: Include components such as:
• BLAST – executed via scripts located in the “tools/blast” folder along with corresponding BLAST databases.
• JBrowse – the genome browser, which is integrated by loading JBrowse configuration and data (from “jbrowse” folders and example data files).
• Gene Expression and Enrichment – integration with external services like g:Profiler (configured via JSON files in “json_files/tools/enrichment.json”) and using client-side visualization (with expression-specific JavaScript/CSS and optional cartoon images).
• Integration/Customization Configuration: Highlight that the system’s behavior can be heavily customized via configuration files (e.g., easyGDB_conf.php in the “egdb_files/egdb_conf” directory, configuration_path.php, and various JSON files).
Relationships and Data Flow
• The client (web browser) sends HTTP requests to the web server.
• The web server (Apache/PHP) routes these requests to various PHP entry scripts (like index.php, help pages, BLAST input pages, gene views, etc.).
• The Application Layer processes requests (for example, performing a BLAST search, fetching annotations, extracting sequences, or rendering a JBrowse genome view); it interacts with files stored on the local file system and optionally queries the PostgreSQL database.
• Outputs are built up from PHP templates and sent back to the client.
• When needed, the application calls external services (for example, linking to g:Profiler or UniProt) or invokes external executables (like BLAST commands and JBrowse’s data preparation scripts).
• In a Docker deployment, incorporate the container orchestration aspect (docker-compose managing at least one container for “easy_gdb”, another for “DB”, etc.).
Architectural Patterns and Key Technologies
• Although not a full MVC framework, the project’s structure suggestively separates presentation (templates, JS, CSS, HTML), business logic (PHP functions, tool modules), and data management (file storage and an optional relational database).
• The system leverages web technologies (PHP, CSS, JavaScript) and configuration-driven design (many JSON and PHP configuration files to drive customization).
• Docker is used to containerize the application, so include a container boundary indicating production vs. development deployment.
• Integration with external bioinformatics tools (BLAST, JBrowse, g:Profiler) is a central design principle.
• Component names and clear labels for:
• Web Client
• Apache/PHP Application (including Docker container if applicable)
• Application Modules for BLAST, Genome Browser, Annotation Search, Gene Expression, Lookup, etc.
• File Storage with structured directories (annotations, downloads, expression_data, templates, etc.)
• Optional PostgreSQL Database (and its role for gene annotations)
• External service integration (links to g:Profiler, UniProt, JBrowse external links)
• Grouping related modules together for clarity (e.g., “Genomics Tools” block containing gene lookup, BLAST, annotation extraction, etc.)