Back to prompt library
Build a Biopython Multiple Sequence Alignment Quality Scorer with Qdrant — implementation
Linked challenge: Build a Biopython Multiple Sequence Alignment Quality Scorer with Qdrant
Prompt source
implementation67 lines11 sectionsNo variables1 code block
## Build
Align homologous gene transcripts downloaded from public repositories and calculate pairwise distance matrices. Vectorize alignment features into Qdrant to detect anomalous outlier sequences.
## User
Computational Biologist
## Workflow
1. Load homologous FASTA transcripts using Biopython SeqIO.
2. Compute gap frequencies and positional identity matrices across sequence collections.
3. Vectorize alignment summary profiles and index them in a local Qdrant collection.
4. Identify distance outliers and output quality warnings for human curator verification.
## Interface
Streamlit app with interactive distance plots and outlier inspection tables.
## Data
Use Biopython test suite FASTA samples and public viral or eukaryotic homologous transcript sets.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Biopython](https://raw.githubusercontent.com/biopython/biopython/master/README.rst)
Employs Biopython's sequence analysis data structures to parse FASTA alignments and compute residue statistics.
## Tools
qdrant, biopython, streamlit.
Qdrant provides low-latency vector similarity search to cluster alignment score vectors and find outliers.
Small local embedding model or tabular feature projector for alignment metric indexing.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Parses multi-sequence FASTA files accurately using Biopython.
- Calculates positional identity and indexes metric vectors into Qdrant.
- Flags sequences with high gap penalties or divergent residue scores.
## Starter Examples
```json
[
{
"input": {
"alignment_id": "ALN-101",
"sequences": [
">seqA\nATGCGATCG",
">seqB\nATGCGATCG",
">seqC\nATGCGATCA"
]
},
"expected_output": {
"alignment_id": "ALN-101",
"consensus_identity": 0.963,
"outliers_detected": 0,
"status": "CONCORDANT"
}
},
{
"input": {
"alignment_id": "ALN-102",
"sequences": [
">seqA\nATGCGATCG",
">seqB\nNNNNGATCG",
">seqC\nATGCGATCG"
]
},
"expected_output": {
"alignment_id": "ALN-102",
"consensus_identity": 0.667,
"outliers_detected": 1,
"status": "DISCORDANT_ALERT"
}
}
]
```
## Safety
Standard sequence quality profiling tool operating exclusively on open synthetic or public FASTA data.
Use mock external writes. Require human review before any real deployment.