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 Prokaryotic Gene RefSeq Coordinate Discrepancy Auditor

Format
Code-aware
Lines
69
Sections
11
Linked challenge
Build a Prokaryotic Gene RefSeq Coordinate Discrepancy Auditor

Prompt source

Original prompt text with formatting preserved for inspection.

69 lines
11 sections
No variables
1 code block
## Build
Download prokaryotic WP_ accession metadata and FASTA sequences to detect ribosomal slippage annotation gaps. Generate FHIR Molecular Observation logs to track curated sequence revisions.

## User
Microbial Biocurator

## Workflow
1. Download prokaryotic gene packages using NCBI Datasets WP_ protein accession queries.
2. Parse FASTA headers and protein strings using Biopython to calculate amino acid lengths.
3. Compare sequence lengths against the reported gene coordinate boundaries from the metadata report.
4. Generate FHIR Observation records cataloging coordinate matching status and length discrepancies.

## Interface
Interactive data table showing prokaryotic gene accessions, length deltas, and automated FHIR output viewers.

## Data
Query NCBI Datasets CLI using synthetic mock WP_ accessions with the --include gene,protein flags.
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 prokaryotic gene data packages containing WP_ accessions, gene and protein sequences.

## Tools
agno, biopython, sqlite3.
agno provides lightweight workflow orchestration to manage sequential API queries and Biopython parsing tasks.
Local Python 3.12 runtime with Ollama or local LLM fallback for automated curator note generation.

## 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
- Download and parse both gene nucleotide and WP_ protein sequences from the data package.
- Detect discrepancy between expected peptide length and gene length divided by 3.
- Produce FHIR Observation resource with code indicating coordinate match status.

## Starter Examples
```json
[
  {
    "input": {
      "accession": "WP_000001.1",
      "gene_length_bp": 900,
      "protein_length_aa": 300
    },
    "expected_output": {
      "accession": "WP_000001.1",
      "length_delta": 0,
      "coordinate_match": true,
      "fhir_observation": {
        "resourceType": "Observation",
        "status": "final",
        "valueBoolean": true
      }
    }
  },
  {
    "input": {
      "accession": "WP_000002.1",
      "gene_length_bp": 900,
      "protein_length_aa": 250
    },
    "expected_output": {
      "accession": "WP_000002.1",
      "length_delta": -50,
      "coordinate_match": false,
      "fhir_observation": {
        "resourceType": "Observation",
        "status": "preliminary",
        "valueBoolean": false
      }
    }
  }
]
```

## Safety
Research-oriented microbial genomics pipeline utilizing open RefSeq accessions. No clinical diagnosis or diagnostic utility.
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.