Expanding canonical cortical cell type markers in the era of single-cell transcriptomics.
12 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 15 matches · 5 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
- [1] § Methods › Marker validation methods/generalizability › Single-cell leave-one-out clustering cross validation ↔ validation_scripts/LOO_cluster_subtype_dlPFC_canonical.R, the whole file · a weak match · score 0.93 · collapse duplicate edges, cluster_louvain, adjustedRandIndex, community detection, igraph, membership · block
oscr:b:699SZ1R1WPAE3-J· Report a mismatch - [2] § Methods › Marker validation methods/generalizability › Single-cell leave-one-out clustering cross validation ↔ validation_scripts/LOO_cluster_subtype_dlPFC_putative.R, the whole file · a weak match · score 0.93 · collapse duplicate edges, cluster_louvain, adjustedRandIndex, community detection, igraph, membership · block
oscr:b:1P53ZGTFS9YTF-2· Report a mismatch - [3] § Methods › Adjusted rand index ↔ Figure 1/Figure - 1A - plot - canonical DESeq2 heatmap.Rmd, lines 150 to 173 · score 0.86 · ward.D2, adjustedRandIndex, distance matrix, matrix columns, cutree, euclidean · block
oscr:b:78TXQSSFTAP13-H· Report a mismatch - [4] § Methods › Adjusted rand index ↔ Figure 2 - Putative Marker Facts/Figure - 2B, D.Rmd, lines 111 to 136 · score 0.84 · ward.D2, adjustedRandIndex, distance matrix, matrix columns, cutree, euclidean · block
oscr:b:2QGYVTPD30ZVC-Y· Report a mismatch - [5] § Methods › Gene-Ontology enrichment ↔ Figure 3 - Validations/Figure 3C - Markerlist GO analysis.Rmd, lines 16 to 72 · score 0.83 · enrichGO, pvalueCutoff, qvalueCutoff, Biological Processes, Ontology, enrichment · block
oscr:b:VX5G08FNWM2HM-F· Report a mismatch - [6] § Results › Regional variability of canonical cell type marker expression in the human brain ↔ CortexMapper V4/app.R, lines 2 to 76 · score 0.75 · CAMK2A, SLC1A2, SLC4A4, excitatory neurons, inhibitory neuron, MBP · block
oscr:b:A3FHQJKETBJ6N-D· Report a mismatch - [7] § Methods › Single-cell leave-one-out classification cross validation ↔ validation_scripts/LOO_classification_canonical.R, lines 43 to 117 · score 0.73 · cv.glmnet, macro F1, logistic, lambda, precision, recall · block
oscr:b:YDT95G9M11NH1-L· Report a mismatch - [8] § Results › Regional variability of canonical cell type marker expression in the human brain ↔ Figure 1/Step - 0.1. canonical marker hash generator.R, the whole file · a weak match · score 0.73 · APBB1IP, CSF1R, SLC4A4, AIF1, AQP4, MOG · block
oscr:b:BM8ZVAPC42GWD-3· Report a mismatch - [9] § Results › Regional variability of canonical cell type marker expression in the human brain ↔ Figure 1/Step - 0.1. canonical marker hash generator.R, the whole file · a weak match · score 0.72 · SLC1A2, SLC4A4, CAMK2A, MBP, PCDH15, PLP1 · block
oscr:b:BM8ZVAPC42GWD-3· Report a mismatch - [10] § Results › Regional variability of canonical cell type marker expression in the human brain ↔ CortexMapper V4/app.R, lines 2 to 76 · score 0.68 · APBB1IP, CSF1R, SLC4A4, AQP4, PDGFRA, AIF1 · block
oscr:b:A3FHQJKETBJ6N-D· Report a mismatch - [11] § Methods › Single-cell leave-one-out classification cross validation ↔ validation_scripts/LOO_classification_dlPFC_canonical.R, the whole file · a weak match · score 0.66 · cv.glmnet, macro F1, lambda, multinomial, classify, predict · block
oscr:b:E93YT9WX8WA1C-4· Report a mismatch - [12] § Results › Calculated marker set is generalizable across regions in classification and clustering tasks ↔ validation_scripts/LOO_classification_canonical.R, lines 43 to 117 · score 0.66 · multinomial logistic, macro F1, precision, recall, class, held · block
oscr:b:YDT95G9M11NH1-L· Report a mismatch - [13] § Results › Calculated marker set is generalizable across regions in classification and clustering tasks ↔ validation_scripts/LOO_classification_putative.R, lines 1 to 56 · score 0.54 · multinomial logistic, macro F1, classification, trained, accuracy, validated · block
oscr:b:SRKFTEJMJ6N99-O· Report a mismatch - [14] § Methods › Pseudo-bulk DE marker list generation framework › Global Cohen distance calculation ↔ CortexMapper V4/app.R, lines 157 to 216 · score 0.52 · Cohen distance, background thresholds, filtering, fidelity, metrics, canonical · block
oscr:b:MV7F6TKPK2D5W-H· Report a mismatch - [15] § Methods › Pseudo-bulk DE marker list generation framework › Global Cohen distance calculation ↔ Figure 2 - Putative Marker Facts/baseline.R, lines 103 to 188 · score 0.52 · background thresholds, log2FoldChange, Cohen, filtering, global, fidelity · block
oscr:b:RA7TE0W2MJV2M-X· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 594 lines · 20 KB · no license · 3 matches
- options(shiny.fullstacktrace = TRUE)
- options(shiny.maxRequestSize = 160*1024^2)
- options(shiny.error = traceback)
- suppressMessages(suppressWarnings(library(data.table)))
- suppressMessages(suppressWarnings(library(RColorBrewer)))
- suppressMessages(suppressWarnings(library(mclust)))
- suppressMessages(suppressWarnings(library(cluster)))
- suppressMessages(suppressWarnings(library(dendextend)))
- suppressMessages(suppressWarnings(library(Matrix)))
- suppressMessages(suppressWarnings(library(pheatmap)))
- suppressMessages(suppressWarnings(library(DT)))
- suppressMessages(suppressWarnings(library(Seurat)))
- suppressMessages(suppressWarnings(library(readxl)))
- suppressMessages(suppressWarnings(library(grid)))
- suppressMessages(suppressWarnings(library(gridExtra)))
- suppressMessages(suppressWarnings(library(cowplot)))
- suppressMessages(suppressWarnings(library(ggplot2)))
- suppressMessages(suppressWarnings(library(shiny)))
- suppressMessages(suppressWarnings(library(dplyr)))
- cell_names <- c("Astro", "Excite", "Inhibit", "Micro", "Oligo", "OPC")
- regions_to_avoid <- c("ACCK", "ACCV", "M1")
- # Define the UI (User Interface)
- ui <- fluidPage(
- titlePanel("Yi lab marker generator"),
- sidebarLayout(
- sidebarPanel(
- sliderInput("pvalue", "Maximum Adjusted p-value", min = 0, max = 0.25, value = 1, step = 0.01),
- sliderInput("FC", "Minimum Fold Change", min = 0, max = 4, value = 0, step = 0.1),
- sliderInput("spec", "Minimum Specificity value", min = 0, max = 1, value = 0, step = 0.01),
- textInput("Astro_markers", "Your choice of canonical Astrocyte markers", value = c("ALDH1L1, AQP4, GFAP, GJA1, SLC1A2, SLC4A4"), placeholder = "AQP4"),
- textInput("Excite_markers", "Your choice of canonical Excitatory Neuron markers", value = c("CAMK2A, SLC17A7, SATB2"), placeholder = "CAMK2A"),
- textInput("Inhibit_markers", "Your choice of canonical Inhibitory Neuron markers", value = c("GAD1, GAD2"), placeholder = "GAD1"),
- textInput("Micro_markers", "Your choice of canonical Microglia markers", value = c("AIF1, APBB1IP, CSF1R, CX3CR1, DOCK8, HLA-DRA, P2RY12, PTPRC, TYROBP"), placeholder = "APBB1IP"),
- textInput("Oligo_markers", "Your choice of canonical Oligodendrocyte markers", value = c("MBP, MOBP, MOG, OPALIN, PLP1, ST18"), placeholder = "MBP"),
- textInput("OPC_markers", "Your choice of canonical OPC markers", value = c("CSPG4, PCDH15, PDGFRA, VCAN"), placeholder = "PDGFRA"),
- numericInput("Frequency", "The number of times genes were observed", value = 5, min = 0),
- DTOutput("my_datatable"),
- actionButton("go",label = "Plot Data"),
- uiOutput("radio_matrix")
- ),
- mainPanel(
- tabsetPanel(
- tabPanel("Heatmap",
- uiOutput("plotContainer")),
- tabPanel("Marker lists",
- div(
- class = "table-container",
- DTOutput("gene_table")
- )),
- tabPanel("PCA plots",
- div(
- class = "table-container",
- # Adding a text input for the user to enter markers:
- textInput("markersText", "Enter markers (comma separated):",
- value = "GAD1, GAD2"),
- plotOutput("PCAplot", width = "300px", height = "300px")
- )),
- tabPanel("Regional gene rank",
- div(
- class = "table-container",
- textInput("rank_genes", "Gene", value = "PDGFRA", placeholder = "PDGFRA"),
- textInput("rank_cell_type", "Cell Type", value = "OPC", placeholder = "OPC"),
- DTOutput("ranking_table")
- ))
- )
- )
- )
- )
- # Define the server logic
- server <- function(input, output, session) {
- pct_metrics <- reactive({
- readRDS("source/all_pct_metrics_RN012.rds")
- })
- cell_counts <- reactive({
- read_excel("source/Supplementary Table 2B - postQC.xlsx")
- })
- filtered_DESeq_matrix <- reactive({
- readRDS("source/DESeq2_normalized_counts.rds")
- })
- df_merged <- reactive({
- readRDS("source/merged_gene_info.rds")
- })
- all_canonical_gene_list <- reactive({
- readRDS("source/pan_canonical_marker_list.rds")
- })
- vst_mat <- reactive({
- readRDS("source/vst_mat.rds")
- })
- PCA_seurat <- reactive({
- readRDS("source/final_seurat_object_RN012.rds")
- })
- v <- reactiveValues(data = {
- df <- data.frame(
- Astrocyte = c(80, 15, 2.25),
- Inhibitory = c(80, 15, 0),
- Excitatory = c(90, 5, 2),
- Microglia = c(95, 5, 4.5),
- Oligodendrocyte = c(95, 10, 1),
- OPC = c(90, 5, 2)
- )
- # fidelity_thresh <- list(80 , 80, 90 , 95 , 95, 90)
- # background_thresh <- list(15 , 15, 5 , 5 , 10, 5)
- # cohen_d_thresh <- list(2.25 , 0, 2 , 4.5, 1 , 2)
- row.names(df) <- c("Fidelity", "Background", "Cohen distance")
- df
- })
- #output the datatable based on the dataframe (and make it editable)
- output$my_datatable <- renderDT({
- DT::datatable(v$data, editable = TRUE)
- })
- # Define a reactive expression that returns multiple input values as a list
- user_inputs <- reactive({
- specificity_vector = input$spec
- log2FC_thresh = input$FC
- padj_thresh = input$pvalue
- frequency = input$Frequency
- Astro_markers = as.character(tstrsplit(input$Astro_markers, ", "))
- Excite_markers = as.character(tstrsplit(input$Excite_markers, ", "))
- Inhibit_markers = as.character(tstrsplit(input$Inhibit_markers, ", "))
- Micro_markers = as.character(tstrsplit(input$Micro_markers, ", "))
- Oligo_markers = as.character(tstrsplit(input$Oligo_markers, ", "))
- OPC_markers = as.character(tstrsplit(input$OPC_markers, ", "))
- rank_genes = input$rank_genes
- rank_cell_type = input$rank_cell_type
- all_canonical_gene_list = list(Astro_markers, Excite_markers, Inhibit_markers, Micro_markers, Oligo_markers, OPC_markers)
- names(all_canonical_gene_list) = cell_names
- #print(as.character(tstrsplit(input$Astro_markers, ", ")))
- fidelity_thresh = v$data["Fidelity", ]
- background_thresh = v$data["Background", ]
- cohen_d_thresh = v$data["Cohen distance", ]
- list(
- specificity_vector = specificity_vector,
- log2FC_thresh = log2FC_thresh,
- rank_genes = rank_genes,
- rank_cell_type = rank_cell_type,
- padj_thresh = padj_thresh,
- frequency = frequency,
- fidelity_thresh = fidelity_thresh,
- background_thresh = background_thresh,
- cohen_d_thresh = cohen_d_thresh,
- all_canonical_gene_list = all_canonical_gene_list
- )
- })
- observeEvent(input$my_datatable_cell_edit, {
- info <- input$my_datatable_cell_edit
- v$data[info$row, info$col] <- as.numeric(info$value)
- })
- cohen_d <- function(x, y) {
- nx <- length(x)
- ny <- length(y)
- pooled_sd <- sqrt(((nx - 1) * var(x) + (ny - 1) * var(y)) / (nx + ny - 2))
- (mean(x) - mean(y)) / pooled_sd
- }
- server <- function(input, output, session) {
- output$checkbox_matrix <- renderUI({
- rows <- lapply(1:4, function(i) {
- fluidRow(
- lapply(1:5, function(j) {
- column(
- width = 2, # to fit 5 checkboxes per row (12/5 ≈ 2)
- checkboxInput(
- inputId = paste0("check_", i, "_", j),
- label = paste("C", i, j),
- value = FALSE
- )
- )
- })
- )
- })
- tagList(rows)
- })
- }
- cell_specific_generate_gene_sets <- reactive({
- df_merged <- df_merged()
- pct_metrics <- pct_metrics()
- count_matrix <- filtered_DESeq_matrix()
- #all_canonical_gene_list <- all_canonical_gene_list()
- ui_vals <- user_inputs()
- all_canonical_gene_list <- ui_vals$all_canonical_gene_list
- print(all_canonical_gene_list)
- fidelity_thresh <- as.numeric(ui_vals$fidelity_thresh)
- background_thresh <- as.numeric(ui_vals$background_thresh)
- padj_thresh <- as.numeric(ui_vals$padj_thresh)
- log2FC_thresh <- ui_vals$log2FC_thresh
- cohen_d_thresh <- ui_vals$cohen_d_thresh
- frequency <- as.numeric(ui_vals$frequency) # Frequency is a string from textInput
- names(fidelity_thresh) <- cell_names
- names(background_thresh) <- cell_names
- names(cohen_d_thresh) <- cell_names
- # print(background_thresh[["Astro"]])
- # print(fidelity_thresh[["Astro"]])
- # Filter significant genes *per cell type* based on their thresholds
- df_merged_sig <- df_merged %>% rowwise() %>% filter(fidelity > fidelity_thresh[Cell],
- background < background_thresh[Cell],
- padj < padj_thresh,
- log2FoldChange > log2FC_thresh) %>% ungroup()
- df_merged_sig <- df_merged_sig[df_merged_sig$region %in% regions_to_avoid == FALSE, ]
- # print(nrow(df_merged_sig))
- #
- # # Top genes per Cell
- if (nrow(df_merged_sig) == 0) {
- top_genes <- data.frame(Cell = character(), gene = character(), freq = numeric())
- } else {
- top_genes <- df_merged_sig %>% group_by(Cell, gene) %>% summarise(freq = n(), .groups = "drop_last") %>% arrange(Cell, desc(freq)) %>% slice_max(order_by = freq, n = frequency, with_ties = FALSE)
- }
- # print(top_genes)
- # # Build subset count
- subset_count_matrix <- count_matrix[top_genes$gene, ]
- global_gene_set_results <- list()
- putative <- data.frame()
- canonical <- data.frame()
- # print(dim(subset_count_matrix))
- # Loop through cells
- for (cell in cell_names) {
- log2_filtered_TPM_matrix <- log2(subset_count_matrix + 1)
- current_count_matrix <- log2_filtered_TPM_matrix
- genes <- rownames(current_count_matrix)
- current_count_matrix_cell <- current_count_matrix[, tstrsplit(colnames(current_count_matrix), "_", fixed=TRUE)[[1]] == cell]
- current_count_matrix_BG <- current_count_matrix[, tstrsplit(colnames(current_count_matrix), "_", fixed=TRUE)[[1]] != cell]
- # print(dim(current_count_matrix_cell))
- # print(dim(current_count_matrix_BG))
- # Mann-Whitney U test
- p_values_mann <- sapply(genes, function(r) {
- test_result <- wilcox.test(current_count_matrix_cell[r, ], current_count_matrix_BG[r, ])
- test_result$p.value
- })
- adjusted_p_mann <- p.adjust(p_values_mann, method = "BH")
- # Cohen's d
- cohen_d_values <- sapply(genes, function(r) {
- cohen_d(current_count_matrix_cell[r, ], current_count_matrix_BG[r, ])
- })
- summary_table <- data.frame(
- row = genes,
- mean_A = sapply(genes, function(r) mean(current_count_matrix_cell[r, ])),
- mean_B = sapply(genes, function(r) mean(current_count_matrix_BG[r, ])),
- p_value = p_values_mann,
- adjusted_p = adjusted_p_mann,
- cohen_d = cohen_d_values
- )
- summary_table <- summary_table[summary_table$row %in% top_genes[top_genes$Cell == cell, ]$gene, ]
- summary_table$cell <- cell
- # Apply Cohen's d filter
- summary_table <- summary_table[summary_table$cohen_d > cohen_d_thresh[[cell]], ]
- global_gene_set_results[[cell]] <- summary_table$row
- #print(head(pct_metrics))
- # Collect putative & canonical
- putative <- rbind(putative, pct_metrics[pct_metrics$gene %in% global_gene_set_results[[cell]] & pct_metrics$cluster == cell, ])
- canonical <- rbind(canonical, pct_metrics[pct_metrics$gene %in% all_canonical_gene_list[[cell]] & pct_metrics$cluster == cell, ])
- }
- #print(str(gene_list_by_cell))
- list(global_gene_set_results = global_gene_set_results, putative = putative, canonical = canonical)
- })
- output$heatmapPlot <- renderPlot({
- gene_name_lists_by_cell <- cell_specific_generate_gene_sets()
- # mat <- matrix(rnorm(36), nrow = 6)
- # rownames(mat) <- paste0("Gene", 1:6)
- # colnames(mat) <- paste0("Sample", 1:6)
- #
- # # Plot a simple heatmap using base R
- # heatmap(mat,
- # main = "Debug Heatmap",
- # Colv = NA,
- # Rowv = NA,
- # scale = "row",
- # col = colorRampPalette(c("blue", "white", "red"))(50))
- # gene_name_lists_by_cell <- cell_specific_generate_gene_sets()
- # By index:
- global_gene_set_results <- gene_name_lists_by_cell$global_gene_set_results
- all_markers <- unique(unlist(global_gene_set_results))
- vst_mat <- vst_mat()
- common_gene_set <- unique(intersect(rownames(vst_mat), all_markers))
- plot_matrix <- vst_mat[common_gene_set, ]
- print(dim(plot_matrix))
- df_row <- data.frame(common_gene_set)
- rownames(df_row) <- common_gene_set
- colnames(df_row) <- "Marker"
- print(dim(df_row))
- inverse_gene_cell_hash <- list()
- for (key in names(global_gene_set_results)){
- for (gene in global_gene_set_results[[key]]){
- inverse_gene_cell_hash[[gene]] <- key
- }
- }
- print(length(names(inverse_gene_cell_hash)))
- for(marker in df_row$Marker){
- df_row[marker, "color"] <- paste0(inverse_gene_cell_hash[[marker]], " marker")
- }
- df_row <- df_row[-c(1)]
- df_col <- data.frame(tstrsplit(colnames(plot_matrix), "_")[[1]])
- rownames(df_col) <- colnames(plot_matrix)
- colnames(df_col) <- "Cell Type"
- # # Load RColorBrewer for color palettes
- #
- colors <- c("red", "green", "blue", "orange", "violet", "brown")#brewer.pal(6, "Set1")
- # Define your colors as a named vector
- color_vector <- c(
- "Astro marker" = colors[1],
- "Excite marker" = colors[2],
- "Inhibit marker" = colors[3],
- "Micro marker" = colors[4],
- "Oligo marker" = colors[5],
- "OPC marker" = colors[6])
- # Define your colors as a named vector
- cell_vector <- c(
- "Astro" = colors[1],
- "Excite" = colors[2],
- "Inhibit" = colors[3],
- "Micro" = colors[4],
- "Oligo" = colors[5],
- "OPC" = colors[6])
- annotation_colors <- list()
- annotation_colors$color <- as.factor(color_vector)
- annotation_colors$`Cell Type` <- as.factor(cell_vector)
- grid.newpage() # Start a new graphical page
- pheatmap_obj <- pheatmap(
- plot_matrix,
- cluster_rows = TRUE,
- cluster_cols = TRUE,
- show_rownames = TRUE,
- show_colnames = TRUE,
- annotation_col = df_col,
- annotation_row = df_row,
- annotation_colors = annotation_colors,
- fontsize_col = 7,
- fontsize_row = 10,
- fontsize = 25,
- cellwidth = 7,
- cellheight = 10,
- clustering_method = "ward.D2",
- legend = TRUE,
- color = colorRampPalette(c("blue", "white", "red"))(50),
- angle_col = 90)
- grid.draw(pheatmap_obj)
- })
- output$plotContainer <- renderUI({
- gene_name_lists_by_cell <- cell_specific_generate_gene_sets()
- global_gene_set_results <- gene_name_lists_by_cell$global_gene_set_results
- all_markers <- unique(unlist(global_gene_set_results))
- plotOutput("heatmapPlot", height = paste0(as.character(300 + 10*length(all_markers)), "px"), width = "2800px")
- #plotOutput("heatmapPlot", height = "500px", width = "500px")
- })
- # server.R (or inside your server function)
- output$PCAplot <- renderPlot({
- # 1. grab your Seurat object
- so <- PCA_seurat()
- # 2. split & trim your comma‐separated input
- genes <- trimws( unlist(strsplit(input$markersText, ",")) )
- # coords <- Embeddings(so, "pca")[, 1:2]
- # xlim_shared <- range(coords[,1])
- # ylim_shared <- range(coords[,2])
- # 3. make one FeaturePlot per gene
- gene_plots <- lapply(genes, function(g) {
- FeaturePlot(object = so, features = g, reduction = "pca", pt.size = 1.5, order = TRUE) +
- theme(plot.margin = unit(c(0,0,0,0), "cm"))
- })
- # 4. add your PCA clustering plot
- colors <- c("green", "blue", "red", "violet", "orange", "brown")
- p_cluster <- DimPlot(so, reduction = "pca", group.by = "cluster_id", pt.size = 1.5, cols = colors)
- all_plots <- c(gene_plots, list(p_cluster))
- # 5. arrange in a grid
- plot_grid(plotlist = all_plots, ncol = 4)
- },
- # DYNAMIC WIDTH: recalc whenever markersText changes
- width = 1350,
- height = function(){
- n <- length(trimws(unlist(strsplit(input$markersText, ","))))
- # e.g. allocate 600px per column (adjust to taste)
- (round((n)/4) + 1)*250
- }
- )
- # server.R (or inside your server function)
- output$barplot <- renderPlot({
- GLM <- run_GLM_analysis()
- GLM_results <- GLM$GLM_results
- ggplot(GLM_results, aes(cluster, odds_ratio, fill = metric)) + geom_bar(stat="identity", position = "dodge", width = 0.65) +
- labs(title="Multiple Bar plots") +
- geom_hline(yintercept = 1, linetype = "dashed",
- colour = "tomato", linewidth = 1.5) +
- scale_fill_manual(values = c("darkblue", "orange")) +
- xlab("Cell Type") + ylab("Odds Ratio") +
- theme_bw() +
- theme(axis.text.x = element_text(size = 20),
- axis.text.y = element_text(size = 20),
- axis.title.x = element_text(size = 20),
- axis.title.y = element_text(size = 20))},
- # DYNAMIC WIDTH: recalc whenever markersText changes
- width = 1200, height = 600
- )
- table_data <- reactive({
- gene_name_lists_by_cell <- cell_specific_generate_gene_sets()
- global_gene_set_results <- gene_name_lists_by_cell$global_gene_set_results
- all_markers <- unique(unlist(global_gene_set_results))
- df <- data.frame(
- Cell_Type = names(global_gene_set_results),
- Genes = sapply(global_gene_set_results, paste, collapse = ", "),
- Count = sapply(global_gene_set_results, length)# Convert to comma-separated strings
- )
- return(df) # Return the dataframe
- })
- canonical_gene_table_data <- reactive({
- ui_vals <- user_inputs()
- canonical_gene_set <- ui_vals$all_canonical_gene_list
- print(canonical_gene_set)
- #global_gene_set_results <- gene_name_lists_by_cell$global_gene_set_results
- #all_markers <- unique(unlist(global_gene_set_results))
- df <- data.frame(
- Cell_Type = names(canonical_gene_set),
- Genes = sapply(canonical_gene_set, paste, collapse = ", "),
- Count = sapply(canonical_gene_set, length)# Convert to comma-separated strings
- )
- return(df) # Return the dataframe
- })
- rank_table <- reactive({
- ui_vals <- user_inputs()
- canonical_gene_set <- ui_vals$all_canonical_gene_list
- print(canonical_gene_set)
- df_merged <- df_merged()
- #print(ui_vals)
- rank_genes <- ui_vals$rank_genes
- rank_cell_type <- ui_vals$rank_cell_type
- print(rank_genes)
- print(rank_cell_type)
- genes <- as.character(tstrsplit(rank_genes, ", "))
- print(genes)
- display_table <- df_merged[df_merged$gene %in% genes & df_merged$cluster == rank_cell_type, ]
- display_table <- display_table[order(display_table$gene, decreasing = FALSE), ]
- return(display_table) # Return the dataframe
- })
- output$gene_table <- renderDT({
- datatable(table_data(),
- options = list(autoWidth = TRUE, scrollX = TRUE, pageLength = 100),
- escape = FALSE) %>%
- formatStyle(
- columns = "Genes", # Replace with your column name
- whiteSpace = "normal",
- wordWrap = "break-word"
- )
- })
- output$Canonical_marker_table <- renderDT({
- datatable(canonical_gene_table_data(),
- options = list(autoWidth = TRUE, scrollX = TRUE),
- escape = FALSE) %>%
- formatStyle(
- columns = "Genes", # Replace with your column name
- whiteSpace = "normal",
- wordWrap = "break-word"
- )
- })
- output$ranking_table <- renderDT({
- print(rank_table())
- datatable(rank_table(),
- options = list(autoWidth = TRUE, scrollX = TRUE, pageLength = 100),
- escape = FALSE)
- })
- }
- shinyApp(ui = ui, server = server)
app.R at commit 2d23065, no license · at the source
Overview
- Department of Mechanical Engineering, University of California, Santa Barbara, 93106 USA
- Neuroscience Research Institute, University of California, Santa Barbara, 93106 USA
- Ecology, Evolution, and Marine Biology, University of California, Santa Barbara, 93106 USA
- Molecular, Cellular and Developmental Biology, University of California, Santa Barbara, 93106 USA
Abstract
Cell type markers have been instrumental to physiological and molecular investigation of the human brain and remain essential for annotating cell type clusters in single-cell expression data and for target validation studies. However, expression of canonical markers in the target cell type (which we termed as the expression ‘fidelity’) as well as expression in unrelated cell types (which we termed as the ‘background expression’) across cortical regions remains poorly characterized. Here, leveraging nearly 500,000 high-quality single-nucleus and single-cell profiles from 19 studies, we quantified marker fidelity, revealing substantial regional variability. We developed a statistical framework that aggregates annotated barcodes into pseudo-bulk profiles, applied rigorous performance metrics, and identified markers with high fidelity, low background, and consistent expression across regions. This approach extended the canonical marker set for six major brain cell types and yielded superior subtype-specific markers. The resulting marker lists, and a user-friendly analysis interface, provide a valuable resource for cell type annotation and validation in neuroscience research.
Supplementary Information: The online version contains supplementary material available at 10.1038/
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 15 matches between paragraphs and lines of code.
dmj6288/Expanding-canonical-cortical-cell-type-markers-in-the-era-of-single-cell-transcriptomics
2d2306504c9aec77600058e847ee25013cab1312, 3 September 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
49 files
- CortexMapper V4/
app.R , R, 594 lines, 3 matches - CortexMapper V4/
data table app.R , R, 75 lines - CortexMapper V4/
shinyappio.R , R, 6 lines - DEG_pipeline/
DE_test_parallel.R , R, 51 lines - DEG_pipeline/
config_parallel.R , R, 97 lines - DEG_pipeline/
marker_list.R , R, 48 lines - DEG_pipeline/
scAgg.R , R, 48 lines - DEG_pipeline/
sgmeta_full_covariates_p , R, 121 linesarallel.R - Figure 1/
Figure - 1A - plot - canonical DESeq2 heatmap.Rmd , R, 175 lines, 1 match - Figure 1/
Figure - 1B - plot - pct1 plot clusterwise fidelity in all regions - canonical.Rmd , R, 128 lines - Figure 1/
Figure - 1C - correlation between expression fidelity and background.Rmd , R, 135 lines - Figure 1/
Step - 0.1. canonical marker hash generator.R , R, 61 lines, 2 matches - Figure 1/
Step - 0.2 - data prep - pseudo_QC using single-cell counts.Rmd , R, 72 lines - Figure 1/
Step - 0.3 - data prep - finding common genes, global matrix columns, and metadata rows.Rmd , R, 215 lines - Figure 1/
Supplementary Figure - S1- plot - PCA plot of DESeq2 data.Rmd , R, 156 lines - Figure 1/
Table S2.1 - cell counter - supplementary table 2 sheet A - finding number of cells pre QC.Rmd , R, 63 lines - Figure 1/
Table S2.2 - cell counter - supplementary table 2 sheet B - finding number of cells post QC and studies to threshold by cell count.Rmd , R, 89 lines - Figure 1/
baseline.R , R, 115 lines - Figure 2 - Putative Marker Facts/
Figure - 2A - pct1 plot clusterwise fidelity in all regions - putative.Rmd , R, 197 lines - Figure 2 - Putative Marker Facts/
Figure - 2B, D.Rmd , R, 137 lines, 1 match - Figure 2 - Putative Marker Facts/
Figure - 2C - ROC curve plot.Rmd , R, 227 lines - Figure 2 - Putative Marker Facts/
Step 1 - calculating specificity and fidelity scores - DESeq2.Rmd , R, 215 lines - Figure 2 - Putative Marker Facts/
Step 2 - data prep for putative marker list thresholding.Rmd , R, 71 lines - Figure 2 - Putative Marker Facts/
Step 3 - Putative marker selection code.Rmd , R, 82 lines - Figure 2 - Putative Marker Facts/
baseline.R , R, 375 lines, 1 match - Figure 2 - Putative Marker Facts/
ranking_canonical_marker , R, 108 liness.Rmd - Figure 3 - Validations/
Figure - 3ABC - LOO clustering and classification - SEED.Rmd , R, 232 lines - Figure 3 - Validations/
Figure - 3ABC - LOO clustering and classification - pan.Rmd , R, 266 lines - Figure 3 - Validations/
Figure - 3ABC - LOO clustering and classification.Rmd , R, 139 lines - Figure 3 - Validations/
Figure 3ABC - rainclouds.Rmd , R, 135 lines - Figure 3 - Validations/
Figure 3C - Markerlist GO analysis.Rmd , R, 211 lines, 1 match - Figure 3 - Validations/
baseline.R , R, 82 lines - Figure 4 - Putative Subtype Marker Facts/
Figure 4C, D - subtype_validation_Ma.Rm , R, 77 linesd - Figure 4 - Putative Subtype Marker Facts/
Step - 2, Figure 4A, B - subtype putative marker generator.R , R, 171 lines - Figure 4 - Putative Subtype Marker Facts/
Step 1.2 - calculating specificity and fidelity scores - DESeq2.Rmd , R, 190 lines - Figure 4 - Putative Subtype Marker Facts/
Step 1.3 - pseudobulk QC.Rmd , R, 73 lines - Figure 4 - Putative Subtype Marker Facts/
Step 1.4 - pseudo_bulk_aggregator_s , R, 155 linesamplebased_filtering30.R md - Figure 4 - Putative Subtype Marker Facts/
baseline.R , R, 88 lines - Figure 4 - Putative Subtype Marker Facts/
subtype_validation_Ma.Rm , R, 203 linesd - validation_scripts/
LOO_classification_canon , R, 117 lines, 2 matchesical.R - validation_scripts/
LOO_classification_dlPFC , R, 73 lines, 1 match_canonical.R - validation_scripts/
LOO_classification_dlPFC , R, 73 lines_putative.R - validation_scripts/
LOO_classification_putat , R, 128 lines, 1 matchive.R - validation_scripts/
LOO_cluster_canonical.R , R, 74 lines - validation_scripts/
LOO_cluster_putative.R , R, 75 lines - validation_scripts/
LOO_cluster_subtype_dlPF , R, 86 lines, 1 matchC_canonical.R - validation_scripts/
LOO_cluster_subtype_dlPF , R, 86 lines, 1 matchC_putative.R - validation_scripts/
file_merge.R , R, 19 lines - Readme, Text, 26 lines
Code availability
The software pipeline used to perform this analysis is publicly available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 48 scripts, each with its path and the digest of its content;
- 15 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- figshare:29992147, at figshare; found in “Data availability”
Data Availability Statement
The full single-cell raw cortical count matrix (488,397 cells) and associated cell metadata compiled from all 19 datasets is a great resource to build and test cell classification algorithms and is made publicly available at: 10.6084/
The software pipeline used to perform this analysis is publicly available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 9 keywords, 8 MeSH terms, 4 funders, 55 references.
Cite
This paper
Joshy, D. M., & Yi, S. V. (2026). Expanding canonical cortical cell type markers in the era of single-cell transcriptomics. Scientific reports, 16(1), 24601. https://
BibTeX
@article{joshy2026expand
author = {Joshy, Dennis M and Yi, Soojin V},
title = {{Expanding canonical cortical cell type markers in the era of single-cell transcriptomics}},
journal = {Scientific reports},
year = {2026},
month = may,
volume = {16},
number = {1},
pages = {24601},
publisher = {Nature Publishing Group},
issn = {2045-2322},
doi = {10.1038/
url = {https://
pmid = {42168596},
pmcid = {PMC13454430}
}
RIS
TY - JOUR
AU - Joshy, Dennis M
AU - Yi, Soojin V
TI - Expanding canonical cortical cell type markers in the era of single-cell transcriptomics
T2 - Scientific reports
J2 - Sci Rep
PY - 2026
DA - 2026/
VL - 16
IS - 1
SP - 24601
SN - 2045-2322
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Expanding canonical cortical cell type markers in the era of single-cell transcriptomics",
"container-title": "Scientific reports",
"author": [
{
"family": "Joshy",
"given": "Dennis M"
},
{
"family": "Yi",
"given": "Soojin V"
}
],
"container-title-short":
"volume": "16",
"issue": "1",
"page": "24601",
"DOI": "10.1038/
"PMID": "42168596",
"PMCID": "PMC13454430",
"ISSN": "2045-2322",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
21
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1073/pnas.2411918121 [code]
- Accelerated cell-type-specific regulatory evolution of the human brain.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: SingleCellExperiment, rstatix, clusterProfiler, 9 other tools, genetics / omics, cellular / molecular, 8 references
- [2] doi:10.1038/s41467-023-38530-5 [code]
- Cell type specific transcriptomic differences in depression show similar patterns between males and females but implicate distinct cell types and genes.Journal: Nature communicationsIn common: SingleCellExperiment, rstatix, clusterProfiler, 10 other tools, genetics / omics, cellular / molecular, 6 references
- [3] doi:10.1016/j.cell.2025.06.031 [code]
- Single-cell multiregion epigenomic rewiring in Alzheimer's disease progression and cognitive resilience.Journal: CellIn common: SingleCellExperiment, rstatix, igraph, 8 other tools, genetics / omics, cellular / molecular, 6 references
- [4] doi:10.1093/molbev/msaf189 [code]
- A General Principle of Neuronal Evolution Reveals a Human-Accelerated Neuron Type Potentially Underlying the High Prevalence of Autism in Humans.Journal: Molecular biology and evolutionIn common: rstatix, DESeq2, igraph, 6 other tools, genetics / omics, cellular / molecular, 9 references
- [5] doi:10.1038/s41467-026-73305-8 [code]
- Comparative analysis of the cellular landscape in mammalian striatum.Journal: Nature communicationsIn common: SingleCellExperiment, clusterProfiler, DESeq2, 8 other tools, genetics / omics, cellular / molecular, 5 references
- [6] doi:10.1038/s41559-023-02186-7 [code]
- Comparative single-cell transcriptomic analysis of primate brains highlights human-specific regulatory evolution.Journal: Nature ecology & evolutionIn common: SingleCellExperiment, rstatix, DESeq2, 7 other tools, genetics / omics, cellular / molecular, 6 references
- [7] doi:10.1016/j.xgen.2025.101007 [code]
- Single-nucleus transcriptome atlas of orbitofrontal cortex in ALS with a deep learning-based decoding of alternative polyadenylation mechanisms.Journal: Cell genomicsIn common: SingleCellExperiment, DESeq2, igraph, 7 other tools, genetics / omics, cellular / molecular, 7 references
- [8] doi:10.1038/s41467-025-57027-x [code]
- Topological identification and interpretation for single-cell epigenetic regulation elucidation in multi-tasks using scAGDE.Journal: Nature communicationsIn common: SingleCellExperiment, clusterProfiler, DESeq2, 7 other tools, genetics / omics, cellular / molecular, 6 references
- [9] doi:10.24272/j.issn.2095-8137.2024.102 [code]
- Cross-species single-cell transcriptomics reveals neuronal similarities and heterogeneity in amniote pallium.Journal: Zoological researchIn common: clusterProfiler, igraph, pheatmap, 7 other tools, genetics / omics, cellular / molecular, 6 references
- [10] doi:10.1038/s44320-024-00074-1 [code]
- High order expression dependencies finely resolve cryptic states and subtypes in single cell data.Journal: Molecular systems biologyIn common: clusterProfiler, igraph, pheatmap, 7 other tools, genetics / omics, cellular / molecular, 6 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 48 scripts, and 15 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:47cb38f05525a4ac…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41598-026-51501-2)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41598-026-51501-2.svg
:target: https://openscicode.org/badge/doi/10.1038/s41598-026-51501-2
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41598-026-51501-2"><img src="https://openscicode.org/badge/doi/10.1038/s41598-026-51501-2.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
