Run GPT on a metadata table.
gpt(
clusts,
label_var = "dataset",
cluster_var = "seurat_clusters",
terms_per_cluster = 5,
force_new = FALSE,
verbose = TRUE
)data.frame/data.table with the
per-cell metadata and cluster assignments.
Which cell metadata column to input to NLP analysis.
Which cell metadata column to use to identify which cluster each cell is assigned to.
The maximum number of words to return per cluster.
If NLP results are already detected the metadata,
set force_new=TRUE to replace them with new results.
Whether to print messages.
A data.table with GPT summaries per cluster.
# Show expected input format (API call not executed)
data("pseudo_seurat")
clusts <- pseudo_seurat[[]]
head(clusts[, c("celltype", "cluster")])
#> celltype cluster
#> human.DRONC_human.ASC1 ASC1 5
#> human.DRONC_human.ASC2 ASC2 5
#> human.DRONC_human.END END 9
#> human.DRONC_human.exCA1 exCA1 0
#> human.DRONC_human.exCA3 exCA3 0
#> human.DRONC_human.exDG exDG 0