Skip to main content
Loading navigation
Back to prompt library

Build a Prokaryotic RefSeq Annotation and Slippage Discrepancy Detector — implementation

Linked challenge: Build a Prokaryotic RefSeq Annotation and Slippage Discrepancy Detector

Prompt source

implementation69 lines11 sectionsNo variables1 code block
## Build
Evaluate prokaryotic WP_ accession metadata and FASTA files to detect ribosomal slippage annotation gaps. Generate structured FHIR DiagnosticReport payloads for microbiological biocurators.

## User
Microbiology Data Specialist

## Workflow
1. Ingest prokaryotic gene packages containing WP_ accessions and gene metadata using Biopython.
2. Inspect coding coordinates for internal stop codons indicating programmatic translation exceptions or frameshifts.
3. Verify whether ribosomal slippage exceptions are explicitly cataloged in the gene data report.
4. Assemble findings into FHIR DiagnosticReport resources linking affected prokaryotic accessions.

## Interface
CLI utility with terminal summary tables and automated JSON artifact dispatch to local filesystem.

## Data
Query bacterial gene packages using NCBI Datasets CLI with taxon identifiers and WP_ accession filters in sandbox test environments.
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/)
Leverages NCBI Datasets prokaryotic gene package rules specifying WP_ accessions with gene and protein sequences.

## Tools
dspy, biopython, pydantic.
DSPy compiles robust prompt pipelines to classify biological annotations against structured taxonomy categories without brittle prompt templates.
Local or hosted API LLM capable of rule-grounded categorization and structured summary 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
- Accurately flags internal stop codons in prokaryotic nucleotide records when translating via standard genetic code.
- Identifies documented translational exceptions in gene package metadata vs undocumented coordinate anomalies.
- Generates valid FHIR DiagnosticReport JSON containing observation references for flagged accessions.

## Starter Examples
```json
[
  {
    "input": {
      "accession": "WP_000123456.1",
      "nucleotide_seq": "ATGCGCTAATGA",
      "slippage_annotated": true
    },
    "expected_output": {
      "slippage_detected": true,
      "annotation_status": "documented",
      "review_recommended": false,
      "fhir_diagnostic_report": {
        "resourceType": "DiagnosticReport",
        "status": "final",
        "conclusion": "Documented ribosomal slippage observed in WP_000123456.1."
      }
    }
  },
  {
    "input": {
      "accession": "WP_000987654.1",
      "nucleotide_seq": "ATGCGCTAATGA",
      "slippage_annotated": false
    },
    "expected_output": {
      "slippage_detected": true,
      "annotation_status": "undocumented",
      "review_recommended": true,
      "fhir_diagnostic_report": {
        "resourceType": "DiagnosticReport",
        "status": "registered",
        "conclusion": "Undocumented internal stop codon detected in WP_000987654.1. Curator inspection needed."
      }
    }
  }
]
```

## Safety
Operates entirely on unclassified prokaryotic reference records without real biological sample processing.
Use mock external writes. Require human review before any real deployment.