Skip to main content
Loading navigation
Back to prompt library

Build a Gene Package CDS Extraction and Reading Frame Evaluator — implementation

Linked challenge: Build a Gene Package CDS Extraction and Reading Frame Evaluator

Prompt source

implementation63 lines11 sectionsNo variables1 code block
## Build
Process gene data packages containing CDS and protein fasta files to verify translation coordinates. Compare Biopython translation products with expected NCBI RefSeq protein records.

## User
Bioinformatics Assay Specialist

## Workflow
1. Download or mock NCBI Datasets gene data packages with gene, CDS, and protein records.
2. Extract coding sequences and translate nucleotides to amino acids using Biopython.
3. Compare translated sequence with provided protein accessions to detect truncation or mismatches.
4. Produce a structured JSON report documenting codon discrepancies and translation fidelity.

## Interface
Command-line tool generating summary JSON and markdown verification tables.

## Data
Execute 'datasets download gene gene-id 672 --include cds,protein' to get reference files, or use local mock fixtures.
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 CDS and protein files specifically from NCBI Datasets packages using the --include flag specification.

## Tools
mlflow, biopython, click.
MLflow tracks translation fidelity experiments, parameter runs, and discrepancy metrics across gene packages.
None mandatory; rule-based sequence logic with optional local LLM for mutation discrepancy annotation.

## 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
- Translates CDS sequences using standard genetic codes in Biopython.
- Identifies premature stop codons and mismatching translation products.
- Logs experiment runs and discrepancy counts to an MLflow tracking server.

## Starter Examples
```json
[
  {
    "input": {
      "gene_symbol": "TEST1",
      "cds_seq": "ATGGCCAACGTCTAA",
      "expected_protein": "MANV"
    },
    "expected_output": {
      "match": true,
      "translated_protein": "MANV*",
      "premature_stop": false,
      "discrepancies": []
    }
  },
  {
    "input": {
      "gene_symbol": "TEST2",
      "cds_seq": "ATGTAACCAACGTCTAA",
      "expected_protein": "MANV"
    },
    "expected_output": {
      "match": false,
      "translated_protein": "M*PT",
      "premature_stop": true,
      "discrepancies": [
        "Stop codon at residue 2"
      ]
    }
  }
]
```

## Safety
Analytical translation verification pipeline operating on non-clinical biological sequences.
Use mock external writes. Require human review before any real deployment.