DOI: 10.5281/zenodo.13863910
title: scGPT: End-to-End Protocol for Fine-tuned Retina Cell Type Annotation

description: Abstract

Single-cell research faces challenges in accurately annotating cell types at high resolution, especially when dealing with large-scale datasets and rare cell populations. To address this, foundation models like scGPT offer flexible, scalable solutions by leveraging transformer-based architectures. This protocol provides a comprehensive guide to fine-tuning scGPT for cell-type classification in single-cell RNA sequencing (scRNA-seq) data. We demonstrate how to fine-tune scGPT on a custom retina dataset, highlighting the model’s efficiency in handling complex data and improving annotation accuracy achieving 99.5% F1-score. This protocol automates key steps, including data preprocessing, model fine-tuning, and evaluation. This protocol enables researchers to efficiently deploy scGPT for their own datasets. The provided tools, including a command-line script and Jupyter Notebook, simplify the customization and exploration of the model, proposing an accessible workflow for users with minimal Python and Linux knowledge. The protocol offers an off-the-shell solution of high-precision cell-type annotation using scGPT for researchers with intermediate bioinformatics.
description: File Description

TRAIN_snRNA2_9M.h5ad

Training dataset that is splitted from 9 : 1 ratio of original dataset. 

n_obs × n_vars = 1327511 × 36601

EVAL_snRNA_ac_enriched.h5ad

Evaluation dataset that is AC (Amacrine cell) enriched. 

n_obs × n_vars = 7070 × 36601

EVAL_snRNA_bc_enriched.h5ad

Evaluation dataset that is BC (Bipolar Cell) enriched. 

n_obs × n_vars = 27293 × 36601

EVAL_snRNA_rgc_enriched.h5ad

Evaluation dataset that is RGC (Retinal ganglion cell) enriched. 

n_obs × n_vars = 7681 × 36601

EVAL_snRNA_no_enriched.h5ad

Evaluation dataset without any enrichment. The majority of cells are ROD. 

n_obs × n_vars = 11977 × 36601

EVAL_snRNA_amd_sample1.h5ad

Evaluation dataset that is a Age-related Macular Degeneration (AMD) sample. 

n_obs × n_vars = 9583 × 36601

EVAL_snRNA_amd_sample2.h5ad

Evaluation dataset that is a Age-related Macular Degeneration (AMD) sample. 

n_obs × n_vars = 11471 × 36601

EVAL_snRNA_public_karthik.h5ad

Evaluation dataset that is from Hahn et al.

n_obs × n_vars = 4803 × 36601

EVAL_BC_class.h5ad

Evaluation dataset that contains all BCs from all 7 evaluation datasets

n_obs × n_vars = 16167 × 36601

EVAL_AC_class.h5ad

Evaluation dataset that contains all ACs from all 7 evaluation datasets

n_obs × n_vars = 26382 × 36601

EVAL_RGC_class.h5ad

Evaluation dataset that contains all RGCs from all 7 evaluation datasets

n_obs × n_vars = 13938 × 36601

EVAL_HC_class.h5ad

Evaluation dataset that contains all HCs from all 7 evaluation datasets

n_obs × n_vars = 366 × 36601

EVAL_Astrocyte_class.h5ad

Evaluation dataset that contains all Astrocytes from all 7 evaluation datasets

n_obs × n_vars = 50 × 36601

EVAL_Cone_class.h5ad

Evaluation dataset that contains all Cones from all six evaluation datasets

n_obs × n_vars = 2695 × 36601

EVAL_MG_class.h5ad

Evaluation dataset that contains all MGs from all six evaluation datasets

n_obs × n_vars = 1429 × 36601

EVAL_Microglia_class.h5ad

Evaluation dataset that contains all Microglias from all six evaluation datasets

n_obs × n_vars = 79 × 36601

EVAL_Rod_class.h5ad

Evaluation dataset that contains all Rods from all six evaluation datasets

n_obs × n_vars = 18627 × 36601

EVAL_RPE_class.h5ad

Evaluation dataset that contains all RPEs from all six evaluation datasets

n_obs × n_vars = 48 × 36601

Fine-tuned Model

finetuned_AiO.zip

AiO stands for All-in-One. This zip file contains:



vocab.jsonGene vocabulary dictionary

id2type.jsonCell ID-to-type mapping

best_model.ptFine-tuned model file

dev_train_args.ymlModel configuraion file that can be inherited

run.logTraining logs for the model

README.mdImportant instructions if using this fine-tuned model