Skip to main content
Challenge

Build a Pydantic AI FHIR Observation Curation Pipeline for NCBI Datasets

Parse multi-transcript FASTA packages downloaded via NCBI Datasets. Evaluate coding sequence integrity and use Pydantic AI to map metrics into strongly typed FHIR R5 Observation JSON bundles.

Data ScienceHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Parse multi-transcript FASTA packages downloaded via NCBI Datasets. Evaluate coding sequence integrity and use Pydantic AI to map metrics into strongly typed FHIR R5 Observation JSON bundles.

Bioinformatics Data Curator

Ingest gene data package zip archives containing transcript and CDS sequences.

Parse FASTA sequence records using Biopython SeqIO to verify start codons and length multiples.

Map validated sequence features into FHIR R5 Observation components referencing NCBI gene identifiers using Pydantic AI.

Generate a validated JSON bundle with human-readable diagnostic summaries for cohort curation.

CLI tool that accepts gene FASTA archives and emits compliant FHIR R5 JSON bundles.

Download public gene packages using the NCBI Datasets CLI tool for non-clinical model organisms or reference genes. Starter examples below are synthetic. They are not downloaded records.

NCBI Datasets gene download Utilizes the NCBI Datasets gene data package archive structure containing gene, RNA, CDS, and protein FASTA sequences.

pydantic-ai, biopython. Pydantic AI guarantees type-safe validation when mapping sequence metrics into FHIR JSON schema specifications. Local or hosted LLM with structured output support via OpenAI-compatible or Anthropic API.

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.

Correctly parses multi-record CDS FASTA files and flags invalid frame lengths.

Maps gene IDs and transcripts to FHIR R5 Observation and DiagnosticReport JSON models using Pydantic AI.

Emits complete FHIR Bundles conforming to standard JSON serialization.

```json [ { "input": { "gene_id": "672", "fasta_header": "NM_007294.4 BRCA1 CDS [location=1..228]", "sequence": "ATGGATTTATCTGCTCTTCGCGTTGAAGAAGTACAAAATGTCATTAATGCTATGCAGAAAATCTTAGAGTGTCCCATCTGTCTGGAGTTGATCAAGGAACCTGTCTCCACAAAGTGTGACCACATATTTTGCAAATTTTGCATGCTGAAACTTCTCAACCAGAAGAAAGGGCCTTCACAGTGTCCTTTATGTAAGAATGATATAACCAAAAGGAGCCTACAAGAAAGTACGAGATTTAGTCAACTTGTTGAAGAGCTATTGAAAATCATTTGTGCTTTTCAGCTTGACACAGGTTTGGAGTATGCAAACAGCTATAATTTTGCAAAAAAGGAAAATAACTCTCCTGAACATCTAAAAGATGAAGTTTCTATCATCCAAAGTATGGGCTACAGAAACCGTGCCAAAAGACTTCTTACAGAAAGTGA" }, "expected_output": { "resourceType": "Observation", "status": "final", "code": { "coding": [ { "system": "https://www.ncbi.nlm.nih.gov/gene", "code": "672", "display": "BRCA1" } ] }, "valueQuantity": { "value": 435, "unit": "base pairs" }, "valid_open_reading_frame": true } }, { "input": { "gene_id": "672", "fasta_header": "NM_000000.1 Malformed", "sequence": "ATGGCCT" }, "expected_output": { "resourceType": "Observation", "status": "preliminary", "code": { "coding": [ { "system": "https://www.ncbi.nlm.nih.gov/gene", "code": "672", "display": "BRCA1" } ] }, "valueQuantity": { "value": 7, "unit": "base pairs" }, "valid_open_reading_frame": false } } ] ```

Research-only sequence curation tool. Contains simulated metadata without patient identifiers or diagnostic assertions. Output examples are simplified synthetic app records, not complete official schema files. Use mock external writes. Require human review before any real deployment.

Rules

Participation guide

Research-only sequence curation tool. Contains simulated metadata without patient identifiers or diagnostic assertions. Output examples are simplified synthetic app records, not complete official schema files. Use mock external writes and human review.

Delivery guide

How work is evaluated

Evaluation

Correctly parses multi-record CDS FASTA files and flags invalid frame lengths. Maps gene IDs and transcripts to FHIR R5 Observation and DiagnosticReport JSON models using Pydantic AI. Emits complete FHIR Bundles conforming to standard JSON serialization.

Submission format

Runnable source, pinned dependencies, setup commands, working interface, example outputs, recorded demo, tests, and action logs.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
4 scoring checks
Binary
1 pass or fail dimensions
Ordinal
3 scaled dimensions
Dimension 1

Complete workflow

Ingest gene data package zip archives containing transcript and CDS sequences. Parse FASTA sequence records using Biopython SeqIO to verify start codons and length multiples. Map validated sequence features into FHIR R5 Observation components referencing NCBI gene identifiers using Pydantic AI. Generate a validated JSON bundle with human-readable diagnostic summaries for cohort curation.

Score scale
012
Score 0

Missing or incorrect.

Score 1

Partly complete, with documented gaps.

Score 2

Complete, with reproducible evidence.

Dimension 2

Correctness and evidence

Correctly parses multi-record CDS FASTA files and flags invalid frame lengths. Maps gene IDs and transcripts to FHIR R5 Observation and DiagnosticReport JSON models using Pydantic AI. Emits complete FHIR Bundles conforming to standard JSON serialization.

Score scale
012
Score 0

Missing or incorrect.

Score 1

Partly complete, with documented gaps.

Score 2

Complete, with reproducible evidence.

Dimension 3

Review interface

CLI tool that accepts gene FASTA archives and emits compliant FHIR R5 JSON bundles.

Score scale
012
Score 0

Missing or incorrect.

Score 1

Partly complete, with documented gaps.

Score 2

Complete, with reproducible evidence.

Dimension 4

Safe execution

Research-only sequence curation tool. Contains simulated metadata without patient identifiers or diagnostic assertions. Output examples are simplified synthetic app records, not complete official schema files.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Ingest gene data package zip archives containing transcript and CDS sequences.

  • Parse FASTA sequence records using Biopython SeqIO to verify start codons and length multiples.

  • Map validated sequence features into FHIR R5 Observation components referencing NCBI gene identifiers using Pydantic AI.

  • Generate a validated JSON bundle with human-readable diagnostic summaries for cohort curation.

Resources and assets

Reference links and supporting material

Dataset notes

Download public gene packages using the NCBI Datasets CLI tool for non-clinical model organisms or reference genes. Supplied starter examples are synthetic, not source extracts.

Challenge setup

Configuration summary for this challenge.

Challenge input

Input details are not configured.

Pydantic AI

Typed Python agent framework.

Evaluated output

No output checks are configured.

Evaluation checks
  • Ingest gene data package zip archives containing transcript and CDS sequences. Parse FASTA sequence records...
  • Correctly parses multi-record CDS FASTA files and flags invalid frame lengths. Maps gene IDs and transcript...
  • CLI tool that accepts gene FASTA archives and emits compliant FHIR R5 JSON bundles.
Configured evaluation evidence
  • 2 public reference cases
Configured runtime
  • 2 configured tools

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Pydantic AI · Optional
Orchestration
  • Pydantic AI · Optional

Evaluation contract

  • Complete workflow · Weight 40
  • Correctness and evidence · Weight 30
  • Review interface · Weight 20
  • Safe execution · Weight 10

Reference cases

  • 2 public reference cases

Workflow tasks

No workflow tasks are configured.

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build a Pydantic AI FHIR Observation Curation Pipeline for NCBI Datasets