Skip to main content
Back to Prompt Library
implementation

Build the application

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build a Biopython Multiple Sequence Alignment Quality Scorer with Qdrant

Format
Code-aware
Lines
67
Sections
11
Linked challenge
Build a Biopython Multiple Sequence Alignment Quality Scorer with Qdrant

Prompt source

Original prompt text with formatting preserved for inspection.

67 lines
11 sections
No variables
1 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.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.