Skip to main content
Loading navigation

Build an NCBI Gene Package RefSeq Annotation and Semantic Kernel Indexer — implementation

Prompt source

implementation69 lines11 sectionsNo variables1 code block
## Build
Extract gene metadata and RefSeq accession catalogs from NCBI Datasets archive packages. Build an index of functional annotations and link them to FHIR DiagnosticReport resources.

## User
Genomics Research Engineer

## Workflow
1. Extract gene data packages containing gene, RNA, and protein accessions.
2. Parse accession mappings across eukaryotic transcript isoforms.
3. Index functional definitions using Semantic Kernel connectors.
4. Export FHIR R5 DiagnosticReport resources summarizing transcript catalog status.

## Interface
Console-based search and export tool producing FHIR DiagnosticReport packages.

## Data
Fetch reference gene metadata via NCBI Datasets CLI using command 'datasets download gene gene-id 1 2 3'.
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 accession arguments (RefSeq nucleotide and protein accessions) to extract transcript structures.

## Tools
semantic-kernel, biopython, pydantic.
Semantic Kernel enables structured plugin skills to orchestrate multi-step data transformation and search indexing.
Hosted Claude or OpenAI model through Semantic Kernel native connector.

## 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
- Successfully parses NCBI Datasets data package reports into accession tables.
- Semantic Kernel skills accurately categorize RefSeq NM_ and NP_ identifiers.
- Generates FHIR DiagnosticReport objects linked to specific gene IDs.

## Starter Examples
```json
[
  {
    "input": {
      "gene_id": "2",
      "symbol": "A2M",
      "transcripts": [
        "NM_000014.6"
      ],
      "proteins": [
        "NP_000005.3"
      ]
    },
    "expected_output": {
      "report_id": "REP-GENE-2",
      "matched_accessions": 2,
      "indexing_status": "INDEXED",
      "transcript_count": 1,
      "protein_count": 1
    }
  },
  {
    "input": {
      "gene_id": "999999",
      "symbol": "UNKNOWN",
      "transcripts": [],
      "proteins": []
    },
    "expected_output": {
      "report_id": "REP-GENE-999999",
      "matched_accessions": 0,
      "indexing_status": "EMPTY_CATALOG",
      "transcript_count": 0,
      "protein_count": 0
    }
  }
]
```

## Safety
Designed solely for reference genome sequence indexing without clinical diagnosis or therapeutic intent.
Use mock external writes. Require human review before any real deployment.