library(Seurat) library(ggplot2) library(plotly) library(dplyr) library(colorspace) library(SeuratWrappers) library(dittoSeq)
What is the proportion of gamma-delta T cells, among all cells?
seurat_obj |> join_features( features = c("CD3D", "TRDC", "TRGC1", "TRGC2", "CD8A", "CD8B"), shape = "wide", assay = "SCT" ) |> mutate(signature_score = scales::rescale(CD3D + TRDC + TRGC1+ TRGC2, to=c(0,1)) - scales::rescale(CD8A + CD8B, to=c(0,1)) ) |> mutate(gate = tidygate::gate_int( UMAP_1, UMAP_2, .size = 0.1, .color =signature_score )) |> count(gate) %>% summarise(proportion = n/sum(n))
There is a cluster of cells characterised by a low RNA output (nCount_RNA). Use tidygate to identify the cell composition (curated_cell_type) of that cluster.
seurat_obj |> mutate(gate = tidygate::gate_int( UMAP_1, UMAP_2, .size = 0.1, .color =nCount_RNA )) %>% filter(gate==1) %>% count(curated_cell_type)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.