Back to prompt library
Build a Gene Homology Multiple Alignment Quality Ranker — implementation
Linked challenge: Build a Gene Homology Multiple Alignment Quality Ranker
Prompt source
implementation89 lines11 sectionsNo variables1 code block
## Build
Align homologous eukaryotic gene transcripts using Biopython and compute conservation density metrics. Package results into FHIR DiagnosticReport payloads for cross-species evolutionary registries.
## User
Comparative Genomics Analyst
## Workflow
1. Fetch multi-species homologous gene FASTA packages using taxonomy filters via NCBI Datasets.
2. Perform multiple sequence alignment and calculate gap percentages and conservation scores with Biopython.
3. Detect low-identity outliers exceeding configured alignment distance standard deviations.
4. Serialize alignment summaries into FHIR Molecular DiagnosticReport and Observation bundles.
## Interface
Interactive web visualizer featuring color-coded sequence alignment tracks and gap percentage slider controls.
## Data
Curate homologous CDS sequences for mammalian orthologs using NCBI Datasets CLI taxon filters.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Biopython](https://raw.githubusercontent.com/biopython/biopython/master/README.rst)
Leverages Biopython's sequence alignment, distance matrix utilities, and FASTA parsing capabilities.
## Tools
ray-serve, biopython, numpy.
ray-serve distributes compute-heavy Biopython alignment jobs and FHIR serialization across parallel worker nodes.
Local microservice deployment with multi-core CPU support for alignment processing; optional small language model for report narratives.
## 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
- Calculate pairwise sequence identity matrices across minimum 5 homologous sequences.
- Output FHIR DiagnosticReport containing an Observation with mean conservation score.
- Reject sequences containing unparsable non-IUPAC nucleotide characters.
## Starter Examples
```json
[
{
"input": {
"alignment_id": "ORTHO_001",
"sequences": [
{
"id": "HUMAN_GENE1",
"seq": "ATGCCCAAA"
},
{
"id": "CHIMP_GENE1",
"seq": "ATGCCCAAA"
},
{
"id": "MOUSE_GENE1",
"seq": "ATGCCCAAG"
}
]
},
"expected_output": {
"alignment_id": "ORTHO_001",
"mean_identity": 0.963,
"outliers": [],
"fhir_report": {
"resourceType": "DiagnosticReport",
"status": "final",
"code": {
"text": "Homology Alignment Assessment"
}
}
}
},
{
"input": {
"alignment_id": "ORTHO_002",
"sequences": [
{
"id": "HUMAN_GENE2",
"seq": "ATGCCC"
},
{
"id": "MUTANT_SEQ",
"seq": "ATGZZZ"
}
]
},
"expected_output": {
"alignment_id": "ORTHO_002",
"mean_identity": null,
"outliers": [
"MUTANT_SEQ"
],
"error": "Non-IUPAC nucleotide characters identified"
}
}
]
```
## Safety
Intended solely for comparative sequence analysis. Contains no personal protected health data or therapeutic determinations.
Use mock external writes. Require human review before any real deployment.