Architecture¶
Overview¶
PIPA follows a client-server architecture:
[Web UI (Vue.js/Quasar)] <--HTTP/JSON--> [Flask API] <--subprocess--> [Bioinformatics Tools]
Backend¶
The Flask backend orchestrates the pipeline:
app.py- Flask application factory, CORS, blueprint registrationblueprints/api.py- REST API with async job execution via threadingextensions/services.py-Pipaorchestrator class andPipelineConfigextensions/services1/- Individual service classes per stage
Job Lifecycle¶
POST /api/upload- Files saved todata/jobs/<job_id>/input/POST /api/run- Pipeline starts in a background threadGET /api/status/<job_id>- Frontend polls for progressGET /api/results/<job_id>- Results fetched when complete
Pipeline Execution¶
For input_type: "assembly", uploaded files are moved to assembly/uploaded/ and trimming/assembly stages are skipped.
Each tool is wrapped in _run_cmd() which:
- Checks if the tool exists on PATH (shutil.which)
- Runs via subprocess.run with timeout and capture
- Logs stdout/stderr and raises on non-zero exit
Frontend¶
Vue.js 2 + Quasar v1 SPA:
Software.vue- Two workflow modes (reads vs annotation), tool selectionResults.vue- Progress polling, results table, file browser- Vuex store -
pipa/module with job state, pipeline status, API actions - Axios - HTTP client configured to
http://127.0.0.1:5000/api
Data Flow¶
User selects files + tools
|
[uploadFiles action] --> POST /api/upload --> saves files
|
[startPipeline action] --> POST /api/run --> background thread
|
[pollStatus action] <-- GET /api/status (every 3s)
|
[fetchResults action] <-- GET /api/results --> display in table