OSCR

Female cortical cellular mosaicism underlies shared MeCP2 and PCB impacted gene pathways.

Code ↔ Paper

11 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 11 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
  1. [1] § STAR★Methods › Quantification and statistical analyses › Bioinformatic analyses ↔ scripts/04_core_analysis/hdWGCNA.R, lines 407–451 · score 0.89 · Module trait correlations, module eigengene, exposure duration, het vehicle, wt vehicle, het pcb
  2. [2] § STAR★Methods › Quantification and statistical analyses › Bioinformatic analyses ↔ scripts/06_human_translation/human_hdWGCNA.R, lines 457–501 · score 0.89 · Module trait correlations, module eigengene, exposure duration, het vehicle, wt vehicle, het pcb
  3. [3] § STAR★Methods › Quantification and statistical analyses › Bioinformatic analyses ↔ scripts/06_human_translation/human_mouse_upset_DEGs.R, lines 232–279 · score 0.77 · seq disease gene, drug signatures, human mouse, enrichR, GABAergic, database
  4. [4] § Results › Network analysis using hdWGCNA associates PCB and Mecp2e1 genotype effects with RTT mouse model phenotypes ↔ scripts/04_core_analysis/hdWGCNA.R, lines 407–451 · score 0.75 · exposure duration, het vehicle, wt vehicle, het pcb, wt pcb, pregnancy
  5. [5] § Results › Network analysis using hdWGCNA associates PCB and Mecp2e1 genotype effects with RTT mouse model phenotypes ↔ scripts/01_preprocessing/DEGs_proportions.R, lines 140–190 · score 0.73 · WT_PCB, WT_VEHICLE, HET_PCB, HET_VEHICLE, Sst, cluster
  6. [6] § STAR★Methods › Quantification and statistical analyses › Bioinformatic analyses ↔ analysis/07_mosiacism/11_WTcellsVsMUTcells_from_MUTPCB_MUTVEHICLE/DEG_analysis.R, lines 176–242 · score 0.69 · seq disease gene, odds ratio, drug signatures, enrichR, overlap, Glutamatergic
  7. [7] § Results › Comparative analysis of mouse and human RTT cortex PCB-associated DEGs and enriched pathways in GABAergic, glutamatergic, and non-neuronal cells ↔ scripts/06_human_translation/human_mouse_upset_DEGs.R, lines 232–279 · score 0.68 · seq disease gene, drug signatures, human mouse, GABAergic, database, enrichment
  8. [8] § Results › Network analysis using hdWGCNA associates PCB and Mecp2e1 genotype effects with RTT mouse model phenotypes ↔ scripts/01_preprocessing/DEGs_proportions.R, lines 140–190 · score 0.66 · WT_PCB, WT_VEHICLE, HET_PCB, HET_VEHICLE, mouse, cells
  9. [9] § STAR★Methods › Quantification and statistical analyses › Bioinformatic analyses ↔ scripts/01_Data_preparation/run_alignment.R, the whole file · a weak match · score 0.56 · create Seurat, single nucleus, alignment, matrices, log, cortex
  10. [10] § STAR★Methods › Quantification and statistical analyses › Bioinformatic analyses ↔ scripts/01_preprocessing/soupx_ambient_rna_correction.R, lines 121–203 · score 0.56 · Sample metadata, create Seurat, Cellranger, matrices, treatment, log
  11. [11] § Results › Comparative analysis of mouse and human RTT cortex PCB-associated DEGs and enriched pathways in GABAergic, glutamatergic, and non-neuronal cells ↔ scripts/09_mosiacism_analysis/broad_group_analysis/broad_cell_mosiacism.R, lines 1–50 · score 0.52 · female cortex, broad cell, GABAergic, brains, clustering, mosaic

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R · 548 lines · 20 KB · MIT · 2 matches

  1. # This program will perform hdWGCNA analysis on single cell data
  2. # single-cell analysis package
  3. library(Seurat)
  4. library(tidyverse)
  5. library(cowplot)
  6. library(patchwork)
  7. library(WGCNA)
  8. library(hdWGCNA)
  9. library(dplyr)
  10. library(UCell)
  11. library(magrittr)
  12. library(igraph)
  13. # using the cowplot theme for ggplot
  14. theme_set(theme_cowplot())
  15. # set random seed for reproducibility
  16. set.seed(1234)
  17. # load the snRNA-seq dataset
  18. setwd("/Users/osman/Documents/GitHub/PEBBLES_mouse_snRNAseq/06_hdWGCNA")
  19. load("PEBBLES_clean.RData")
  20. # Set up multithreading
  21. allowWGCNAThreads(nThreads = 16)
  22. # Prepare Seurat Object for WGCNA
  23. metadata <- [email hidden]
  24. timepoint <- lapply(metadata$orig.ident, function(x) {
  25. split_name <- strsplit(x, "_")[[1]]
  26. return(split_name[3])
  27. })
  28. [email hidden]$Time_Point <- unlist(timepoint)
  29. genotype <- lapply(metadata$orig.ident, function(x) {
  30. split_name <- strsplit(x, "_")[[1]]
  31. return(split_name[1])
  32. })
  33. [email hidden]$genotype <- unlist(genotype)
  34. # Preprocess
  35. DefaultAssay(PEBBLES_soupx) <- 'RNA'
  36. Idents(PEBBLES_soupx) <- 'cell_type'
  37. # Set up Seurat object for WGCNA
  38. PEBBLES_soupx <- SetupForWGCNA(
  39. PEBBLES_soupx,
  40. gene_select = "fraction", # the gene selection approach
  41. fraction = 0.15, # fraction of cells that a gene needs to be expressed in order to be included
  42. wgcna_name = "pebbles_cortex_hdwgcna" # the name of the hdWGCNA experiment
  43. )
  44. # construct metacells in each group
  45. PEBBLES_soupx <- MetacellsByGroups(
  46. PEBBLES_soupx,
  47. group.by = c("cell_type"), # specify the columns in [email hidden] to group by
  48. wgcna_name = 'pebbles_cortex_hdwgcna',
  49. k = 25, # nearest-neighbors parameter
  50. max_shared = 10, # maximum number of shared cells between two metacells
  51. ident.group = 'cell_type' # set the Idents of the metacell seurat object
  52. )
  53. # normalize metacell expression matrix:
  54. PEBBLES_soupx <- NormalizeMetacells(seurat_obj = PEBBLES_soupx, wgcna_name = "pebbles_cortex_hdwgcna",)
  55. Idents(PEBBLES_soupx) <- "cell_type"
  56. # Set up the expression matrix
  57. PEBBLES_soupx <- SetDatExpr(
  58. PEBBLES_soupx,
  59. group_name = c("L2_3_IT", "L4", "L5", "L6", "Sst", "Pvalb", "Vip", "Non-neuronal", "Astro", "Oligo", "Lamp5", "Sncg"), # the name of the group of interest in the group.by column
  60. group.by="cell_type", # the metadata column containing the cell type info. This same column should have also been used in MetacellsByGroups
  61. assay = 'RNA', # using RNA assay
  62. slot = 'data' # using normalized data
  63. )
  64. # Test different soft powers:
  65. PEBBLES_soupx <- TestSoftPowers(
  66. PEBBLES_soupx,
  67. networkType = 'signed' # you can also use "unsigned" or "signed hybrid"
  68. ) # this errors out if there are columns that are constant and dont change
  69. # plot the results:
  70. plot_list <- PlotSoftPowers(PEBBLES_soupx)
  71. # assemble with patchwork
  72. wrap_plots(plot_list, ncol=2)
  73. ggplot2::ggsave("Softpowerthreshold.pdf",
  74. device = NULL,
  75. height = 8.5,
  76. width = 12)
  77. # construct co-expression network:
  78. PEBBLES_soupx <- ConstructNetwork(
  79. PEBBLES_soupx, soft_power=5,
  80. setDatExpr=FALSE,
  81. overwrite_tom = TRUE# name of the topoligical overlap matrix written to disk
  82. )
  83. PlotDendrogram(PEBBLES_soupx, main='hdWGCNA PEBBLES Dendrogram')
  84. ggplot2::ggsave("WGCNA_Dendrogram.pdf",
  85. device = NULL,
  86. height = 8.5,
  87. width = 12)
  88. #PEBBLES_soupx@misc$pebbles_cortex_hdwgcna$wgcna_modules$module <- paste0(PEBBLES_soupx@misc$pebbles_cortex_hdwgcna$wgcna_modules$module, "_")
  89. # need to run ScaleData first or else harmony throws an error:
  90. PEBBLES_soupx <- ScaleData(PEBBLES_soupx, features=VariableFeatures(PEBBLES_soupx))
  91. # compute all MEs in the full single-cell dataset
  92. PEBBLES_soupx <- ModuleEigengenes(
  93. PEBBLES_soupx,
  94. group.by.vars="Group",
  95. wgcna_name = "pebbles_cortex_hdwgcna",
  96. verbose = TRUE,
  97. pc_dim = c(1:20)
  98. )
  99. PEBBLES_soupx <- ModuleEigengenes(
  100. PEBBLES_soupx)
  101. # harmonized module eigengenes:
  102. hMEs <- GetMEs(PEBBLES_soupx)
  103. # module eigengenes:
  104. MEs <- GetMEs(PEBBLES_soupx, harmonized=FALSE)
  105. # compute eigengene-based connectivity (kME):
  106. PEBBLES_soupx <- ModuleConnectivity(
  107. PEBBLES_soupx,
  108. group.by = 'cell_type', group_name = c("L2_3_IT", "L4", "L5", "L6", "Sst", "Pvalb", "Vip", "Sncg", "Non-neuronal", "Astro", "Oligo", "Lamp5")
  109. )
  110. # plot genes ranked by kME for each module
  111. PlotKMEs(PEBBLES_soupx, ncol=3)
  112. ggplot2::ggsave("PEBBLES_kME.pdf",
  113. device = NULL,
  114. height = 8.5,
  115. width = 12)
  116. # compute gene scoring for the top 25 hub genes by kME for each module
  117. # with Seurat method
  118. PEBBLES_soupx <- ModuleExprScore(
  119. PEBBLES_soupx,
  120. n_genes = 25,
  121. method='Seurat'
  122. )
  123. # compute gene scoring for the top 25 hub genes by kME for each module
  124. # with UCell method
  125. PEBBLES_soupx <- ModuleExprScore(
  126. PEBBLES_soupx,
  127. n_genes = 25,
  128. method='UCell'
  129. )
  130. # make a featureplot of hMEs for each module
  131. plot_list <- ModuleFeaturePlot(
  132. PEBBLES_soupx,
  133. features='hMEs', # plot the hMEs
  134. order=TRUE # order so the points with highest hMEs are on top
  135. )
  136. # stitch together with patchwork
  137. wrap_plots(plot_list, ncol=3)
  138. ggplot2::ggsave("PEBBLES_module_UMAPs.pdf",
  139. device = NULL,
  140. height = 8.5,
  141. width = 12)
  142. levels(PEBBLES_soupx) <- c("L2_3_IT", "L4", "L5", "L6","Pvalb", "Vip", "Sst","Sncg","Lamp5","Peri", "Endo", "Oligo","Astro","Non-neuronal")
  143. DimPlot_scCustom(seurat_object = PEBBLES_soupx, label = FALSE, pt.size = 0.5, figure_plot = TRUE)
  144. ggplot2::ggsave("celltype_UMAPs.pdf",
  145. device = NULL,
  146. height = 8.5,
  147. width = 12)
  148. # make a featureplot of hub scores for each module
  149. plot_list <- ModuleFeaturePlot(
  150. PEBBLES_soupx,
  151. features='scores', # plot the hub gene scores
  152. order='shuffle', # order so cells are shuffled
  153. ucell = TRUE) # depending on Seurat vs UCell for gene scoring
  154. # stitch together with patchwork
  155. wrap_plots(plot_list, ncol=3)
  156. ggplot2::ggsave("PEBBLES_hubgene_scores_UMAPs.pdf",
  157. device = NULL,
  158. height = 8.5,
  159. width = 12)
  160. # plot module correlagram
  161. ModuleCorrelogram(PEBBLES_soupx)
  162. ggplot2::ggsave("PEBBLES_module_to_module_cor.pdf",
  163. device = NULL,
  164. height = 8.5,
  165. width = 12)
  166. # get hMEs from seurat object
  167. MEs <- GetMEs(PEBBLES_soupx, harmonized=TRUE)
  168. mods <- colnames(MEs); mods <- mods[mods != 'grey']
  169. # add hMEs to Seurat meta-data:
  170. [email hidden] <- cbind([email hidden], MEs)
  171. # plot with Seurat's DotPlot function
  172. DotPlot_scCustom(seurat_object = PEBBLES_soupx, features=mods, flip_axes = TRUE, x_lab_rotate = TRUE, remove_axis_titles = FALSE) + xlab("Modules") + ylab("Cell_Type")
  173. ggplot2::ggsave("PEBBLES_Average_expression_hubgenes.pdf",
  174. device = NULL,
  175. height = 8.5,
  176. width = 12)
  177. ################################
  178. ## Add Traits to the metadata ##
  179. ################################
  180. traits_sheet <- read.table("/Users/osman/Documents/GitHub/PEBBLES_mouse_snRNAseq/06_hdWGCNA/PEBBLES_traits.csv", sep = ",", header = TRUE)
  181. traits_sheet$X.1 <- NULL
  182. traits_sheet$X <- NULL
  183. traits_sheet$X.2 <- NULL
  184. traits_sheet$X.3 <- NULL
  185. traits_sheet$X.4 <- NULL
  186. traits_sheet$X.5 <- NULL
  187. # Get the sample names from the Seurat object
  188. sample_names <- [email hidden]$Samples
  189. # Add the exposure, weight and pregnant columns from traits_sheet
  190. [email hidden]$Exposure_duration <- NA
  191. [email hidden]$Weight <- NA
  192. [email hidden]$Pregnant <- NA
  193. # Match samples and fill in the data
  194. for (i in 1:length(sample_names)) {
  195. sample_name <- sample_names[i]
  196. row_index <- traits_sheet$Samples == sample_name
  197. if (sum(row_index) != 0) {
  198. [email hidden]$Exposure_duration[i] <- traits_sheet$Exposure_duration[row_index]
  199. [email hidden]$Weight[i] <- traits_sheet$Weight[row_index]
  200. [email hidden]$Pregnant[i] <- traits_sheet$Pregnant[row_index]
  201. }
  202. }
  203. ##########################
  204. ## Compute Correlations ##
  205. ##########################
  206. # set as factor or numeric
  207. PEBBLES_soupx$Genotype <- as.factor(PEBBLES_soupx$Genotype)
  208. PEBBLES_soupx$Treatment <- as.factor(PEBBLES_soupx$Treatment)
  209. PEBBLES_soupx$Exposure_duration <- as.numeric(PEBBLES_soupx$Exposure_duration)
  210. PEBBLES_soupx$Weight <- as.numeric(PEBBLES_soupx$Weight)
  211. PEBBLES_soupx$Pregnant <- as.factor(PEBBLES_soupx$Pregnant)
  212. PEBBLES_soupx$Samples <- as.factor(PEBBLES_soupx$Samples)
  213. PEBBLES_soupx$Group <- paste(PEBBLES_soupx$Genotype, PEBBLES_soupx$Treatment, sep = "-")
  214. PEBBLES_soupx$Group <- as.factor(PEBBLES_soupx$Group)
  215. # list of traits to correlate
  216. cur_traits <- c('Genotype', 'Treatment', 'Exposure_duration', 'Weight', 'Pregnant', 'Group')
  217. PEBBLES_soupx <- ModuleTraitCorrelation(
  218. PEBBLES_soupx,
  219. traits = cur_traits,
  220. group.by='cell_type'
  221. )
  222. #Warning messages:
  223. # 1: In ModuleTraitCorrelation(PEBBLES_soupx, traits = cur_traits, group.by = "cell_type") :
  224. # Trait Samples is a factor with levels 24_PCB_WT, 25_VEHICLE_WT, 27_PCB_HET, 27_PCB_HET_2, 28_VEHICLE_HET, 29_VEHICLE_WT, 30_VEHICLE_WT, #30_VEHICLE_WT_2, 31_PCB_WT, 37_PCB_WT, 37_PCB_WT_2, 38_VEHICLE_HET, 39_PCB_HET, 40_VEHICLE_HET, 40_VEHICLE_HET_2. Levels will be converted to #numeric IN THIS ORDER for the correlation, is this the expected order?
  225. # 2: In ModuleTraitCorrelation(PEBBLES_soupx, traits = cur_traits, group.by = "cell_type") :
  226. # Trait Genotype is a factor with levels HET, WT. Levels will be converted to numeric IN THIS ORDER for the correlation, is this the expected #order?
  227. # 3: In ModuleTraitCorrelation(PEBBLES_soupx, traits = cur_traits, group.by = "cell_type") :
  228. # Trait Treatment is a factor with levels PCB, VEHICLE. Levels will be converted to numeric IN THIS ORDER for the correlation, is this the #expected order?
  229. # 4: In ModuleTraitCorrelation(PEBBLES_soupx, traits = cur_traits, group.by = "cell_type") :
  230. # Trait Pregnant is a factor with levels No, Yes. Levels will be converted to numeric IN THIS ORDER for the correlation, is this the expected #order?
  231. # get the mt-correlation results
  232. mt_cor <- GetModuleTraitCorrelation(PEBBLES_soupx)
  233. names(mt_cor$cor)
  234. PlotModuleTraitCorrelation(
  235. PEBBLES_soupx,
  236. label = 'fdr',
  237. label_symbol = 'stars',
  238. text_size = 3,
  239. text_digits = 4,
  240. text_color = 'black',
  241. high_color = '#B2182B',
  242. mid_color = '#EEEEEE',
  243. low_color = '#2166AC',
  244. plot_max = 0.8,
  245. combine=TRUE
  246. )
  247. mod_trait_cor <- mt_cor$cor
  248. # get modules
  249. modules <- GetModules(PEBBLES_soupx)
  250. head(modules)
  251. write.csv(modules, "modules.csv", row.names = FALSE)
  252. # get hub genes
  253. hub_genesdf <- GetHubGenes(PEBBLES_soupx, n_hubs = 10)
  254. head(hub_genesdf)
  255. write.csv(hub_genesdf, "top10_hub_genes.csv", row.names = FALSE)
  256. save(list = ls(), file = "PEBBLES_cortex_WGCNA.RData")
  257. ModuleNetworkPlot(
  258. PEBBLES_soupx,
  259. outdir = 'ModuleNetworks'
  260. )
  261. # hubgene network
  262. HubGeneNetworkPlot(
  263. PEBBLES_soupx,
  264. n_hubs = 1, n_other=149,
  265. edge_prop = 1,
  266. mods = 'all',
  267. edge.alpha = 0.5,
  268. vertex.label.cex = 1,
  269. hub.vertex.size = 6
  270. )
  271. g <- HubGeneNetworkPlot(PEBBLES_soupx, return_graph=TRUE)
  272. seurat_obj <- RunModuleUMAP(
  273. PEBBLES_soupx,
  274. n_hubs = 10, # number of hub genes to include for the UMAP embedding
  275. n_neighbors=15, # neighbors parameter for UMAP
  276. min_dist=0.1 # min distance between points in UMAP space
  277. )
  278. # get the hub gene UMAP table from the seurat object
  279. umap_df <- GetModuleUMAP(PEBBLES_soupx)
  280. # plot with ggplot
  281. ggplot(umap_df, aes(x=UMAP1, y=UMAP2)) +
  282. geom_point(
  283. color=umap_df$color, # color each point by WGCNA module
  284. size=umap_df$kME*2 # size of each point based on intramodular connectivity
  285. ) +
  286. umap_theme()
  287. ModuleUMAPPlot(
  288. PEBBLES_soupx,
  289. edge.alpha=0.25,
  290. sample_edges=TRUE,
  291. edge_prop=0.1, # proportion of edges to sample (20% here)
  292. label_hubs=2 ,# how many hub genes to plot per module?
  293. keep_grey_edges=FALSE
  294. )
  295. # Add a column for module names
  296. test <- cbind(mod_trait_cor$all_cells, mod_trait_cor$Astro)
  297. dbs <- "KEGG_2019_Mouse"
  298. # perform enrichment tests
  299. PEBBLES_soupx <- RunEnrichr(
  300. PEBBLES_soupx,
  301. dbs="KEGG_2019_Mouse", # character vector of enrichr databases to test
  302. max_genes = 100 # number of genes per module to test. use max_genes = Inf to choose all genes!
  303. )
  304. # retrieve the output table
  305. enrich_df <- GetEnrichrTable(PEBBLES_soupx)
  306. # make GO term plots:
  307. EnrichrBarPlot(
  308. PEBBLES_soupx,
  309. outdir = "enrichr_plots", # name of output directory
  310. n_terms = 10, # number of enriched terms to show (sometimes more show if there are ties!!!)
  311. plot_size = c(5,7), # width, height of the output .pdfs
  312. logscale=TRUE # do you want to show the enrichment as a log scale?
  313. )
  314. # enrichr dotplot
  315. EnrichrDotPlot(
  316. PEBBLES_soupx,
  317. mods = "all", # use all modules (this is the default behavior)
  318. database = dbs, # this has to be one of the lists we used above!!!
  319. n_terms=5 # number of terms for each module
  320. )
  321. ggplot2::ggsave("PEBBLES_top5_KEGG.pdf",
  322. device = NULL,
  323. height = 8.5,
  324. width = 12)
  325. # compute cell-type marker genes with Seurat:
  326. Idents(PEBBLES_soupx) <- PEBBLES_soupx$cell_type
  327. markers <- Seurat::FindAllMarkers(
  328. PEBBLES_soupx,
  329. only.pos = TRUE,
  330. logfc.threshold=1
  331. )
  332. # compute marker gene overlaps
  333. overlap_df <- OverlapModulesDEGs(
  334. PEBBLES_soupx,
  335. deg_df = markers,
  336. fc_cutoff = 1 # log fold change cutoff for overlap analysis
  337. )
  338. # overlap barplot, produces a plot for each cell type
  339. plot_list <- OverlapBarPlot(overlap_df)
  340. # stitch plots with patchwork
  341. wrap_plots(plot_list, ncol=3)
  342. ggplot2::ggsave("PEBBLES_module_odds.ratio.pdf",
  343. device = NULL,
  344. height = 8.5,
  345. width = 12)
  346. # plot odds ratio of the overlap as a dot plot
  347. OverlapDotPlot(
  348. overlap_df,
  349. plot_var = 'odds_ratio') +
  350. ggtitle('Overlap of modules & cell-type markers')
  351. ggplot2::ggsave("PEBBLES_cellmarker_module_overlap.pdf",
  352. device = NULL,
  353. height = 8.5,
  354. width = 12)
  355. # Extract the relevant information from meta.data
  356. library(ggpubr)
  357. plot_data <- [email hidden][, c("Group", "brown", "Exposure_duration", "Weight", "Pregnant")]
  358. plot_data$Group <- factor(plot_data$Group, levels = c("WT-VEHICLE", "WT-PCB", "HET-VEHICLE", "HET-PCB"))
  359. p <- ggplot(plot_data, aes(x = Group, y = brown, fill = Pregnant)) +
  360. geom_violin() +
  361. labs(
  362. title = "Violin Plot of Group vs brownE",
  363. x = "Group",
  364. y = "Module Eigengene"
  365. ) +
  366. theme_minimal() +
  367. guides(shape = guide_legend(override.aes = list(size = 5))) +
  368. labs(title = 'Module Trait correlation') +
  369. theme(legend.position = "bottom") +
  370. theme_bw(base_size = 10) +
  371. theme(
  372. legend.position = 'right',
  373. legend.background = element_rect(),
  374. plot.title = element_text(angle = 0, size = 18, face = 'bold', vjust = 1),
  375. plot.subtitle = element_text(angle = 0, size = 14, face = 'bold', vjust = 1),
  376. plot.caption = element_text(angle = 0, size = 14, face = 'bold', vjust = 1),
  377. axis.text.x = element_text(angle = 90, size = 12, face = 'bold', hjust = 1.0, vjust = 0.5, colour = "black"),
  378. axis.text.y = element_text(angle = 0, size = 8, face = 'plain', vjust = 0.5, colour = "black"),
  379. axis.title = element_text(size = 18, face = 'bold', colour = "black"),
  380. axis.title.x = element_text(size = 18, face = 'bold', colour = "black"),
  381. axis.title.y = element_text(size = 18, face = 'bold', colour = "black"),
  382. axis.line = element_line(colour = 'black'),
  383. legend.key = element_blank(),
  384. # removes the border
  385. legend.key.size = unit(1, "cm"),
  386. # Sets overall area/size of the legend
  387. legend.text = element_text(size = 18, face = "bold"),
  388. # Text size
  389. title = element_text(size = 18, face = "bold")
  390. )
  391. p + stat_compare_means(
  392. comparisons = list(c("HET-PCB", "WT-VEHICLE"), c("HET-VEHICLE", "WT-VEHICLE"), c("WT-PCB", "WT-VEHICLE")),
  393. method = "t.test",
  394. label = "p.format"
  395. )
  396. ggplot2::ggsave("PEBBLES_module_pregnant_corr.pdf",
  397. device = NULL,
  398. height = 8.5,
  399. width = 12)
  400. p <- ggplot(plot_data, aes(x = Group, y = brown, fill = Exposure_duration)) +
  401. geom_violin() +
  402. theme_minimal() +
  403. guides(shape = guide_legend(override.aes = list(size = 5))) +
  404. labs(title = 'brown Module Trait correlation', y = "Module Eigengene") +
  405. theme(legend.position = "bottom") +
  406. theme_bw(base_size = 10) +
  407. theme(
  408. legend.position = 'right',
  409. legend.background = element_rect(),
  410. plot.title = element_text(angle = 0, size = 18, face = 'bold', vjust = 1),
  411. plot.subtitle = element_text(angle = 0, size = 14, face = 'bold', vjust = 1),
  412. plot.caption = element_text(angle = 0, size = 14, face = 'bold', vjust = 1),
  413. axis.text.x = element_text(angle = 90, size = 12, face = 'bold', hjust = 1.0, vjust = 0.5, colour = "black"),
  414. axis.text.y = element_text(angle = 0, size = 8, face = 'plain', vjust = 0.5, colour = "black"),
  415. axis.title = element_text(size = 18, face = 'bold', colour = "black"),
  416. axis.title.x = element_text(size = 18, face = 'bold', colour = "black"),
  417. axis.title.y = element_text(size = 18, face = 'bold', colour = "black"),
  418. axis.line = element_line(colour = 'black'),
  419. legend.key = element_blank(),
  420. # removes the border
  421. legend.key.size = unit(1, "cm"),
  422. # Sets overall area/size of the legend
  423. legend.text = element_text(size = 18, face = "bold"),
  424. # Text size
  425. title = element_text(size = 18, face = "bold")
  426. )
  427. p + stat_compare_means(
  428. comparisons = list(c("HET-PCB", "WT-VEHICLE"), c("HET-VEHICLE", "WT-VEHICLE"), c("WT-PCB", "WT-VEHICLE")),
  429. method = "t.test",
  430. label = "p.format"
  431. )
  432. ggplot2::ggsave("PEBBLES_module_ExposureDuration_corr.pdf",
  433. device = NULL,
  434. height = 8.5,
  435. width = 12)
  436. p <- ggplot(plot_data, aes(x = Group, y = brown, fill = Pregnant)) +
  437. geom_violin() +
  438. labs(
  439. title = "Violin Plot of Group vs brownE",
  440. x = "Group",
  441. y = "Module Eigengene"
  442. ) +
  443. theme_minimal() +
  444. guides(shape = guide_legend(override.aes = list(size = 5))) +
  445. labs(title = 'brown Module Trait correlation', y = "Module Eigengene") +
  446. theme(legend.position = "bottom") +
  447. theme_bw(base_size = 10) +
  448. theme(
  449. legend.position = 'right',
  450. legend.background = element_rect(),
  451. plot.title = element_text(angle = 0, size = 18, face = 'bold', vjust = 1),
  452. plot.subtitle = element_text(angle = 0, size = 14, face = 'bold', vjust = 1),
  453. plot.caption = element_text(angle = 0, size = 14, face = 'bold', vjust = 1),
  454. axis.text.x = element_text(angle = 90, size = 12, face = 'bold', hjust = 1.0, vjust = 0.5, colour = "black"),
  455. axis.text.y = element_text(angle = 0, size = 8, face = 'plain', vjust = 0.5, colour = "black"),
  456. axis.title = element_text(size = 18, face = 'bold', colour = "black"),
  457. axis.title.x = element_text(size = 18, face = 'bold', colour = "black"),
  458. axis.title.y = element_text(size = 18, face = 'bold', colour = "black"),
  459. axis.line = element_line(colour = 'black'),
  460. legend.key = element_blank(),
  461. # removes the border
  462. legend.key.size = unit(1, "cm"),
  463. # Sets overall area/size of the legend
  464. legend.text = element_text(size = 18, face = "bold"),
  465. # Text size
  466. title = element_text(size = 18, face = "bold")
  467. )
  468. p + stat_compare_means(
  469. comparisons = list(c("HET-PCB", "WT-VEHICLE"), c("HET-VEHICLE", "WT-VEHICLE"), c("WT-PCB", "WT-VEHICLE")),
  470. method = "t.test",
  471. label = "p.format"
  472. )
  473. ggplot2::ggsave("PEBBLES_module_pregnant_corr.pdf",
  474. device = NULL,
  475. height = 8.5,
  476. width = 12)
  477. brown_cor <- data.frame(mt_cor$cor$Sst[,5:5])
  478. brown_fdr <- data.frame(mt_cor$fdr$Sst[,5:5])
  479. brown <- merge(brown_cor, brown_fdr, by = "row.names", all = TRUE)
  480. # Calculate the adjacency matrix
  481. adj_matrix <- GetAssayData(PEBBLES_soupx, slot = "counts")
  482. adj_matrix <- cor(adj_matrix, use = "complete.obs")
  483. adj_matrix <- adj_matrix^2
  484. # Calculate the dissimilarity matrix
  485. diss_matrix <- 1 - (abs(adj_matrix)) / (max(adj_matrix) - min(adj_matrix))
  486. # Perform SVD on the dissimilarity matrix
  487. pca_results <- svd(diss_matrix)
  488. # Calculate the proportion of variance explained by each principal component
  489. prop_var_explained <- propVarExplained(pca_results)

hdWGCNA.R at commit 72d56f5, under MIT · at the source

Overview

Authors: Osman Sharifi1,2,3, Kari E. Neier1,2,3, Anthony Valenzuela4, Christina G. Torres1,2,3, Ian Korf5,2, Pamela J. Lein4, Dag H. Yasui1,2,3, Janine M. LaSalle1,2,3
  1. Medical Microbiology and Immunology, School of Medicine, University of California, Davis, Davis, CA 95616, USA
  2. Genome Center, University of California, Davis, Davis, CA 95616, USA
  3. MIND Institute, University of California, Davis, Davis, CA 95616, USA
  4. Department of Molecular Biosciences, Weill School of Veterinary Medicine, University of California, Davis, Davis, CA 95616, USA
  5. Cellular and Molecular Biology, College of Biological Sciences, University of California, Davis, Davis, CA 95616, USA
Institutions: University of California, Davis (United States)
Journal: iScience, volume 29, issue 5, article 115573
Dates: received 29 May 2025; accepted 30 March 2026; published online 20 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1016/j.isci.2026.115573 · PMID 42182856 · PMCID PMC13198081 · OpenAlex W4410927030
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), mouse (organism), cellular / molecular (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Connectivity
Keywords: health sciences, neuroscience, molecular neuroscience, systems neuroscience, cellular neuroscience, systems biology
Topic: Genetics and Neurodevelopmental Disorders (Genetics, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: NIH (T32ES007059, R01ES029213, R01AA027075, S10OD010786, U2CES030158, P50HD103526, U24DK097154); Superfund Research Center; University of Iowa (P42 ES013661)
Citations: not cited yet (Europe PMC); 35 references in the paper
Research resources: Mouse: C57BL/6J (wild-type) RRID:IMSR_JAX:000664, enrichR v3.2 RRID:SCR_001575, BWA v0.7.17 RRID:SCR_010910, LimmaVoom RRID:SCR_010943, Seurat v4.3.0.1 RRID:SCR_016341, biomaRt v3.21 RRID:SCR_019214

Abstract

Rett syndrome (RTT) is an X-linked, dominant neurodevelopmental disorder caused by mutations in MECP2, encoding the epigenetic regulator methyl CpG binding protein. Variability in severity and timing of progression in RTT, influenced by factors including mutation type, genetic background, and X chromosome inactivation patterns, suggests potential interaction with environmental neurotoxicants such as lipophilic polychlorinated biphenyls (PCBs). To understand shared mechanisms, we exposed WT and Mecp2e1−/+ female mice to a human-relevant PCB mixture and dose, then performed single-nucleus 5′ RNA-seq from cortex. We identified significant overlap in dysregulated genes and 71 shared pathways between the effects of PCB exposure and MeCP2 mutation, and co-mitigation of their transcriptional impacts. PCBs influenced the non-cell-autonomous transcriptional effects of MeCP2 mutations in wild-type-expressing neurons within the mosaic mutant female cortex in both mouse and human, suggesting that the interactions predominantly involve homeostatic gene networks. These findings have broader implications for gene by environment interactions in neurodevelopment.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 11 matches between paragraphs and lines of code.

osmansharifi/PCB_mouse_snRNAseq

License: MIT
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: 72d56f5e3260e8df76baea27e71a8e5ecc975372, 2 July 2026
Languages: R (51), Python (2)
Size: 452 files, 53 scripts
Software Heritage: not archived
Found in: “Data and code availability”
Holds: README, license file, environment (environment.yml), documentation, 3 notebooks
Not found: CITATION.cff, tests, continuous integration
Tools: tidyverse (46 files), ggplot2 (40 files), Seurat (38 files), edgeR (30 files), limma (12 files), ggpubr (11 files), patchwork (7 files), data.table (5 files), cowplot (2 files), igraph (2 files), pandas (2 files), WGCNA (2 files), pheatmap (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
55 files

Zenodo 13761244

License: CC-BY-4.0
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)
At the source:

osmansharifi/snrna-seq-pipeline

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: d9b2932c98fd82cd318fcf354e9857866a046882, 14 October 2024
Languages: R (56), Python (19), Perl (2), Jupyter (1)
Size: 814 files, 78 scripts
Software Heritage: not archived
Found in: the Zenodo archive record
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (41 files), ggplot2 (36 files), Seurat (34 files), edgeR (18 files), limma (12 files), pandas (12 files), patchwork (10 files), cowplot (7 files), ggpubr (7 files), ComplexHeatmap (4 files), NumPy (4 files), DESeq2 (3 files), Matplotlib (3 files), SingleCellExperiment (3 files), WGCNA (3 files), circlize (2 files), broom (1 file), data.table (1 file), SciPy (1 file), seaborn (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
79 files

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:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 131 scripts, each with its path and the digest of its content;
  • 11 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

No dataset and no data link were found in the paper.

Data and code availability

• Raw and processed sequencing data have been deposited at GEO: GSE316011 and is publicly available as of the date of publication. • All original code has been deposited at GitHub and is publicly available as of the date of publication (https://github.com/osmansharifi/PCB_mouse_snRNAseq). • Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.

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, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 6 keywords, 3 funders, 34 references, 6 RRIDs.

Cite

This paper

Sharifi, O., Neier, K. E., Valenzuela, A., Torres, C. G., Korf, I., Lein, P. J., Yasui, D. H., & LaSalle, J. M. (2026). Female cortical cellular mosaicism underlies shared MeCP2 and PCB impacted gene pathways. iScience, 29(5), 115573. https://doi.org/10.1016/j.isci.2026.115573

BibTeX

@article{sharifi2026female,
author = {Sharifi, Osman and Neier, Kari E. and Valenzuela, Anthony and Torres, Christina G. and Korf, Ian and Lein, Pamela J. and Yasui, Dag H. and LaSalle, Janine M.},
title = {{Female cortical cellular mosaicism underlies shared MeCP2 and PCB impacted gene pathways}},
journal = {iScience},
year = {2026},
month = apr,
volume = {29},
number = {5},
pages = {115573},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/j.isci.2026.115573},
url = {https://doi.org/10.1016/j.isci.2026.115573},
pmid = {42182856},
pmcid = {PMC13198081}
}

RIS

TY - JOUR
AU - Sharifi, Osman
AU - Neier, Kari E.
AU - Valenzuela, Anthony
AU - Torres, Christina G.
AU - Korf, Ian
AU - Lein, Pamela J.
AU - Yasui, Dag H.
AU - LaSalle, Janine M.
TI - Female cortical cellular mosaicism underlies shared MeCP2 and PCB impacted gene pathways
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/04/20
VL - 29
IS - 5
SP - 115573
SN - 2589-0042
PB - Elsevier
DO - 10.1016/j.isci.2026.115573
UR - https://doi.org/10.1016/j.isci.2026.115573
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.isci.2026.115573",
"type": "article-journal",
"title": "Female cortical cellular mosaicism underlies shared MeCP2 and PCB impacted gene pathways",
"container-title": "iScience",
"author": [
{
"family": "Sharifi",
"given": "Osman"
},
{
"family": "Neier",
"given": "Kari E."
},
{
"family": "Valenzuela",
"given": "Anthony"
},
{
"family": "Torres",
"given": "Christina G."
},
{
"family": "Korf",
"given": "Ian"
},
{
"family": "Lein",
"given": "Pamela J."
},
{
"family": "Yasui",
"given": "Dag H."
},
{
"family": "LaSalle",
"given": "Janine M."
}
],
"container-title-short": "iScience",
"volume": "29",
"issue": "5",
"page": "115573",
"DOI": "10.1016/j.isci.2026.115573",
"PMID": "42182856",
"PMCID": "PMC13198081",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.isci.2026.115573",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
20
]
]
}
}

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.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: WGCNA, SingleCellExperiment, edgeR, 18 other tools, cellular / molecular, 1 reference
[2] doi:10.1038/s41593-026-02367-0 [code]
A reproducible three-dimensional model of human brain tissue to investigate physiological and disease-associated microglia phenotypes.
Journal: Nature neuroscience
In common: WGCNA, SingleCellExperiment, edgeR, 13 other tools, cellular / molecular, 2 references
[3] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: WGCNA, edgeR, limma, 17 other tools, mouse, cellular / molecular
[4] doi:10.1002/imt2.70163 [code]
Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche.
Journal: iMeta
In common: SingleCellExperiment, edgeR, limma, 17 other tools, mouse, cellular / molecular
[5] 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: WGCNA, edgeR, limma, 17 other tools
[6] doi:10.1016/j.isci.2026.115657 [code]
Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug.
Journal: iScience
In common: WGCNA, edgeR, limma, 15 other tools
[7] doi:10.1038/s41586-026-10214-2 [code]
Multidimensional profiling of heterogeneity in supratentorial ependymomas.
Journal: Nature
In common: SingleCellExperiment, edgeR, igraph, 16 other tools, mouse
[8] doi:10.1016/j.cpblue.2026.100007 [code]
An integrated single-cell and spatial proteotranscriptomics atlas of fibroblast-driven immunoregulation within the human adult oral cavity.
Journal: Cell press blue
In common: SingleCellExperiment, edgeR, limma, 15 other tools
[9] doi:10.1038/s41467-026-76675-1 [code]
Long-read proteogenomic atlas of human neuronal differentiation reveals isoform diversity informing neurodevelopmental risk mechanisms.
Journal: Nature communications
In common: WGCNA, edgeR, limma, 15 other tools
[10] doi:10.3389/fnmol.2026.1844705 [code]
Risperidone regulates the expression of schizophrenia-related genes in the forebrain of adult male mice.
Journal: Frontiers in molecular neuroscience
In common: edgeR, limma, igraph, 14 other tools, mouse, cellular / molecular, 1 reference

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.

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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.