Skip to content

Add standalone FastAPI conservation server with CLI tools#191

Open
rdk wants to merge 2 commits intocusbg:mainfrom
rdk:conservation-server
Open

Add standalone FastAPI conservation server with CLI tools#191
rdk wants to merge 2 commits intocusbg:mainfrom
rdk:conservation-server

Conversation

@rdk
Copy link
Member

@rdk rdk commented Feb 25, 2026

This is a request for comments, please don't merge yet.

See also https://github.com/rdk/prankweb/tree/conservation-server/executor-p2rank/conservation

Summary

  • Add a standalone FastAPI web server (/conservation endpoint) that exposes HMM-based conservation score computation over HTTP, decoupled from the full P2Rank prediction pipeline
  • Add CLI script (run_conservation.py) for computing conservation on a single FASTA file and a batch processing wrapper (calculate_conservations_batch.sh) for parallel processing of FASTA directories
  • Add conservation-server service to docker-compose.yml with documentation for building, running, and configuring the server
  • Add early validation of the HMM sequence database file in the core pipeline to produce clear error messages instead of cryptic downstream failures
  • Add debug logging to conservation cache and executor for easier troubleshooting

Details

The conservation server wraps the existing HMM-based conservation pipeline (phmmer → esl-weight → esl-alistat) behind a simple HTTP API, allowing conservation scores to be computed without running a full P2Rank prediction. The
server reuses all existing conservation logic -- no computation code was duplicated.

The Docker setup extends the existing executor-p2rank image with FastAPI/uvicorn dependencies and can be run with multiple workers for concurrent requests.

rdk added 2 commits February 25, 2026 19:14
- Conservation server exposing HMM pipeline via HTTP (port 8030)
- run_conservation.py for single FASTA file processing
- Batch script for parallel conservation computation
- Input validation for HMM sequence database file
- Docker Compose service and Dockerfile updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant