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 Gene Package CDS Extraction and Reading Frame Evaluator

Format
Code-aware
Lines
63
Sections
11
Linked challenge
Build a Gene Package CDS Extraction and Reading Frame Evaluator

Prompt source

Original prompt text with formatting preserved for inspection.

63 lines
11 sections
No variables
1 code block
## Build
Process gene data packages containing CDS and protein fasta files to verify translation coordinates. Compare Biopython translation products with expected NCBI RefSeq protein records.

## User
Bioinformatics Assay Specialist

## Workflow
1. Download or mock NCBI Datasets gene data packages with gene, CDS, and protein records.
2. Extract coding sequences and translate nucleotides to amino acids using Biopython.
3. Compare translated sequence with provided protein accessions to detect truncation or mismatches.
4. Produce a structured JSON report documenting codon discrepancies and translation fidelity.

## Interface
Command-line tool generating summary JSON and markdown verification tables.

## Data
Execute 'datasets download gene gene-id 672 --include cds,protein' to get reference files, or use local mock fixtures.
Starter examples below are synthetic. They are not downloaded records.

## Source
[NCBI Datasets gene download](https://www.ncbi.nlm.nih.gov/datasets/docs/v2/how-tos/genes/download-gene-data-package/)
Extracts CDS and protein files specifically from NCBI Datasets packages using the --include flag specification.

## Tools
mlflow, biopython, click.
MLflow tracks translation fidelity experiments, parameter runs, and discrepancy metrics across gene packages.
None mandatory; rule-based sequence logic with optional local LLM for mutation discrepancy annotation.

## 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
- Translates CDS sequences using standard genetic codes in Biopython.
- Identifies premature stop codons and mismatching translation products.
- Logs experiment runs and discrepancy counts to an MLflow tracking server.

## Starter Examples
```json
[
  {
    "input": {
      "gene_symbol": "TEST1",
      "cds_seq": "ATGGCCAACGTCTAA",
      "expected_protein": "MANV"
    },
    "expected_output": {
      "match": true,
      "translated_protein": "MANV*",
      "premature_stop": false,
      "discrepancies": []
    }
  },
  {
    "input": {
      "gene_symbol": "TEST2",
      "cds_seq": "ATGTAACCAACGTCTAA",
      "expected_protein": "MANV"
    },
    "expected_output": {
      "match": false,
      "translated_protein": "M*PT",
      "premature_stop": true,
      "discrepancies": [
        "Stop codon at residue 2"
      ]
    }
  }
]
```

## Safety
Analytical translation verification pipeline operating on non-clinical biological sequences.
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.