Skip to main content
Loading navigation
Back to prompt library

Build a Prokaryotic RefSeq Annotation Verification Assistant — implementation

Linked challenge: Build a Prokaryotic RefSeq Annotation Verification Assistant

Prompt source

implementation66 lines11 sectionsNo variables1 code block
## Build
Inspect prokaryotic WP_ accession metadata and FASTA packages from NCBI Datasets. Verify translational completeness and generate FHIR Molecular Observation entries for microbiology research.

## User
Microbial Genomicist

## Workflow
1. Download prokaryotic gene packages specified by RefSeq WP_ accessions through NCBI Datasets.
2. Parse prokaryotic protein and gene multi-FASTA files using Biopython Bio.SeqIO module.
3. Translate genomic coding intervals to check concordant peptide lengths and terminal residues.
4. Generate FHIR Molecular Observation JSON payloads detailing translation congruence.

## Interface
Console dashboard displaying accession parsing progress, peptide length delta indicators, and JSON downloads.

## Data
Fetch synthetic WP_ bacterial accessions using mock zip payloads simulating NCBI Datasets CLI prokaryotic outputs.
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/)
Uses NCBI Datasets prokaryotic data package rules specifically handling WP_ accessions containing gene and protein files.

## Tools
mastra-ai, biopython, fastapi.
Provides structured TypeScript and Node agent workflows to orchestrate command execution and schema validation.
Standard API endpoint with robust JSON schema formatting capabilities.

## 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
- Identifies peptide length discrepancies between translated nucleotide sequences and RefSeq protein entries.
- Generates valid FHIR Observation resources with code system pointing to RefSeq accessions.
- Correctly flags premature termination codons inside prokaryotic CDS sequences.

## Starter Examples
```json
[
  {
    "input": {
      "accession": "WP_010890123.1",
      "gene_nt": "ATGAAACGTACTCTGGTATTGTCAGGTGCGATGACCATCGGTACTGGTCTGTAA",
      "protein_aa": "MKRTLVLSGAMTIGTGL"
    },
    "expected_output": {
      "status": "congruent",
      "accession": "WP_010890123.1",
      "nt_length": 54,
      "aa_length": 17,
      "length_match": true,
      "fhir_code": "WP_010890123.1"
    }
  },
  {
    "input": {
      "accession": "WP_010890999.1",
      "gene_nt": "ATGAAACGTACTCTGGTATAATCAGGTACTGGTCTGTAA",
      "protein_aa": "MKRTLVLSGAMTIGTGL"
    },
    "expected_output": {
      "status": "mismatch",
      "accession": "WP_010890999.1",
      "nt_length": 39,
      "aa_length": 17,
      "length_match": false,
      "internal_stop_codon": true,
      "fhir_code": "WP_010890999.1"
    }
  }
]
```

## Safety
Strictly for research microbiology and public bacterial data curation; excludes clinical pathogen diagnostics.
Use mock external writes. Require human review before any real deployment.