Sex- and age-specific development of ssRNA virus receptor expression in the human brain.
The 26 matches
- [1] § Methods › Virus family enrichment across trajectory clusters ↔ byan2/Code/Figure 4.Rmd, lines 1604 to 1748 · score 0.86 · global family frequency, strong enrichment, global distribution, modest, permuting, virus family · Report a mismatch
- [2] § Methods › Cell-type fidelity analysis ↔ byan2/Code/Figure 5.Rmd, lines 1000 to 1079 · score 0.86 · temporal cortex, Fidelity scores, cortical area, frontal, occipital, parietal · Report a mismatch
- [3] § Methods › Cell-type fidelity analysis ↔ byan2/Code/Supplementary Figure 9.Rmd, lines 1002 to 1081 · score 0.86 · temporal cortex, Fidelity scores, cortical area, frontal, occipital, parietal · Report a mismatch
- [4] § Methods › Analysis of virus receptor lifespan trajectories ↔ byan2/Code/Figure 2.Rmd, lines 194 to 284 · score 0.78 · ward.D2, Euclidean distance, cluster sum, hierarchically clustered, squares, optimal · Report a mismatch
- [5] § Methods › Analysis of virus receptor lifespan trajectories ↔ byan2/Code/Supplementary Figure 7.Rmd, lines 197 to 289 · score 0.78 · ward.D2, Euclidean distance, cluster sum, hierarchically clustered, squares, optimal · Report a mismatch
- [6] § Methods › Analyzing the high-dimensional pattern of virus receptor development among brain areas ↔ byan2/Code/Figure 2.Rmd, lines 342 to 382 · score 0.77 · dens_frac, dens_lambda, t-SNE, brain area sex, perplexity, seeds · Report a mismatch
- [7] § Methods › Analyzing the high-dimensional pattern of virus receptor development among brain areas ↔ byan2/Code/Supplementary Figure 7.Rmd, lines 332 to 372 · score 0.77 · dens_frac, dens_lambda, t-SNE, brain area sex, perplexity, seeds · Report a mismatch
- [8] § Methods › Human transcriptomic dataset ↔ byan2/Code/Figure 1.Rmd, lines 496 to 555 · score 0.72 · tissue sample, AMY, CBC, HIP, MD, hemispheres · Report a mismatch
- [9] § Methods › Human transcriptomic dataset ↔ byan2/Code/Figure 2.Rmd, lines 385 to 432 · score 0.72 · subcortical areas, AMY, CBC, HIP, MD, DFC · Report a mismatch
- [10] § Methods › Virus family enrichment across trajectory clusters ↔ byan2/Code/Figure 4.Rmd, lines 1604 to 1748 · score 0.71 · Jensen Shannon, virus family annotations, divergence, gene area, global, enrichment · Report a mismatch
- [11] § Methods › Differential expression-sliding window analysis (DE-SWAN) ↔ byan2/Code/Supplementary Figure 8.rmd, lines 509 to 648 · score 0.68 · Benjamini Hochberg procedure, window center, DE SWAN, heatmap, LOESS, ages · Report a mismatch
- [12] § Methods › Random Forest model ↔ byan2/Code/Figure 3.Rmd, lines 383 to 453 · score 0.66 · randomForest, accuracy, train, seeds, model, predict · Report a mismatch
- [13] § Results › Prenatal cortical virus receptor expression is predominantly male-biased ↔ byan2/Code/Figure 6.Rmd, lines 1548 to 1628 · score 0.64 · female biased expression, cortical virus receptor, sex biases, Figure 6, prenatal, genes · Report a mismatch
- [14] § Results › Sex differences in virus receptor development are most pronounced in the cortex ↔ byan2/Code/Supplementary Figure 7.Rmd, lines 375 to 427 · score 0.61 · subcortical areas, den, AMY, CBC, HIP, MD · Report a mismatch
- [15] § Results › Sex differences in virus receptor development are most pronounced in the cortex ↔ byan2/Code/Figure 2.Rmd, lines 385 to 432 · score 0.60 · subcortical areas, AMY, CBC, HIP, MD, SNE · Report a mismatch
- [16] § Methods › Random Forest model ↔ byan2/Code/Supplementary Figure 2.Rmd, lines 361 to 480 · score 0.59 · LOESS fitted, gene area combinations, LOESS curves, iteration, seeds, model · Report a mismatch
- [17] § Methods › Human transcriptomic dataset ↔ byan2/Code/Kang Data Cleaning.Rmd, lines 57 to 74 · score 0.58 · tissue samples, Affymetrix, exon, Gene Expression, Probe, transcriptomic · Report a mismatch
- [18] § Methods › Human transcriptomic dataset ↔ byan2/Code/Figure 1.Rmd, lines 1585 to 1640 · score 0.57 · Fr chet distances, area trajectory pairs, male gene, fitted, Figure 1, LOESS · Report a mismatch
- [19] § Results › Selective cell-type associations characterize a subset of DE-SWAN clusters ↔ byan2/Code/Figure 5.Rmd, lines 1277 to 1348 · score 0.55 · DE SWAN clusters, unpaired median, confidence intervals, oligodendrocytes, Lollipop, neurons · Report a mismatch
- [20] § Results › Cortical virus receptor expression predicts sex at the individual level ↔ byan2/Code/Figure 3.Rmd, lines 513 to 603 · score 0.55 · decision boundary, Random Forest, probability, predict, classification, smoothed · Report a mismatch
- [21] § Results › Cortical virus receptor expression predicts sex at the individual level ↔ byan2/Code/Figure 3.Rmd, lines 513 to 603 · score 0.54 · decision boundary, RF, probabilities, SD, prediction, classification · Report a mismatch
- [22] § Methods › Analysis of virus receptor lifespan trajectories ↔ byan2/Code/Supplementary Figure 6.Rmd, lines 780 to 811 · score 0.53 · Hodges Lehmann, cluster distance, analytic, median · Report a mismatch
- [23] § Methods › Analysis of virus receptor lifespan trajectories ↔ byan2/Code/Supplementary Figure 2.Rmd, lines 361 to 480 · score 0.52 · fitting LOESS curves, nesting, Gaussian, log2, model, family · Report a mismatch
- [24] § Results › Dynamic sex-by-age patterns of virus receptor expression in the cortex ↔ byan2/Code/Figure 4.Rmd, lines 1520 to 1602 · score 0.52 · DE SWAN cluster, virus families, Hierarchical clustering, Stacked, compositions, Figure 4 · Report a mismatch
- [25] § Methods › Analysis of virus receptor lifespan trajectories ↔ byan2/Code/Supplementary Figure 2.Rmd, lines 517 to 561 · score 0.51 · Fr chet distance, male trajectories, iteration, simulated, female, gene · Report a mismatch
- [26] § Results › Prenatal expression of Zika virus candidate entry receptors ↔ byan2/Code/Figure 6.Rmd, lines 1548 to 1628 · score 0.50 · female biased, confidence intervals, sex biased, Virus receptor, Figure 6, median · 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 Markdown · 749 lines · 25 KB · no license · 4 matches
- ---
- title: |
- | Sex- and Age-Specific Development of ssRNA Virus Receptor Expression in the Human Brain
- subtitle: |
- Figure 2 A-D: High-dimensional Visulization of Developmental Trajectories
- | *Markdown correspondence: [email hidden]
- author: |
- | Leanne Monteiro, Negeen Halabian, Jiawei Li, Kathryn M. Murphy*
- date: "`r Sys.Date()`"
- output:
- pdf_document: default
- ---
- ```{r setup, include=FALSE}
- knitr::opts_chunk$set(echo = TRUE)
- ```
- # Load Packages
- ```{r, message=FALSE, warning=FALSE}
- # Data Manipulation Libraries
- library(tidyverse) # A collection of packages for data manipulation and visualization
- library(data.table) # Provides an efficient way to handle and manipulate large data sets
- library(magrittr) # For the pipe operator (%>%)
- # Load libraries for graphics and visualization
- library(ggplot2) # Base package for data visualization
- library(ggforce) # For the facet_wrap_paginate() function
- library(gridExtra) # Arranging ggplot objects on a grid, e.g., grid.arrange()
- library(RColorBrewer) # For generating attractive color palettes
- library(here) # For reading in data from directory
- library(factoextra) # For creating and visualizing dendrograms
- library(densvis) # For visualizing densities
- # Additional Tools and Utilities
- library(R.devices) # For saving plots with different graphical devices
- library(elbow) # For finding the elbow point in a plot
- library(pathviewr) # For visualizing the elbow point in a plot
- library(patchwork) # The composer of plots
- library(cowplot) # Streamlined Plot Theme and Plot Annotations for 'ggplot2'
- ```
- ```{r, echo=FALSE, include=FALSE}
- # Define import and export file paths
- import.path <- here::here("data")
- export.path <- here::here("plots")
- ```
- # Preparing the Data
- ```{r, message=FALSE, warning=FALSE}
- # Load in the gene names that was used for the gene/brain area analysis
- virus.gene.list <-
- read_csv(here::here(import.path, "Human_2023_virus_gene_receptors.csv"))
- # Load the raw Kang data
- Kang.df <- fread(here::here(import.path, "Kang Data 17528 genes 1340 cases.csv"),
- data.table = FALSE) %>%
- dplyr::rename(Area = Region) # Rename Region as Brain Area
- # Extract and deduplicate gene names
- gene.list <- virus.gene.list %>%
- select("Gene") %>%
- unlist() %>%
- as.vector() %>%
- unique()
- # Specify the areas
- area<-c("VFC", "DFC" ,"MFC" ,"OFC","M1C" ,"S1C" ,"IPC" ,"STC" ,
- "A1C" ,"ITC" ,"V1C" ,"MD" ,"CBC" ,"HIP" ,"AMY")
- # Specify the cell type (used for naming output files)
- cell.type <- "Genes"
- # Decide whether to use the default span value (0.75)
- # If FALSE, the mean span value will be calculated and used instead
- include.prenatal <- FALSE
- # Filter and retain only relevant genes from the 'gene.list'
- gene.list <- intersect(gene.list, colnames(Kang.df)[21:ncol(Kang.df)])
- num.genes <- length(gene.list)
- ```
- \newpage
- # Hierarchical Clustering on Brain Areas for Each Sex
- ## Data Preparation
- ```{r DataPreparation, message=FALSE, warning=FALSE}
- # Define identifier columns from the original Kang dataset to retain
- identifiers <- c("Sample","Sex", "Area", "Years")
- # Specify the number of points/ages to extract for each curve
- num.points <- 128
- # Select relevant columns
- gene.exp <- Kang.df %>%
- select(all_of(identifiers), all_of(gene.list)) %>%
- # Convert gene expression values to numeric
- mutate_at(gene.list, as.numeric) %>%
- # Retain only selected brain areas
- filter(Area %in% area) # use %in% instead of == when you have multiple areas
- # Adjust for prenatal and postnatal samples
- if (!include.prenatal) {
- # If include.prenatal is FALSE, keep only postnatal samples
- gene.exp <- gene.exp %>%
- filter(Years > 0)
- } else {
- # If include.prenatal is TRUE, add 40/52 to the 'Years' column to get rid of
- # negative values
- gene.exp <- gene.exp %>%
- mutate(Years = Years + 40/52)
- }
- #### Quality Control Checks
- # Check if there are duplicate gene labels
- # if yes, throw error and return name of duplicates
- if (identical(colnames(gene.exp), unique(colnames(gene.exp))) == FALSE) {
- stop(paste("Data contains duplicate gene labels. The following gene has a duplicate:",
- colnames(gene.exp)[duplicated(colnames(gene.exp))]))
- }
- # Check if there are any NA values
- # if yes, throw error and return name of gene/column with NA
- if (sum(is.na(gene.exp)) > 0) {
- stop(paste("Data contains NA values in the following columns:",
- colnames(gene.exp)[colSums(is.na(gene.exp)) > 0]))
- }
- #### Z-score normalization
- gene.exp.zscore <- gene.exp %>%
- mutate_at(gene.list, scale)
- # Get long version of z-scored data
- gene.exp.zscore.long <- gene.exp.zscore%>%
- pivot_longer(cols = all_of(gene.list),
- names_to = "Gene",
- values_to = "Expression")
- ```
- ## Calculating the LOESS Fitted Values
- ```{r, message=FALSE, warning=FALSE}
- # Group data by Gene, Sex, and Area and nest the data for each group
- gene.exp.zscore.loess <- gene.exp.zscore.long %>%
- group_by(Gene, Sex, Area) %>%
- nest() %>%
- # Fit a LOESS model for each group, smoothing expression as a function of log2(Years)
- mutate(loess.model =
- purrr::map(.x = data, ~loess(.x,
- formula = Expression ~log2(Years),
- span = 0.75,
- degree = 2,
- family = "gaussian",
- control =
- loess.control(surface = "interpolate")))) %>%
- # Determine min and max age value for each LOESS curve
- mutate(min = purrr::map(.x = data, .f = ~min(log2(0.5))),
- max = purrr::map(.x = data, .f = ~max(log2(64)))) %>%
- unnest(min) %>% unnest(max) %>%
- # Create a vector of log2 age values for each LOESS curve
- mutate(age.values =
- map2(.x = min, .y = max, ~seq(.x, .y, (.y - .x)/(num.points-1)))) %>%
- # Extract fitted expression values from the LOESS model along the specified age values
- mutate(fitted.values = map2(.x = loess.model,
- .y = age.values,
- # Reverse log2 transformation to get actual Years
- ~data.frame("Years" = 2^(.y),
- "Expression" = predict(.x, newdata = .y))))
- # Create a data frame including only the fitted values of the LOESS curves of
- # the z-scored data, including columns for Gene, Sex, and Race
- gene.exp.zscore.loess.fitted <- gene.exp.zscore.loess %>%
- select(Gene, Sex, Area, fitted.values) %>% # Select necessary columns
- unnest(cols = c(fitted.values)) # Unnest the fitted values into separate rows
- # Unite the Years and Gene columns,
- # Area and Sex columns into a single column for following analysis
- gene.exp.zscore.loess.fitted <- gene.exp.zscore.loess.fitted %>%
- unite("Gene", c("Gene","Years"), sep = "_") %>%
- unite("Area", c("Area", "Sex"), sep="_")
- # Convert the data frame to wide format (one column per Gene_Sex_Area)
- # and remove rows with any missing (N/A) values
- wide.zscore.loess.fitted <- gene.exp.zscore.loess.fitted %>%
- spread(key = Gene, value = Expression) %>%
- drop_na()
- ```
- \newpage
- ## Performing Hierarchical Clustering on Area-Sex
- ```{r, message=FALSE, warning=FALSE}
- #===============#
- # Set Parameters
- #===============#
- # Rename columns for easier processing
- df.elbow <- wide.zscore.loess.fitted %>% column_to_rownames(var = "Area")
- # Calculate the within-cluster sum of squares (WSS) for multiple number of clusters
- nb_data <- fviz_nbclust(df.elbow, hcut,
- method = c("wss"),
- k.max = 15,
- verbose = TRUE)
- # Get the within-cluster sum of squares number and cluster size
- wss_values<- nb_data$data$y
- cluster_sizes <- 1:length(wss_values)
- # Create a dataframe with cluster sizes and WSS values
- df <-as.data.frame(cbind (cluster_sizes,wss_values))
- #============#
- # Elbow Plot
- #============#
- # We use 2 different elbow method pacakges to confirm the optimal number of clusters
- # Plot elbow graph to identify optimal number of clusters
- # Print the number of clusters
- num.clusters <- find_curve_elbow(df, plot_curve = FALSE)
- num.clusters
- # Create a data frame with only loess values for the elbow plot
- elbow.plot <- fviz_nbclust(df.elbow, hcut, method = "wss", diss = NULL,
- k.max = 15)+
- geom_vline(xintercept = num.clusters, linetype = 2) + #sets x intercept
- theme(axis.text.x = element_text(size=10,angle = 90, vjust = 0.5))
- # Print elbow plot
- elbow.plot
- #========================#
- # Hierarchical Clustering
- #========================#
- # Create data frame for Hclust
- all.loess.hclust <- wide.zscore.loess.fitted %>% column_to_rownames(var = "Area")
- # Calculate Euclidean distance and perform hierarchical clustering
- distance.row <- dist(all.loess.hclust,
- method = "euclidean")
- # Set seed
- set.seed(123)
- cluster.row <- hclust(distance.row,
- method = "ward.D2")
- # Cut the tree into k clusters and get the region clusters
- region.cluster <- cutree(cluster.row, k = num.clusters)
- # Assign the names to the clusters, store clusters in 'loess.cluster.members'
- assign("loess.cluster.members", split(names(region.cluster), region.cluster))
- #============#
- # Dendrogram
- #============#
- # Create vector of colours to use for figures
- colours <- c("#990099CC","#00DEA3", "#F7D823", "#F88800","#6693DE")
- # Create dendrogram
- dendrogram <- fviz_dend(cluster.row, k = num.clusters,
- cex = 1, # Label size
- horiz = FALSE,
- k_colors = colours,
- color_labels_by_k = TRUE, # Color labels by groups
- rect=TRUE, rect_border="black", rect_lty = 1,
- ggtheme = theme_classic(), # Change theme
- labels_track_height = 25,
- main = NULL) +
- theme(axis.title.y = element_text(size=20),
- axis.text.y = element_text(size=15),
- axis.ticks = element_line(size=1),
- axis.ticks.length.y = unit(0.25, "cm"),
- plot.margin = margin(0, 10, 20, 10)
- )
- # Print Dendrogram
- dendrogram
- ```
- ```{r, include=FALSE, echo=FALSE}
- # Save plot
- devEval(type = "tiff",
- path = paste(export.path, "Fig 2", sep = "/"),
- name = str_trim(paste("Dendrogram for", num.genes,"Genes-", num.clusters,
- "Clusters", ifelse(include.prenatal, "(Prenatal)", ""))),
- height = 9, width = 15, res=300, units ="in",
- expr = {
- print(dendrogram)
- }
- )
- ```
- \newpage
- # Dense tSNE visualization of the brain areas
- ```{r, message=FALSE, warning=FALSE}
- # Define breaks for labeling age
- mybreaks <- c(0.5, 1, 2, 4, 8, 16, 32, 64)
- # Create custom color palette to match the area clusters
- # Determined by hierarchical clustering
- custom_palette <- c(
- "CBC_F" = "#990099CC","CBC_M" = "#990099CC",
- "STC_F" = "#F88800", "OFC_F" = "#F88800", "M1C_F" = "#F88800",
- "V1C_F" = "#F88800", "IPC_F" = "#F88800", "ITC_F" = "#F88800", "DFC_F" = "#F88800",
- "A1C_F" = "#F88800", "S1C_F" = "#F88800", "MFC_F" = "#F88800", "VFC_F" = "#F88800",
- "MD_F" = "#F7D823", "MD_M" = "#F7D823",
- "STC_M" = "#00DEA3", "OFC_M" = "#00DEA3", "M1C_M" = "#00DEA3", "V1C_M" = "#00DEA3",
- "IPC_M" = "#00DEA3", "ITC_M" = "#00DEA3", "DFC_M" = "#00DEA3", "A1C_M" = "#00DEA3",
- "S1C_M" = "#00DEA3", "MFC_M" = "#00DEA3", "VFC_M" = "#00DEA3", "AMY_M" = "#00DEA3",
- "HIP_F" = "#6693DE", "HIP_M" = "#6693DE", "AMY_F" = "#6693DE"
- )
- # Create the custom color palette for Sex and Area
- sex_area_palette <- c("F_Cortical" = "#ff68a1",
- "M_Cortical" = "#4fae26",
- "F_Subcortical" = "#FFC2D9",
- "M_Subcortical" = "#B8DEA8")
- # Separate the Gene column into two new columns: Gene and Years
- # Convert to wide format
- densne.df <- gene.exp.zscore.loess.fitted %>%
- separate(Gene, into = c("Gene", "Years"), sep = "_") %>%
- spread(key = Gene, value = Expression)
- # Combine Area and Years to create a unique identifier for each row
- densne.df$Years_Area <- paste(densne.df$Area, densne.df$Years, sep = "_")
- densne.df.bind <- densne.df %>%
- as.data.frame()
- # Set the Years_Area as row names
- row.names(densne.df) <- densne.df$Years_Area
- # Remove the Area, Years, and Years_Area columns from the dataframe
- densne.df <- densne.df[ , !(names(densne.df) %in% c("Area", "Years", "Years_Area"))]
- # Set the parameters for the Dense t-SNE.
- # Parameters were chosen by running the "Optimizing dense-tSNE code" at the end of
- # this markdown.
- seed <- 5555
- perplexity <- 30
- dens_frac <- 0.9
- dens_lambda <- 0.1
- # Set the seed
- set.seed(seed)
- # Run dense t-SNE using densne function
- densne_result <-
- densne(densne.df,
- perplexity = perplexity,
- dens_frac = dens_frac,
- dens_lambda = dens_lambda,
- max_iter = 1000,
- verbose=FALSE) %>%
- as.data.frame()
- # Combine densne dataframe with the densne result and separate Area column into "Area" and "Sex"
- densne_combined <- cbind(densne.df.bind, densne_result) %>%
- mutate(Area_Sex = Area) %>%
- separate(Area, into = c("Area", "Sex"), sep = "_")
- # Define the order of brain areas combined with sex for plotting
- Area_Sex_order <- c(
- "CBC_F", "CBC_M", "AMY_M", "STC_M", "OFC_M", "M1C_M", "V1C_M", "IPC_M",
- "ITC_M", "DFC_M", "A1C_M", "S1C_M", "MFC_M", "VFC_M", "MD_F", "MD_M",
- "HIP_F", "HIP_M", "AMY_F", "STC_F", "OFC_F", "M1C_F", "V1C_F", "IPC_F",
- "ITC_F", "DFC_F", "A1C_F", "S1C_F", "MFC_F", "VFC_F"
- )
- # Reorder the levels of Area_Sex
- densne_combined$Area_Sex <-
- factor(densne_combined$Area_Sex, levels = Area_Sex_order)
- # Define the cortical and subcortical areas
- cortical_areas <- c("STC", "OFC", "M1C",
- "V1C", "IPC", "ITC", "DFC",
- "A1C", "S1C", "MFC", "VFC")
- subcortical_areas <- c("MD", "CBC", "AMY", "HIP")
- # Add a new column "Area_Type" to classify regions as cortical, subcortical, or unknown
- densne_combined <- densne_combined %>%
- mutate(Area_Type = case_when(
- Area %in% cortical_areas ~ "Cortical",
- Area %in% subcortical_areas ~ "Subcortical",
- TRUE ~ "Unknown" # Catch-all for any areas not specified above
- ))
- # Create a new variable that combines Sex and Area_Type information
- densne_combined$Sex_Area <- paste(densne_combined$Sex,
- densne_combined$Area_Type, sep = "_")
- # Convert the "Years" column to a numeric type for proper visualization
- densne_combined$Years <- as.numeric(densne_combined$Years)
- # Visualizing dense t-SNE results colored by 'Years'
- densne_years_plot <- ggplot(densne_combined) +
- aes(V1, V2) +
- geom_point(size = 4, shape = 21, colour = "black") +
- geom_point(size = 3.5, aes(colour = Years))+
- scale_size(breaks = mybreaks) +
- scale_colour_gradientn(name = "Age",
- breaks = mybreaks,
- colours = brewer.pal(9, "YlOrRd"),
- trans = "log")+
- labs(x = "Dense t-SNE component 1", y = "Dense t-SNE component 2") +
- theme(
- # plot.title = element_text(size = 15),
- axis.title = element_text(size = 20),
- axis.text = element_text(size = 20),
- legend.text = element_text(size = 18),
- legend.title = element_text(size = 19),
- legend.key.size = unit(1, "cm"),
- aspect.ratio = 5/5,
- panel.background = element_rect(fill = "white"),
- axis.line = element_line(colour = "black"))
- # Visualizing dense t-SNE results colored by 'Area_Sex'
- densne_area_sex_plot <- ggplot(densne_combined) +
- aes(V1, V2, colour = Area_Sex) +
- geom_point(size = 3.5) +
- scale_colour_manual(values = custom_palette, name = "Area_Sex") +
- # ggtitle(paste("Dense t-SNE,", "Seed =", seed, "Perplexity =", perplexity)) +
- labs(x = "Dense t-SNE component 1", y = "Dense t-SNE component 2") +
- theme(
- # plot.title = element_text(size = 15),
- axis.title = element_text(size = 20),
- axis.text = element_text(size = 20),
- legend.text = element_text(size = 18),
- legend.title = element_text(size = 19),
- legend.key.size = unit(0.8, "cm"),
- aspect.ratio = 5/5,
- panel.background = element_rect(fill = "white"),
- axis.line = element_line(colour = "black"))
- # Visualizing dense t-SNE results colored by combined 'Sex' information
- densne_sex_plot <- ggplot(densne_combined) +
- aes(x = V1, y = V2, colour = Sex_Area) +
- geom_point(size = 3.5) +
- scale_color_manual(values = sex_area_palette,
- name = "Sex & Area",
- labels = c("Female Cortex",
- "Female Subcortex",
- "Male Cortex",
- "Male Subcortex")) +
- # ggtitle(paste("Dense t-SNE,", "Seed =", seed, "Perplexity =", perplexity)) +
- labs(x = "Dense t-SNE component 1", y = "Dense t-SNE component 2") +
- theme(
- # plot.title = element_text(size = 15),
- axis.title = element_text(size = 20),
- axis.text = element_text(size = 20),
- legend.text = element_text(size = 18),
- legend.title = element_text(size = 19),
- legend.key.size = unit(0.8, "cm"),
- aspect.ratio = 5/5,
- panel.background = element_rect(fill = "white"),
- axis.line = element_line(colour = "black"))
- ```
- \newpage
- Area Sex Labelled Dense t-SNE
- ```{r , fig.height=10, fig.width=10}
- densne_area_sex_plot
- ```
- \newpage
- Years Labelled Dense t-SNE
- ```{r , fig.height=10, fig.width=10}
- densne_years_plot
- ```
- \newpage
- Area Sex Labelled Dense t-SNE
- ```{r , fig.height=10, fig.width=10}
- densne_sex_plot
- ```
- \newpage
- Combine all the plots
- ```{r Panel, fig.width=8}
- layout <- "
- AXB
- CXD
- "
- densne_years_plot_with_space <- (plot_spacer() + densne_years_plot + plot_spacer()) +
- plot_layout(widths = c(0.1, 1, 0.1))
- combined.plot <-wrap_plots(
- # assign each plot to corresponding letter
- A = ggdraw() + draw_plot(dendrogram, height = 0.95),
- B = densne_area_sex_plot,
- C = densne_years_plot_with_space,
- D = densne_sex_plot,
- X = plot_spacer(),
- # apply the layout
- design = layout
- ) +
- plot_layout(widths = c(1.5, 0.1, 1),
- heights = c(1, 1)) +
- # plot_annotation(tag_levels = "A") &
- theme(plot.tag = element_text(size = 25),
- legend.text = element_text(size = 12),
- legend.key.size = unit(0.5, "cm"),
- legend.spacing.y = unit(0.10, "cm")
- )
- # add label manually
- # x for "B" and "D" depends on the width and output file size
- combined.plot <- ggdraw(combined.plot) +
- draw_label("A", x = 0.01, y = 0.99, hjust = 0, vjust = 1, size = 48) +
- draw_label("B", x = 0.51, y = 0.99, hjust = 0, vjust = 1, size = 48) +
- draw_label("C", x = 0.01, y = 0.51, hjust = 0, vjust = 1, size = 48) +
- draw_label("D", x = 0.51, y = 0.51, hjust = 0, vjust = 1, size = 48)
- ```
- ```{r echo=FALSE}
- knitr::include_graphics(
- here::here(paste(export.path, "Fig 2",
- "Fig2. Densne panel_k5.pdf", sep="/")))
- ```
- ```{r, include=FALSE, echo=FALSE}
- #Saving the plots
- devEval(type = "pdf",
- path = paste(export.path, "Fig 2", sep = "/"),
- name = "Fig2. Densne panel_k5",
- width = 25,
- height = 20,
- expr = {
- print(combined.plot)
- })
- # Save the densne_area_sex_plot as a TIFF image
- tiff(filename = paste(export.path, "Fig 2", "Fig2 Dense panel.tiff", sep = "/"),
- width = 11.7,
- height = 10,
- units = "in",
- res = 600,
- compression = "lzw",
- type = "cairo")
- print(combined.plot)
- dev.off()
- ```
- ```{r, include=FALSE, echo=FALSE}
- #Saving the plots
- devEval(type = "pdf",
- path = paste(export.path, "Fig 2", sep = "/"),
- name = "Fig2A. Sex_Labelled_DtSNE",
- width = 10,
- height = 10,
- expr = {
- print(densne_area_sex_plot)
- })
- devEval(type = "pdf",
- path = paste(export.path, "Fig 2", sep = "/"),
- name = "Fig2B. YearsLabelled_DtSNE",
- width = 10,
- height = 10,
- expr = {
- print(densne_years_plot)
- })
- devEval(type = "pdf",
- path = paste(export.path, "Fig 2", sep = "/"),
- name = "Fig2C. Area_SexLabelled_DtSNE",
- width = 10,
- height = 10,
- expr = {
- print(densne_area_sex_plot)
- })
- # Save the densne_area_sex_plot as a TIFF image
- tiff(filename = paste(export.path, "Fig 2", "Fig2B Area_Sex_Labelled_DtSNE.tiff", sep = "/"),
- width = 11.4,
- height = 10,
- units = "in",
- res = 600,
- compression = "lzw",
- type = "cairo")
- print(densne_area_sex_plot)
- dev.off()
- # Save the densne_years_plot as a TIFF image
- tiff(filename = paste(export.path, "Fig 2", "Fig2C Years_Labelled_DtSNE.tiff", sep = "/"),
- width = 10,
- height = 10,
- units = "in",
- res = 600,
- compression = "lzw",
- type = "cairo")
- print(densne_years_plot)
- dev.off()
- # Save the densne_area_sex_plot as a TIFF image
- tiff(filename = paste(export.path, "Fig 2", "Fig2D Sex_Labelled_DtSNE.tiff", sep = "/"),
- width = 11.7,
- height = 10,
- units = "in",
- res = 600,
- compression = "lzw",
- type = "cairo")
- print(densne_sex_plot)
- dev.off()
- ```
- \newpage
- ## Optimizing the parameters for running the dense-tSNE
- ```{r, eval=FALSE, include=TRUE}
- # Define your seeds and perplexities
- seeds <- c(5555, 611, 9037)
- perplexities <- c(30, 60, 90, 120, 150)
- dens_frac = 0.9
- dens_lambda =0.1
- # Initialize an empty list to store the plots
- densne_sex_plot_list <- list()
- densne_years_plot_list <- list()
- densne_area_sex_plot_list <- list()
- # Initialize a counter
- plot_counter <- 1
- # For each seed
- for (seed in seeds) {
- # Set the seed
- set.seed(seed)
- print(seed)
- # For each perplexity
- for (perplexity in perplexities) {
- print(perplexity)
- # Run dense t-SNE using densne function
- densne_result <- densne(densne.df, perplexity = perplexity,
- dens_frac = dens_frac, dens_lambda = dens_lambda,
- max_iter = 1000, verbose=FALSE) %>% as.data.frame()
- densne_combined <- cbind(densne.df.bind, densne_result)
- densne_combined <- densne_combined %>%
- mutate(Area_Sex = Area) %>%
- separate(Area, into = c("Area", "Sex"), sep = "_")
- densne_combined$Years <- as.numeric(densne_combined$Years)
- # Color the plot by Sex
- densne_sex_plot_list[[plot_counter]] <- ggplot(densne_combined) +
- aes(V1,V2, colour = densne_combined$Sex) +
- geom_point(size=4,shape=21,colour="black") +
- geom_point(size=3.5,aes(colour = Sex))+
- scale_colour_discrete(name = "Sex") +
- labs(x = "Dense t-SNE component 1", y = "Dense t-SNE component 2") +
- theme(plot.title =element_text(size=10),
- aspect.ratio = 5/5,
- panel.background = element_rect(fill = "white"),
- axis.line = element_line(colour = "black"))+
- ggtitle(paste("Seed =", seed, "Perplexity =", perplexity))
- # Color the plot by Years
- densne_years_plot_list[[plot_counter]] <- ggplot(densne_combined) +
- aes(V1,V2) +
- geom_point(size=4,shape=21,colour="black") +
- geom_point(size=3.5,aes(colour = Years))+
- scale_size(breaks = mybreaks) +
- scale_colour_gradientn(name="Age",breaks = mybreaks,
- colours =brewer.pal(9, "YlOrRd"),trans="log")+
- labs(x = "Dense t-SNE component 1", y = "Dense t-SNE component 2") +
- theme(plot.title =element_text(size=10),
- aspect.ratio = 5/5,
- panel.background = element_rect(fill = "white"),
- axis.line = element_line(colour = "black"))+
- ggtitle(paste("Seed =", seed, "Perplexity =", perplexity))
- # Color the plot by Area_Sex
- densne_area_sex_plot_list[[plot_counter]] <- ggplot(densne_combined) +
- aes(V1, V2, colour = Area_Sex) +
- geom_point(size=3.5) +
- scale_colour_discrete(name = "Area_Sex") +
- ggtitle(paste("Seed =", seed, "Perplexity =", perplexity)) +
- labs(x = "Dense t-SNE component 1", y = "Dense t-SNE component 2") +
- theme(plot.title = element_text(size=10),
- aspect.ratio = 5/5,
- panel.background = element_rect(fill = "white"),
- axis.line = element_line(colour = "black"))
- # Increment the counter
- plot_counter <- plot_counter + 1
- }
- }
- ```
- ```{r include=FALSE, eval=FALSE}
- devEval(type = "pdf",
- path = paste(export.path, "Fig 2", "Perplexity Testing", sep = "/"),
- name = "Area_Sex_Labelled_DtSNE_67Genes",
- width = 60,
- height = 20,
- expr = {
- print(do.call(grid.arrange, c(densne_area_sex_plot_list, ncol = 5, nrow = 3)))
- })
- devEval(type = "pdf",
- path = paste(export.path, "Fig 2", "Perplexity Testing", sep = "/"),
- name = "Sex_Labelled_DtSNE_67Genes",
- width = 60,
- height = 20,
- expr = {
- print(do.call(grid.arrange, c(densne_sex_plot_list, ncol = 5, nrow = 3)))
- })
- devEval(type = "pdf",
- path = paste(export.path, "Fig 2", "Perplexity Testing", sep = "/"),
- name = "Age_Labelled_DtSNE_67Genes",
- width = 60,
- height = 20,
- expr = {
- print(do.call(grid.arrange, c(densne_years_plot_list, ncol = 5, nrow = 3)))
- })
- ```
Figure 2.Rmd, no license · at the source
Overview
- McMaster Neuroscience Graduate Program, McMaster University, Hamilton, Ontario, Canada
- Department of Psychology, Neuroscience & Behavior, McMaster University, Hamilton, Ontario, Canada
Abstract
Neurotropic single-stranded RNA (ssRNA) viruses can disrupt brain function, yet little is known about how host virus receptor expression develops across the human lifespan or whether these trajectories differ between females and males. We focused on postnatal development using postmortem transcriptomic data from 33 human donors (4 months–82 years; both sexes), comprising 52 cerebral hemispheres and 15 brain areas, to characterize developmental patterns of 67 host receptor genes that mediate entry of major ssRNA viral families. Using sex-specific LOESS trajectory modelling, hierarchical clustering, and sliding-window differential expression analyses, we identified multiple non-linear developmental programs governing virus receptor expression. About half of female–male gene–area trajectory pairs exhibited divergent developmental patterns. Sex differences were most pronounced in the cortex, where high-dimensional receptor expression profiles were sufficient to predict the sex of individual cases. Sex differential expression was most frequent during early childhood, coinciding with sensitive periods of cortical circuit refinement. A targeted prenatal analysis revealed that virus receptor expression was predominantly male-biased before birth, contrasting with the predominantly female-biased expression observed during the early postnatal period. Although receptors from most viral families were broadly distributed across developmental programs, a subset of sex-by-age expression clusters showed some enrichment for specific viral lineages and glial-associated cell-type signatures. Together, these findings reveal that virus receptor expression in the human brain is organized into structured, sex-biased trajectories that dynamically reorganize over development, providing the first developmental atlas of viral entry receptors in the human brain.
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 26 matches between paragraphs and lines of code.
OSF 4fgka
Availability: 1 check, the latest on 31 October 2026: the link answers (HTTP 200)
- 31 October 2026: the link answers (HTTP 200)
16 files
- byan2/
Code/ , R, 1,950 lines, 2 matchesFigure 1.Rmd - byan2/
Code/ , R, 749 lines, 4 matchesFigure 2.Rmd - byan2/
Code/ , R, 634 lines, 3 matchesFigure 3.Rmd - byan2/
Code/ , R, 2,025 lines, 3 matchesFigure 4.Rmd - byan2/
Code/ , R, 1,406 lines, 2 matchesFigure 5.Rmd - byan2/
Code/ , R, 1,648 lines, 2 matchesFigure 6.Rmd - byan2/
Code/ , R, 355 lines, 1 matchKang Data Cleaning.Rmd - byan2/
Code/ , R, 432 linesSupplementary Figure 1.Rmd - byan2/
Code/ , R, 811 lines, 3 matchesSupplementary Figure 2.Rmd - byan2/
Code/ , R, 1,035 linesSupplementary Figure 5.Rmd - byan2/
Code/ , R, 978 lines, 1 matchSupplementary Figure 6.Rmd - byan2/
Code/ , R, 620 lines, 3 matchesSupplementary Figure 7.Rmd - byan2/
Code/ , R, 857 lines, 1 matchSupplementary Figure 8.rmd - byan2/
Code/ , R, 1,333 lines, 1 matchSupplementary Figure 9.Rmd - byan2/
Code/ , R, 1,443 linesSupplementary Figures 3-4.Rmd - byan2/
Code/ , R, 857 linesSupplementary-Figure-8.r md
The paper's code and data availability statement is in the Data section.
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;
- 16 scripts, each with its path and the digest of its content;
- 26 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
- geo:GSE25219, at NCBI GEO; found in the text, “Human transcriptomic dataset”
Data Availability
Data and Code accessibility: The processed dataset analyzed in the current study, along with the R code and supplementary materials (figures and tables), are available on the Open Science Framework (Monteiro et al., 2025) 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, 31 October 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 19 MeSH terms, 80 references.
Cite
This paper
Monteiro, L., Halabian, N., Li, J., Panday, M., Barone, N., Wang, P., & Murphy, K. M. (2026). Sex- and age-specific development of ssRNA virus receptor expression in the human brain. PloS one, 21(10), e0360526. https://
BibTeX
@article{monteiro2026sex
author = {Monteiro, Leanne and Halabian, Negeen and Li, Jiawei and Panday, Maheshwar and Barone, Nadine and Wang, Peiyi and Murphy, Kathryn M},
title = {{Sex- and age-specific development of ssRNA virus receptor expression in the human brain}},
journal = {PloS one},
year = {2026},
month = oct,
volume = {21},
number = {10},
pages = {e0360526},
publisher = {PLOS},
issn = {1932-6203},
doi = {10.1371/
url = {https://
pmid = {42956020},
pmcid = {PMC13718946}
}
RIS
TY - JOUR
AU - Monteiro, Leanne
AU - Halabian, Negeen
AU - Li, Jiawei
AU - Panday, Maheshwar
AU - Barone, Nadine
AU - Wang, Peiyi
AU - Murphy, Kathryn M
TI - Sex- and age-specific development of ssRNA virus receptor expression in the human brain
T2 - PloS one
J2 - PLoS One
PY - 2026
DA - 2026/
VL - 21
IS - 10
SP - e0360526
SN - 1932-6203
PB - PLOS
DO - 10.1371/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1371/
"type": "article-journal",
"title": "Sex- and age-specific development of ssRNA virus receptor expression in the human brain",
"container-title": "PloS one",
"author": [
{
"family": "Monteiro",
"given": "Leanne"
},
{
"family": "Halabian",
"given": "Negeen"
},
{
"family": "Li",
"given": "Jiawei"
},
{
"family": "Panday",
"given": "Maheshwar"
},
{
"family": "Barone",
"given": "Nadine"
},
{
"family": "Wang",
"given": "Peiyi"
},
{
"family": "Murphy",
"given": "Kathryn M"
}
],
"container-title-short":
"volume": "21",
"issue": "10",
"page": "e0360526",
"DOI": "10.1371/
"PMID": "42956020",
"PMCID": "PMC13718946",
"ISSN": "1932-6203",
"publisher": "PLOS",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
10,
29
]
]
}
}
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.1038/s41380-022-01786-2 [code]
- SARS-CoV-2 promotes microglial synapse elimination in human brain organoids.Journal: Molecular psychiatryIn common: patchwork, cowplot, reshape2, 2 other tools, 3 references
- [2] doi:10.1016/j.celrep.2025.116159 [code]
- Human brain cell types shape host-rabies virus transcriptional interactions revealing a preexisting pro-viral astrocyte subpopulation.Journal: Cell reportsIn common: randomForest, patchwork, cowplot, 3 other tools, 1 reference
- [3] doi:10.1093/schbul/sbad140 [code]
- Clustering Schizophrenia Genes by Their Temporal Expression Patterns Aids Functional Interpretation.Journal: Schizophrenia bulletinIn common: patchwork, ggplot2, tidyverse, NCBI GEO GSE25219, 1 reference
- [4] doi:10.1038/s41467-025-62048-7 [code]
- Hamsters with long COVID present distinct transcriptomic profiles associated with neurodegenerative processes in brainstem.Journal: Nature communicationsIn common: randomForest, cowplot, ggplot2, 1 other tool, 3 references
- [5] doi:10.1016/j.celrep.2024.114326 [code]
- Hofbauer cells and fetal brain microglia share transcriptional profiles and responses to maternal diet-induced obesity.Journal: Cell reportsIn common: patchwork, cowplot, reshape2, 3 other tools, 2 references
- [6] doi:10.1038/s41467-023-39411-7 [code]
- Spatiotemporal proteomic atlas of multiple brain regions across early fetal to neonatal stages in cynomolgus monkey.Journal: Nature communicationsIn common: patchwork, cowplot, reshape2, 3 other tools, 2 references
- [7] doi:10.1038/s41467-023-39750-5 [code]
- A single-cell transcriptional landscape of immune cells shows disease-specific changes of T cell and macrophage populations in human achalasia.Journal: Nature communicationsIn common: randomForest, patchwork, cowplot, 3 other tools, 1 reference
- [8] doi:10.1093/bioinformatics/btag592 [code]
- Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.Journal: Bioinformatics (Oxford, England)In common: randomForest, patchwork, cowplot, 4 other tools
- [9] doi:10.3390/ijms27156925 [code]
- XGBoost-SHAP Interpretable Modeling Identifies and Validates an Eight-Gene Biomarker for Hepatic Encephalopathy Risk Prediction in Cirrhosis.Journal: International journal of molecular sciencesIn common: randomForest, patchwork, cowplot, 4 other tools
- [10] doi:10.1126/sciadv.adu0726 [code]
- CHCHD2 mutant mice link mitochondrial deficits to PD pathophysiology.Journal: Science advancesIn common: randomForest, patchwork, cowplot, 4 other tools
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, 16 scripts, and 26 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:22dabbee65618af9…
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.1371/journal.pone.0360526)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1371/journal.pone.0360526.svg
:target: https://openscicode.org/badge/doi/10.1371/journal.pone.0360526
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1371/journal.pone.0360526"><img src="https://openscicode.org/badge/doi/10.1371/journal.pone.0360526.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->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)
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
