How joshuachou2018/autoba works
And Label Main Components
• Client Interface:
• CLI Interface: Driven by app.py (and configuration files such as config.yaml within the examples/ directory).
• GUI Interface: Provided by gui.py (using Gradio).
• Configuration & Input Manager:
• The “examples” directory holds sample configuration files (config.yaml) that define the analysis tasks, input data paths, and goal descriptions.
• Core AI Agent:
• The engine that parses configurations and initiates the analysis pipeline is distributed within src files like agent.py, local_llm.py, prompt.py, and executor.py.
• The Automatic Code Repair (ACR) module and RAG (retrieval-augmented generation) functionalities are integrated here (see references in build_RAG_private.py and updates in the README).
• LLM Integration Modules:
• Two key submodules in src – “codellama-main” and “llama-main” – incorporate support for local LLM-based processing.
• The “deepseek” directory provides additional LLM backends.
• These modules are responsible for interacting with both remote APIs (e.g., openai) and local LLM services (via ollama or direct downloads).
• Bioinformatics Pipeline & Software Management:
• The “softwares_config” directory contains configuration files for various bioinformatics tools (e.g., bowtie2, hisat2, macs2, etc.).
• The “softwares_database” directory maintains databases (or listings) for these tools.
• Utility & External Resource Manager:
• The “media” directory (with publication PDFs) and the “src” folder’s additional scripts (like merge_weights.py, spinner.py) help coordinate modules and resources.
Relationships and Data Flow
• User (via CLI/GUI) selects or creates a config.yaml file defining data inputs, output directory, and analysis goals.
• Configuration Parsing:
• The configuration is loaded by app.py (or gui.py) and passed to the Core AI Agent.
• Core AI Agent Operation:
• The Agent (src/agent.py) interprets the user-specified goal.
• It then coordinates with the LLM modules (located in src/codellama-main, src/llama-main, src/deepseek) to generate the code or pipeline steps.
• The agent may also invoke the ACR module (as mentioned in the README updates).
• Execution Flow:
• The Executor (src/executor.py) takes the AI-generated or predefined pipeline instructions and interfaces with bioinformatics tools.
• The actual bioinformatics analyses are managed by calling external software configured in “softwares_config” and referenced in “softwares_database.”
• Output Generation:
• Results are saved to the designated output directory, while the system may also provide real-time feedback (via the GUI) and logs.
Architectural Patterns and Design Principles
• Separation of Concerns:
• User interface, core AI logic, LLM integration, and bioinformatics pipelines are clearly separated.
• Modularity:
• Different directories (src, softwares_config, softwares_database) indicate modular design making it easier to extend or swap components.
• Extensibility:
• The system is built to integrate additional bioinformatics case studies (as seen in various example cases) and LLM backends.
• Flexible Integration:
• Multiple methods of interfacing with LLMs (remote API vs. local llm via ollama, code llama, deepseek) allow easy adaptation based on the deployment environment.
Technologies and Details
• Programming Language: Python is the primary language.
• LLM Technologies: OpenAI GPT models, CodeLlama, and other local LLMs support.
• GUI: Gradio is used for the GUI (installed via pip).
• Containerization: Docker support is provided (see Docker instructions in the README).
• Conda/Mamba: Used for environment management.
• External Bioinformatics Tools: The system integrates tools like STAR-Fusion, scanpy, fastqc, cutadapt, and many configured via configuration files.