Last updated: 2025-08-25

Checks: 7 0

Knit directory: DXR_continue/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20250701) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 5383e33. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    data/Cormotif_data/
    Ignored:    data/DER_data/
    Ignored:    data/alignment_summary.txt
    Ignored:    data/all_peak_final_dataframe.txt
    Ignored:    data/cell_line_info_.tsv
    Ignored:    data/full_summary_QC_metrics.txt
    Ignored:    data/motif_lists/
    Ignored:    data/number_frag_peaks_summary.txt

Untracked files:
    Untracked:  analysis/Motif_cluster_analysis.Rmd
    Untracked:  code/corMotifcustom.R
    Untracked:  code/making_analysis_file_summary.R

Unstaged changes:
    Modified:   analysis/Cormotif_analysis.Rmd
    Modified:   analysis/Cormotif_outlier_removal.Rmd
    Modified:   analysis/multiQC_cut_tag.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/final_analysis.Rmd) and HTML (docs/final_analysis.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 5383e33 reneeisnowhere 2025-08-25 adding PC percentages on plots
html 2607194 reneeisnowhere 2025-08-22 Build site.
Rmd 19dbd3a reneeisnowhere 2025-08-22 wflow_publish("analysis/final_analysis.Rmd")
html 8c96567 reneeisnowhere 2025-08-22 Build site.
Rmd 9115594 reneeisnowhere 2025-08-22 updates to cor/lcpm
html ac6eb8d reneeisnowhere 2025-08-21 Build site.
Rmd 7e4a4f4 reneeisnowhere 2025-08-21 wflow_publish(c("analysis/Outlier_removal.Rmd", "analysis/final_analysis.Rmd"))
html aa92650 reneeisnowhere 2025-08-12 Build site.
html fda033f reneeisnowhere 2025-08-12 fix index pages
Rmd b3a5d2e reneeisnowhere 2025-08-12 removing chrX from analysis
html 6c6c7f4 infurnoheat 2025-08-04 Build site.
Rmd fad9b2f infurnoheat 2025-08-04 wflow_publish("analysis/final_analysis.Rmd")
html f4826e1 infurnoheat 2025-08-01 Build site.
Rmd f9fe741 infurnoheat 2025-08-01 wflow_publish("analysis/final_analysis.Rmd")

Final Anaylsis

Loading Packages

library(tidyverse)
library(readr)
library(edgeR)
library(ComplexHeatmap)
library(data.table)
library(dplyr)
library(stringr)
library(ggplot2)
library(viridis)
library(DT)
library(kableExtra)
library(genomation)
library(GenomicRanges)
library(chromVAR) ## For FRiP analysis and differential analysis
library(DESeq2) ## For differential analysis section
library(ggpubr) ## For customizing figures
library(corrplot) ## For correlation plot
library(ggpmisc)
library(gcplyr)
library(Rsubread)
library(limma)
library(ggrastr)
library(cowplot)
library(smplot2)
library(ggVennDiagram)

Data Initialization

sampleinfo <- read_delim("data/sample_info.tsv", delim = "\t")

Functions

drug_pal <- c("#8B006D","#DF707E","#F1B72B", "#3386DD","#707031","#41B333")
pca_plot <- function(pca_obj, df,
                     col_var = NULL,
                     shape_var = NULL,
                     text_var = NULL,
                     title = "") {
  
  # variance explained
  a <- prop_var_percent(pca_obj)
  
  ggplot(df, aes_string(x = "PC1", y = "PC2")) +
    geom_point(aes_string(color = col_var, shape = shape_var), size = 5) +
    ggrepel::geom_text_repel(aes_string(label = text_var),
                             vjust = -.5,
                             max.overlaps = 30) +
    labs(
      title = title,
      x = paste0("PC1 (", round(a[1], 1), "%)"),
      y = paste0("PC2 (", round(a[2], 1), "%)")
    ) +
    scale_color_manual(values = c(
      "#8B006D", "#DF707E", "#F1B72B",
      "#3386DD", "#707031", "#41B333"
    ))
}

pca_var_plot <- function(pca) {
  # x: class == prcomp
  pca.var <- pca$sdev ^ 2
  pca.prop <- pca.var / sum(pca.var)
  var.plot <-
    qplot(PC, prop, data = data.frame(PC = 1:length(pca.prop),
                                      prop = pca.prop)) +
    labs(title = 'Variance contributed by each PC',
         x = 'PC', y = 'Proportion of variance')
  plot(var.plot)
}

calc_pca <- function(x) {
  # Performs principal components analysis with prcomp
  # x: a sample-by-gene numeric matrix
  prcomp(x, scale. = TRUE, retx = TRUE)
}

get_regr_pval <- function(mod) {
  # Returns the p-value for the Fstatistic of a linear model
  # mod: class lm
  stopifnot(class(mod) == "lm")
  fstat <- summary(mod)$fstatistic
  pval <- 1 - pf(fstat[1], fstat[2], fstat[3])
  return(pval)
}

prop_var_percent <- function(pca_result){ 
  # Ensure the input is a PCA result object
  if (!inherits(pca_result, "prcomp")) {
    stop("Input must be a result from prcomp()")
  }
  
  # Get the standard deviations from the PCA result
  sdev <- pca_result$sdev
  
  # Calculate the proportion of variance
  proportion_variance <- (sdev^2) / sum(sdev^2)*100
  
  return(proportion_variance)
}

plot_versus_pc <- function(df, pc_num, fac) {
  # df: data.frame
  # pc_num: numeric, specific PC for plotting
  # fac: column name of df for plotting against PC
  pc_char <- paste0("PC", pc_num)
  # Calculate F-statistic p-value for linear model
  pval <- get_regr_pval(lm(df[, pc_char] ~ df[, fac]))
  if (is.numeric(df[, f])) {
    ggplot(df, aes_string(x = f, y = pc_char)) + geom_point() +
      geom_smooth(method = "lm") + labs(title = sprintf("p-val: %.2f", pval))
  } else {
    ggplot(df, aes_string(x = f, y = pc_char)) + geom_boxplot() +
      labs(title = sprintf("p-val: %.2f", pval))
  }
}
x_axis_labels = function(labels, every_nth = 1, ...) {
  axis(side = 1,
       at = seq_along(labels),
       labels = F)
  text(
    x = (seq_along(labels))[seq_len(every_nth) == 1],
    y = par("usr")[3] - 0.075 * (par("usr")[4] - par("usr")[3]),
    labels = labels[seq_len(every_nth) == 1],
    xpd = TRUE,
    ...
  )
}

volcanosig <- function(df, psig.lvl) {
    df <- df %>% 
    mutate(threshold = ifelse(adj.P.Val > psig.lvl, "A", ifelse(adj.P.Val <= psig.lvl & logFC<=0,"B","C")))
      # ifelse(adj.P.Val <= psig.lvl & logFC >= 0,"B", "C")))
    ##This is where I could add labels, but I have taken out
    # df <- df %>% mutate(genelabels = "")
    # df$genelabels[1:topg] <- df$rownames[1:topg]
    
  ggplot(df, aes(x=logFC, y=-log10(P.Value))) + 
    ggrastr::geom_point_rast(aes(color=threshold))+
    # geom_text_repel(aes(label = genelabels), segment.curvature = -1e-20,force = 1,size=2.5,
    # arrow = arrow(length = unit(0.015, "npc")), max.overlaps = Inf) +
    #geom_hline(yintercept = -log10(psig.lvl))+
    xlab(expression("Log"[2]*" FC"))+
    ylab(expression("-log"[10]*"P Value"))+
    scale_color_manual(values = c("black", "red","blue"))+
    theme_cowplot()+
    ylim(0,25)+
    xlim(-6,6)+
    theme(legend.position = "none",
              plot.title = element_text(size = rel(1.5), hjust = 0.5),
              axis.title = element_text(size = rel(0.8))) 
}

Final Analysis

peak_ct <- read_delim("data/peaks/peaks_cts_FINAL.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_FINAl_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_FINAL_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_FINAL_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_FINAL_results.tsv",delim = "\t")

all_peak_final <- rbind(H3K27ac_peaks, H3K27me3_peaks, H3K36me3_peaks, H3K9me3_peaks)

all_peak_final <- all_peak_final %>%
  dplyr::select(Sample, Total_Reads, Fragments, Reads_in_Peaks, FRiP) %>%
  left_join(.,sampleinfo, by=c("Sample"="Library ID")) %>%
  left_join(.,peak_ct, by=c("Sample"="Sample"))
all_peak_final <- all_peak_final[(!all_peak_final$Treatment %in% "5FU"),]
# write_delim(all_peak_final,"data/all_peak_final_dataframe.txt",delim = "\t")
all_peak_final %>% 
   ggplot(.,aes(x=Sample, y=Count,fill=Histone_Mark))+
   geom_col()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak number for all samples")+ 
  theme(axis.text.x=element_text(vjust = .2,angle=90))+
  scale_y_continuous( expand = expansion(mult = c(0, .1)))

Version Author Date
f4826e1 infurnoheat 2025-08-01
all_peak_final %>% 
  ggplot(., aes (x=Treatment, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
f4826e1 infurnoheat 2025-08-01
all_peak_final %>% 
  ggplot(., aes (x=Timepoint, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
f4826e1 infurnoheat 2025-08-01

Tagging Questionable Libraries by FRiP

questionable_frip = all_peak_final[(all_peak_final$FRiP < 0.2),]
questionable_frip
# A tibble: 28 × 10
   Sample    Total_Reads Fragments Reads_in_Peaks   FRiP Histone_Mark Individual
   <chr>           <dbl>     <dbl>          <dbl>  <dbl> <chr>        <chr>     
 1 MCW_CT_R…     8333500   8333500        1412823 0.170  H3K36me3     Ind1      
 2 MCW_CT_R…     6705202   6705202        1250936 0.186  H3K36me3     Ind4      
 3 MCW_CT_R…      951069    951069         130753 0.137  H3K36me3     Ind1      
 4 MCW_CT_R…     8360401   8360401        1063627 0.127  H3K36me3     Ind3      
 5 MCW_CT_R…     7240342   7240342        1032016 0.142  H3K36me3     Ind1      
 6 MCW_CT_R…    13447374  13447374        2214575 0.165  H3K36me3     Ind2      
 7 MCW_CT_R…     5545665   5545665         644296 0.116  H3K36me3     Ind4      
 8 MCW_CT_R…     8211417   8211417         672532 0.0819 H3K36me3     Ind2      
 9 MCW_CT_R…     9520493   9520493        1332644 0.140  H3K36me3     Ind4      
10 MCW_CT_R…    23130869  23130869        3401081 0.147  H3K9me3      Ind1      
# ℹ 18 more rows
# ℹ 3 more variables: Treatment <chr>, Timepoint <chr>, Count <dbl>

Feature Counts

H3K27ac_merged <- read_delim("data/peaks/H3K27ac_FINAL_counts.txt", 
    delim = "\t", escape_double = FALSE, 
    trim_ws = TRUE, skip = 1)
H3K27me3_merged <- read_delim("data/peaks/H3K27me3_FINAL_counts.txt", 
    delim = "\t", escape_double = FALSE, 
    trim_ws = TRUE, skip = 1)
H3K36me3_merged <- read_delim("data/peaks/H3K36me3_FINAL_counts.txt", 
    delim = "\t", escape_double = FALSE, 
    trim_ws = TRUE, skip = 1)
H3K9me3_merged <- read_delim("data/peaks/H3K9me3_FINAL_counts.txt", 
    delim = "\t", escape_double = FALSE, 
    trim_ws = TRUE, skip = 1)
rename_list <- sampleinfo %>% 
  mutate(stem= "_nobl.bam") %>% 
  mutate(prefix=paste0("/scratch/10819/styu/MW_multiQC/peaks/",Histone_Mark,"/",Treatment,"/",Timepoint,"/")) %>%
  mutate(oldname=paste0(prefix,`Library ID`,"/",`Library ID`,stem)) %>% 
  mutate(newname=paste0(Individual,"_",Treatment,"_",Timepoint)) %>% 
  dplyr::select(oldname,newname)
rename_vec <- setNames(rename_list$newname, rename_list$oldname)
names(H3K27ac_merged)[names(H3K27ac_merged) %in% names(rename_vec)] <- rename_vec[names(H3K27ac_merged)[names(H3K27ac_merged) %in% names(rename_vec)]]
names(H3K27me3_merged)[names(H3K27me3_merged) %in% names(rename_vec)] <- rename_vec[names(H3K27me3_merged)[names(H3K27me3_merged) %in% names(rename_vec)]]
names(H3K36me3_merged)[names(H3K36me3_merged) %in% names(rename_vec)] <- rename_vec[names(H3K36me3_merged)[names(H3K36me3_merged) %in% names(rename_vec)]]
names(H3K9me3_merged)[names(H3K9me3_merged) %in% names(rename_vec)] <- rename_vec[names(H3K9me3_merged)[names(H3K9me3_merged) %in% names(rename_vec)]]

H3K27ac Count Analysis

H3K27ac_merged_raw <- H3K27ac_merged %>% 
  dplyr::select(Geneid,contains("Ind")) %>% 
  column_to_rownames("Geneid") %>% 
  as.matrix()

H3K27ac_merged_lcpm <- H3K27ac_merged %>% 
  dplyr::select(Geneid,contains("Ind")) %>% 
  column_to_rownames("Geneid") %>% 
  cpm(., log = TRUE)
H3K27ac_merged_cor <- H3K27ac_merged_lcpm %>% 
  cor()

annomat <- data.frame(sample=colnames(H3K27ac_merged_cor)) %>% 
  separate_wider_delim(sample,delim="_",names=c("Ind","Treatment","Timepoint"),cols_remove = FALSE) %>% 
  mutate(Treatment=factor(Treatment, levels = c("VEH","5FU","DOX")),
         Timepoint=factor(Timepoint, levels =c("24T","24R","144R"))) %>% 
  column_to_rownames("sample")
heatmap_first <- ComplexHeatmap::HeatmapAnnotation(df = annomat)

Heatmap(H3K27ac_merged_cor, 
        top_annotation = heatmap_first,
        column_title="Unfiltered log2cpm H3K27ac with Standard Merging")

Version Author Date
f4826e1 infurnoheat 2025-08-01

H3K27me3 Count Analysis

H3K27me3_merged_raw <- H3K27me3_merged %>% 
  dplyr::select(Geneid,contains("Ind")) %>% 
  column_to_rownames("Geneid") %>% 
  as.matrix()

H3K27me3_merged_lcpm <- H3K27me3_merged %>% 
  dplyr::select(Geneid,contains("Ind")) %>% 
  column_to_rownames("Geneid") %>% 
  cpm(., log = TRUE)
H3K27me3_merged_cor <- H3K27me3_merged_lcpm %>% 
  cor()

annomat <- data.frame(sample=colnames(H3K27me3_merged_cor)) %>% 
  separate_wider_delim(sample,delim="_",names=c("Ind","Treatment","Timepoint"),cols_remove = FALSE) %>% 
  mutate(Treatment=factor(Treatment, levels = c("VEH","5FU","DOX")),
         Timepoint=factor(Timepoint, levels =c("24T","24R","144R"))) %>% 
  column_to_rownames("sample")
heatmap_first <- ComplexHeatmap::HeatmapAnnotation(df = annomat)

Heatmap(H3K27me3_merged_cor, 
        top_annotation = heatmap_first,
        column_title="Unfiltered log2cpm H3K27me3 with Standard Merging")

Version Author Date
f4826e1 infurnoheat 2025-08-01

H3K36me3 Count Analysis

H3K36me3_merged_raw <- H3K36me3_merged %>% 
  dplyr::select(Geneid,contains("Ind")) %>% 
  column_to_rownames("Geneid") %>% 
  as.matrix()

H3K36me3_merged_lcpm <- H3K36me3_merged %>% 
  dplyr::select(Geneid,contains("Ind")) %>% 
  column_to_rownames("Geneid") %>% 
  cpm(., log = TRUE)
H3K36me3_merged_cor <- H3K36me3_merged_lcpm %>% 
  cor()

annomat <- data.frame(sample=colnames(H3K36me3_merged_cor)) %>% 
  separate_wider_delim(sample,delim="_",names=c("Ind","Treatment","Timepoint"),cols_remove = FALSE) %>% 
  mutate(Treatment=factor(Treatment, levels = c("VEH","5FU","DOX")),
         Timepoint=factor(Timepoint, levels =c("24T","24R","144R"))) %>% 
  column_to_rownames("sample")
heatmap_first <- ComplexHeatmap::HeatmapAnnotation(df = annomat)

Heatmap(H3K36me3_merged_cor, 
        top_annotation = heatmap_first,
        column_title="Unfiltered log2cpm H3K36me3 with Standard Merging")

Version Author Date
f4826e1 infurnoheat 2025-08-01

H3K9me3 Count Analysis

H3K9me3_merged_raw <- H3K9me3_merged %>% 
  dplyr::select(Geneid,contains("Ind")) %>% 
  column_to_rownames("Geneid") %>% 
  as.matrix()

H3K9me3_merged_lcpm <- H3K9me3_merged %>% 
  dplyr::select(Geneid,contains("Ind")) %>% 
  column_to_rownames("Geneid") %>% 
  cpm(., log = TRUE)
H3K9me3_merged_cor <- H3K9me3_merged_lcpm %>% 
  cor()

annomat <- data.frame(sample=colnames(H3K9me3_merged_cor)) %>% 
  separate_wider_delim(sample,delim="_",names=c("Ind","Treatment","Timepoint"),cols_remove = FALSE) %>% 
  mutate(Treatment=factor(Treatment, levels = c("VEH","5FU","DOX")),
         Timepoint=factor(Timepoint, levels =c("24T","24R","144R"))) %>% 
  column_to_rownames("sample")
heatmap_first <- ComplexHeatmap::HeatmapAnnotation(df = annomat)

Heatmap(H3K9me3_merged_cor, 
        top_annotation = heatmap_first,
        column_title="Unfiltered log2cpm H3K9me3 with Standard Merging")

Version Author Date
f4826e1 infurnoheat 2025-08-01

Fragment Analysis

all_peak_final %>%
  mutate(Fragments=Fragments/1000000) %>% 
  ggplot(., aes(x=interaction(Individual,Treatment,Timepoint), y=Fragments, fill=Treatment, group = Treatment))+
  geom_col()+
  geom_text(aes(y = 0,label = Sample), vjust = 0.2, size = 3, angle = 90)+
  theme_classic()+
  facet_wrap(~Histone_Mark)+
  ggtitle("Fragment count by histone and sample")+
  ylab("Count of Fragments * 10^6")+
  xlab("Samples")+
  theme(axis.text.x=element_text(vjust = .2,angle=90))+
  scale_y_continuous( expand = expansion(mult = c(0, .1)))

Version Author Date
f4826e1 infurnoheat 2025-08-01
all_peak_final %>%
  mutate(FRiP=FRiP * 100) %>% 
  ggplot(., aes(x=interaction(Individual,Treatment,Timepoint), y=FRiP, fill=Treatment, group = Treatment))+
  geom_col()+
  geom_text(aes(y = 0,label = Sample), vjust = 0.2, size = 3, angle = 90)+
  theme_classic()+
  facet_wrap(~Histone_Mark)+
  ggtitle("Frip Percent by histone and sample")+
  ylab("Frip %")+
  xlab("Samples")+
  theme(axis.text.x=element_text(vjust = .2,angle=90))+
  scale_y_continuous( expand = expansion(mult = c(0, .1)))

Version Author Date
f4826e1 infurnoheat 2025-08-01

Differential Analysis

Filtering Sex Chromosomes

Removing chrX and chrY

H3K27ac_merged_raw <- H3K27ac_merged_raw[rowMeans(H3K27ac_merged_lcpm)>0,]
H3K27ac_merged_raw <- H3K27ac_merged_raw[!grepl("chrY",rownames(H3K27ac_merged_raw)),]
H3K27ac_merged_raw <- H3K27ac_merged_raw[!grepl("chrX",rownames(H3K27ac_merged_raw)),]

H3K27me3_merged_raw <- H3K27me3_merged_raw[rowMeans(H3K27me3_merged_lcpm)>0,]
H3K27me3_merged_raw <- H3K27me3_merged_raw[!grepl("chrY",rownames(H3K27me3_merged_raw)),]
H3K27me3_merged_raw <- H3K27me3_merged_raw[!grepl("chrX",rownames(H3K27me3_merged_raw)),]


H3K36me3_merged_raw <- H3K36me3_merged_raw[rowMeans(H3K36me3_merged_lcpm)>0,]
H3K36me3_merged_raw <- H3K36me3_merged_raw[!grepl("chrY",rownames(H3K36me3_merged_raw)),]
H3K36me3_merged_raw <- H3K36me3_merged_raw[!grepl("chrX",rownames(H3K36me3_merged_raw)),]

H3K9me3_merged_raw <- H3K9me3_merged_raw[rowMeans(H3K9me3_merged_lcpm)>0,]
H3K9me3_merged_raw <- H3K9me3_merged_raw[!grepl("chrY",rownames(H3K9me3_merged_raw)),]
H3K9me3_merged_raw <- H3K9me3_merged_raw[!grepl("chrX",rownames(H3K9me3_merged_raw)),]

Setting up Matrix

H3K27ac_annomat <- data.frame(timeset=colnames(H3K27ac_merged_raw)) %>% 
  mutate(sample=timeset) %>% 
  separate(timeset, into = c("ind","tx","time")) %>% 
  mutate(tx=factor(tx, levels = c("VEH", "DOX")),
         time=factor(time, levels =c("24T","24R","144R"))) %>%
  mutate(ind = gsub("Ind", "", ind)) %>%
  mutate(txtime = paste0(tx, "_", time)) %>%
  mutate(group = txtime)
H3K27ac_annomat$group <- H3K27ac_annomat$group %>%
  gsub("DOX_24T", "1", .) %>%
  gsub("DOX_24R", "2", .) %>%
  gsub("DOX_144R", "3", .) %>%
  gsub("VEH_24T", "4", .) %>%
  gsub("VEH_24R", "5", .) %>%
  gsub("VEH_144R", "6", .)

H3K27me3_annomat <- data.frame(timeset=colnames(H3K27me3_merged_raw)) %>% 
  mutate(sample=timeset) %>% 
  separate(timeset, into = c("ind","tx","time")) %>% 
  mutate(tx=factor(tx, levels = c("VEH", "DOX")),
         time=factor(time, levels =c("24T","24R","144R"))) %>%
  mutate(ind = gsub("Ind", "", ind)) %>%
  mutate(txtime = paste0(tx, "_", time)) %>%
  mutate(group = txtime)
H3K27me3_annomat$group <- H3K27me3_annomat$group %>%
  gsub("DOX_24T", "1", .) %>%
  gsub("DOX_24R", "2", .) %>%
  gsub("DOX_144R", "3", .) %>%
  gsub("VEH_24T", "4", .) %>%
  gsub("VEH_24R", "5", .) %>%
  gsub("VEH_144R", "6", .)

H3K36me3_annomat <- data.frame(timeset=colnames(H3K36me3_merged_raw)) %>% 
  mutate(sample=timeset) %>% 
  separate(timeset, into = c("ind","tx","time")) %>% 
  mutate(tx=factor(tx, levels = c("VEH", "DOX")),
         time=factor(time, levels =c("24T","24R","144R"))) %>%
  mutate(ind = gsub("Ind", "", ind)) %>%
  mutate(txtime = paste0(tx, "_", time)) %>%
  mutate(group = txtime)
H3K36me3_annomat$group <- H3K36me3_annomat$group %>%
  gsub("DOX_24T", "1", .) %>%
  gsub("DOX_24R", "2", .) %>%
  gsub("DOX_144R", "3", .) %>%
  gsub("VEH_24T", "4", .) %>%
  gsub("VEH_24R", "5", .) %>%
  gsub("VEH_144R", "6", .)

H3K9me3_annomat <- data.frame(timeset=colnames(H3K9me3_merged_raw)) %>% 
  mutate(sample=timeset) %>% 
  separate(timeset, into = c("ind","tx","time")) %>% 
  mutate(tx=factor(tx, levels = c("VEH", "DOX")),
         time=factor(time, levels =c("24T","24R","144R"))) %>%
  mutate(ind = gsub("Ind", "", ind)) %>%
  mutate(txtime = paste0(tx, "_", time)) %>%
  mutate(group = txtime)
H3K9me3_annomat$group <- H3K9me3_annomat$group %>%
  gsub("DOX_24T", "1", .) %>%
  gsub("DOX_24R", "2", .) %>%
  gsub("DOX_144R", "3", .) %>%
  gsub("VEH_24T", "4", .) %>%
  gsub("VEH_24R", "5", .) %>%
  gsub("VEH_144R", "6", .)

dge_H3K27ac <- edgeR::DGEList(counts = H3K27ac_merged_raw, group = H3K27ac_annomat$group, genes = row.names(H3K27ac_merged_raw))
dge_H3K27me3 <- edgeR::DGEList(counts = H3K27me3_merged_raw, group = H3K27me3_annomat$group, genes = row.names(H3K27me3_merged_raw))
dge_H3K36me3 <- edgeR::DGEList(counts = H3K36me3_merged_raw, group = H3K36me3_annomat$group, genes = row.names(H3K36me3_merged_raw))
dge_H3K9me3 <- edgeR::DGEList(counts = H3K9me3_merged_raw, group = H3K9me3_annomat$group, genes = row.names(H3K9me3_merged_raw))

dge_H3K27ac <- edgeR::calcNormFactors(dge_H3K27ac)
dge_H3K27me3 <- edgeR::calcNormFactors(dge_H3K27me3)
dge_H3K36me3 <- edgeR::calcNormFactors(dge_H3K36me3)
dge_H3K9me3 <- edgeR::calcNormFactors(dge_H3K9me3)

mm_H3K27ac <- model.matrix(~0 + H3K27ac_annomat$txtime)
colnames(mm_H3K27ac) <- H3K27ac_annomat$txtime %>% unique()

mm_H3K27me3 <- model.matrix(~0 + H3K27me3_annomat$txtime)
colnames(mm_H3K27me3) <- H3K27me3_annomat$txtime %>% unique()

mm_H3K36me3 <- model.matrix(~0 + H3K36me3_annomat$txtime)
colnames(mm_H3K36me3) <- H3K36me3_annomat$txtime %>% unique()

mm_H3K9me3 <- model.matrix(~0 + H3K9me3_annomat$txtime)
colnames(mm_H3K9me3) <- H3K9me3_annomat$txtime %>% unique()

Volcano Plots

H3K27ac

y <- voom(dge_H3K27ac, mm_H3K27ac, plot = FALSE)
corfit <- duplicateCorrelation(y, mm_H3K27ac, block = H3K27ac_annomat$ind)
v <- voom(dge_H3K27ac, mm_H3K27ac, block = H3K27ac_annomat$ind, correlation = corfit$consensus.correlation)
fit <- lmFit(v, mm_H3K27ac, block = H3K27ac_annomat$ind, correlation = corfit$consensus.correlation)
cm <- makeContrasts(
  DOX_24T.VEH_24T = DOX_24T-VEH_24T,
  DOX_24R.VEH_24R = DOX_24R-VEH_24R,
  DOX_144R.VEH_144R = DOX_144R-VEH_144R,
  levels = mm_H3K27ac)

fit2<- contrasts.fit(fit, contrasts=cm)
efit2 <- eBayes(fit2)

results = decideTests(efit2)

summary(results)
       DOX_24T.VEH_24T DOX_24R.VEH_24R DOX_144R.VEH_144R
Down             13935            8070                22
NotSig          124546          133714            150045
Up               11590            8287                 4
plotSA(efit2, main="Mean-Variance trend for final model for H3K27ac")

Version Author Date
8c96567 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
f4826e1 infurnoheat 2025-08-01
V.24T.top= topTable(efit2, coef=1, adjust.method="BH", number=Inf, sort.by="p")
V.24R.top= topTable(efit2, coef=2, adjust.method="BH", number=Inf, sort.by="p")
V.144R.top= topTable(efit2, coef=3, adjust.method="BH", number=Inf, sort.by="p")

H3K27ac_24T <- volcanosig(V.24T.top, 0.05)+ ggtitle("DOX 24T")
H3K27ac_24R <- volcanosig(V.24R.top, 0.05)+ ggtitle("DOX 24R")+ylab("")
H3K27ac_144R <- volcanosig(V.144R.top, 0.05)+ ggtitle("DOX 144R")+ylab("")
plot_grid(H3K27ac_24T, H3K27ac_24R, H3K27ac_144R, rel_widths =c(1,1,1))

Version Author Date
8c96567 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
f4826e1 infurnoheat 2025-08-01

H3K27me3

y <- voom(dge_H3K27me3, mm_H3K27me3, plot = FALSE)
corfit <- duplicateCorrelation(y, mm_H3K27me3, block = H3K27me3_annomat$ind)
v <- voom(dge_H3K27me3, mm_H3K27me3, block = H3K27me3_annomat$ind, correlation = corfit$consensus.correlation)
fit <- lmFit(v, mm_H3K27me3, block = H3K27me3_annomat$ind, correlation = corfit$consensus.correlation)
cm <- makeContrasts(
  DOX_24T.VEH_24T = DOX_24T-VEH_24T,
  DOX_24R.VEH_24R = DOX_24R-VEH_24R,
  DOX_144R.VEH_144R = DOX_144R-VEH_144R,
  levels = mm_H3K27me3)

fit2<- contrasts.fit(fit, contrasts=cm)
efit2 <- eBayes(fit2)

results = decideTests(efit2)

summary(results)
       DOX_24T.VEH_24T DOX_24R.VEH_24R DOX_144R.VEH_144R
Down                 8               4                 0
NotSig          150449          150457            150464
Up                   7               3                 0
plotSA(efit2, main="Mean-Variance trend for final model for H3K27me3")

Version Author Date
8c96567 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
f4826e1 infurnoheat 2025-08-01
V.24T.top= topTable(efit2, coef=1, adjust.method="BH", number=Inf, sort.by="p")
V.24R.top= topTable(efit2, coef=2, adjust.method="BH", number=Inf, sort.by="p")
V.144R.top= topTable(efit2, coef=3, adjust.method="BH", number=Inf, sort.by="p")

H3K27me3_24T <- volcanosig(V.24T.top, 0.05)+ ggtitle("DOX 24T")
H3K27me3_24R <- volcanosig(V.24R.top, 0.05)+ ggtitle("DOX 24R")+ylab("")
H3K27me3_144R <- volcanosig(V.144R.top, 0.05)+ ggtitle("DOX 144R")+ylab("")
plot_grid(H3K27me3_24T, H3K27me3_24R, H3K27me3_144R, rel_widths =c(1,1,1))

Version Author Date
8c96567 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
f4826e1 infurnoheat 2025-08-01

H3K36me3

y <- voom(dge_H3K36me3, mm_H3K36me3, plot = FALSE)
corfit <- duplicateCorrelation(y, mm_H3K36me3, block = H3K36me3_annomat$ind)
v <- voom(dge_H3K36me3, mm_H3K36me3, block = H3K36me3_annomat$ind, correlation = corfit$consensus.correlation)
fit <- lmFit(v, mm_H3K36me3, block = H3K36me3_annomat$ind, correlation = corfit$consensus.correlation)
cm <- makeContrasts(
  DOX_24T.VEH_24T = DOX_24T-VEH_24T,
  DOX_24R.VEH_24R = DOX_24R-VEH_24R,
  DOX_144R.VEH_144R = DOX_144R-VEH_144R,
  levels = mm_H3K36me3)

fit2<- contrasts.fit(fit, contrasts=cm)
efit2 <- eBayes(fit2)

results = decideTests(efit2)

summary(results)
       DOX_24T.VEH_24T DOX_24R.VEH_24R DOX_144R.VEH_144R
Down              1455             186                 0
NotSig          184217          186246            186724
Up                1052             292                 0
plotSA(efit2, main="Mean-Variance trend for final model for H3K36me3")

Version Author Date
fda033f reneeisnowhere 2025-08-12
f4826e1 infurnoheat 2025-08-01
V.24T.top= topTable(efit2, coef=1, adjust.method="BH", number=Inf, sort.by="p")
V.24R.top= topTable(efit2, coef=2, adjust.method="BH", number=Inf, sort.by="p")
V.144R.top= topTable(efit2, coef=3, adjust.method="BH", number=Inf, sort.by="p")

H3K36me3_24T <- volcanosig(V.24T.top, 0.05)+ ggtitle("DOX 24T")
H3K36me3_24R <- volcanosig(V.24R.top, 0.05)+ ggtitle("DOX 24R")+ylab("")
H3K36me3_144R <- volcanosig(V.144R.top, 0.05)+ ggtitle("DOX 144R")+ylab("")
plot_grid(H3K36me3_24T, H3K36me3_24R, H3K36me3_144R, rel_widths =c(1,1,1))

Version Author Date
8c96567 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
f4826e1 infurnoheat 2025-08-01

H3K9me3

y <- voom(dge_H3K9me3, mm_H3K9me3, plot = FALSE)
corfit <- duplicateCorrelation(y, mm_H3K9me3, block = H3K9me3_annomat$ind)
v <- voom(dge_H3K9me3, mm_H3K9me3, block = H3K9me3_annomat$ind, correlation = corfit$consensus.correlation)
fit <- lmFit(v, mm_H3K9me3, block = H3K9me3_annomat$ind, correlation = corfit$consensus.correlation)
cm <- makeContrasts(
  DOX_24T.VEH_24T = DOX_24T-VEH_24T,
  DOX_24R.VEH_24R = DOX_24R-VEH_24R,
  DOX_144R.VEH_144R = DOX_144R-VEH_144R,
  levels = mm_H3K9me3)

fit2<- contrasts.fit(fit, contrasts=cm)
efit2 <- eBayes(fit2)

results = decideTests(efit2)

summary(results)
       DOX_24T.VEH_24T DOX_24R.VEH_24R DOX_144R.VEH_144R
Down               793               1                 0
NotSig          208703          218530            218647
Up                9151             116                 0
plotSA(efit2, main="Mean-Variance trend for final model for H3K9me3")

Version Author Date
fda033f reneeisnowhere 2025-08-12
f4826e1 infurnoheat 2025-08-01
V.24T.top= topTable(efit2, coef=1, adjust.method="BH", number=Inf, sort.by="p")
V.24R.top= topTable(efit2, coef=2, adjust.method="BH", number=Inf, sort.by="p")
V.144R.top= topTable(efit2, coef=3, adjust.method="BH", number=Inf, sort.by="p")

H3K9me3_24T <- volcanosig(V.24T.top, 0.05)+ ggtitle("DOX 24T")
H3K9me3_24R <- volcanosig(V.24R.top, 0.05)+ ggtitle("DOX 24R")+ylab("")
H3K9me3_144R <- volcanosig(V.144R.top, 0.05)+ ggtitle("DOX 144R")+ylab("")
plot_grid(H3K9me3_24T, H3K9me3_24R, H3K9me3_144R, rel_widths =c(1,1,1))

Version Author Date
8c96567 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
f4826e1 infurnoheat 2025-08-01

PCA Plots

H3K27ac

H3K27ac_merged_filt_lcpm <- H3K27ac_merged_raw %>% cpm(., log = TRUE)
pca_H3K27ac <- calc_pca(t(H3K27ac_merged_filt_lcpm))
pca_var_plot(pca_H3K27ac)

Version Author Date
2607194 reneeisnowhere 2025-08-22
6c6c7f4 infurnoheat 2025-08-04
pca_H3K27ac_df <- data.frame(pca_H3K27ac$x , H3K27ac_annomat)
pca_plot(
  pca_H3K27ac,
  pca_H3K27ac_df,
  col_var = "time",
  shape_var = "tx",
  text_var = "ind",   # <-- string, not vector
  title = "H3K27ac filtered lcpm PCA"
)        

Version Author Date
2607194 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
6c6c7f4 infurnoheat 2025-08-04
H3K27ac_merged_raw_lcpm <- H3K27ac_merged_raw %>% 
  cpm(., log = TRUE)

H3K27ac_merged_filt_cor <- H3K27ac_merged_raw_lcpm %>% 
  cor()

annomat <- data.frame(sample=colnames(H3K27ac_merged_filt_cor)) %>% 
  separate_wider_delim(sample,delim="_",names=c("Ind","Treatment","Timepoint"),cols_remove = FALSE) %>% 
  mutate(Treatment=factor(Treatment, levels = c("VEH","5FU","DOX")),
         Timepoint=factor(Timepoint, levels =c("24T","24R","144R"))) %>% 
  column_to_rownames("sample")
heatmap_second <- ComplexHeatmap::HeatmapAnnotation(df = annomat)

Heatmap(H3K27ac_merged_filt_cor, 
        top_annotation = heatmap_second,
        column_title="Filtered log2cpm H3K27ac with Standard Merging")

Version Author Date
8c96567 reneeisnowhere 2025-08-22
ac6eb8d reneeisnowhere 2025-08-21

H3K27me3

H3K27me3_merged_filt_lcpm <- H3K27me3_merged_raw %>% cpm(., log = TRUE)
pca_H3K27me3 <- calc_pca(t(H3K27me3_merged_filt_lcpm))
pca_var_plot(pca_H3K27me3)

Version Author Date
2607194 reneeisnowhere 2025-08-22
6c6c7f4 infurnoheat 2025-08-04
pca_H3K27me3_df <- data.frame(pca_H3K27me3$x , H3K27me3_annomat)
pca_plot(
  pca_H3K27me3,
  pca_H3K27me3_df,
  col_var = "time",
  shape_var = "tx",
  text_var = "ind",   # <-- string, not vector
  title = "H3K27me3 filtered lcpm PCA"
)        

Version Author Date
2607194 reneeisnowhere 2025-08-22
ac6eb8d reneeisnowhere 2025-08-21
6c6c7f4 infurnoheat 2025-08-04
H3K27me3_merged_raw_lcpm <- H3K27me3_merged_raw %>% 
  cpm(., log = TRUE)

H3K27me3_merged_filt_cor <- H3K27me3_merged_raw_lcpm %>% 
  cor()

annomat <- data.frame(sample=colnames(H3K27me3_merged_filt_cor)) %>% 
  separate_wider_delim(sample,delim="_",names=c("Ind","Treatment","Timepoint"),cols_remove = FALSE) %>% 
  mutate(Treatment=factor(Treatment, levels = c("VEH","5FU","DOX")),
         Timepoint=factor(Timepoint, levels =c("24T","24R","144R"))) %>% 
  column_to_rownames("sample")
heatmap_second <- ComplexHeatmap::HeatmapAnnotation(df = annomat)

Heatmap(H3K27me3_merged_filt_cor, 
        top_annotation = heatmap_second,
        column_title="Filtered log2cpm H3K27me3 with Standard Merging")

Version Author Date
8c96567 reneeisnowhere 2025-08-22
ac6eb8d reneeisnowhere 2025-08-21

H3K36me3

H3K36me3_merged_filt_lcpm <- H3K36me3_merged_raw %>% cpm(., log = TRUE)
pca_H3K36me3 <- calc_pca(t(H3K36me3_merged_filt_lcpm))
pca_var_plot(pca_H3K36me3)

Version Author Date
2607194 reneeisnowhere 2025-08-22
6c6c7f4 infurnoheat 2025-08-04
pca_H3K36me3_df <- data.frame(pca_H3K36me3$x , H3K36me3_annomat)
pca_plot(
  pca_H3K36me3,
  pca_H3K36me3_df,
  col_var = "time",
  shape_var = "tx",
  text_var = "ind",   # <-- string, not vector
  title = "H3K36me3 filtered lcpm PCA"
)        

Version Author Date
2607194 reneeisnowhere 2025-08-22
ac6eb8d reneeisnowhere 2025-08-21
fda033f reneeisnowhere 2025-08-12
6c6c7f4 infurnoheat 2025-08-04
H3K36me3_merged_raw_lcpm <- H3K36me3_merged_raw %>% 
  cpm(., log = TRUE)

H3K36me3_merged_filt_cor <- H3K36me3_merged_raw_lcpm %>% 
  cor()

annomat <- data.frame(sample=colnames(H3K36me3_merged_filt_cor)) %>% 
  separate_wider_delim(sample,delim="_",names=c("Ind","Treatment","Timepoint"),cols_remove = FALSE) %>% 
  mutate(Treatment=factor(Treatment, levels = c("VEH","5FU","DOX")),
         Timepoint=factor(Timepoint, levels =c("24T","24R","144R"))) %>% 
  column_to_rownames("sample")
heatmap_second <- ComplexHeatmap::HeatmapAnnotation(df = annomat)

Heatmap(H3K36me3_merged_filt_cor, 
        top_annotation = heatmap_second,
        column_title="Filtered log2cpm H3K36me3")

Version Author Date
ac6eb8d reneeisnowhere 2025-08-21

H3K9me3

H3K9me3_merged_filt_lcpm <- H3K9me3_merged_raw %>% cpm(., log = TRUE)
pca_H3K9me3 <- calc_pca(t(H3K9me3_merged_filt_lcpm))
pca_var_plot(pca_H3K9me3)

Version Author Date
2607194 reneeisnowhere 2025-08-22
6c6c7f4 infurnoheat 2025-08-04
pca_H3K9me3_df <- data.frame(pca_H3K9me3$x , H3K9me3_annomat)
pca_plot(
  pca_H3K9me3,
  pca_H3K9me3_df,
  col_var = "time",
  shape_var = "tx",
  text_var = "ind",   # <-- string, not vector
  title = "H3K9me3 filtered lcpm PCA"
)        

Version Author Date
2607194 reneeisnowhere 2025-08-22
ac6eb8d reneeisnowhere 2025-08-21
fda033f reneeisnowhere 2025-08-12
6c6c7f4 infurnoheat 2025-08-04
H3K9me3_merged_raw_lcpm <- H3K9me3_merged_raw %>% 
  cpm(., log = TRUE)

H3K9me3_merged_filt_cor <- H3K9me3_merged_raw_lcpm %>% 
  cor()

annomat <- data.frame(sample=colnames(H3K9me3_merged_filt_cor)) %>% 
  separate_wider_delim(sample,delim="_",names=c("Ind","Treatment","Timepoint"),cols_remove = FALSE) %>% 
  mutate(Treatment=factor(Treatment, levels = c("VEH","5FU","DOX")),
         Timepoint=factor(Timepoint, levels =c("24T","24R","144R"))) %>% 
  column_to_rownames("sample")
heatmap_second <- ComplexHeatmap::HeatmapAnnotation(df = annomat)

Heatmap(H3K9me3_merged_filt_cor, 
        top_annotation = heatmap_second,
        column_title="Filtered log2cpm H3K9me3 with Standard Merging")

Version Author Date
ac6eb8d reneeisnowhere 2025-08-21

Venn Diagrams

Venn Set Up

genes_H3K27ac_24T <- H3K27ac_24T$data$genes[(H3K27ac_24T$data$adj.P.Val < 0.05)]
genes_H3K27ac_24R <- H3K27ac_24R$data$genes[(H3K27ac_24R$data$adj.P.Val < 0.05)]
genes_H3K27ac_144R <- H3K27ac_144R$data$genes[(H3K27ac_144R$data$adj.P.Val < 0.05)]

genes_H3K27me3_24T <- H3K27me3_24T$data$genes[(H3K27me3_24T$data$adj.P.Val < 0.05)]
genes_H3K27me3_24R <- H3K27me3_24R$data$genes[(H3K27me3_24R$data$adj.P.Val < 0.05)]
genes_H3K27me3_144R <- H3K27me3_144R$data$genes[(H3K27me3_144R$data$adj.P.Val < 0.05)]

genes_H3K36me3_24T <- H3K36me3_24T$data$genes[(H3K36me3_24T$data$adj.P.Val < 0.05)]
genes_H3K36me3_24R <- H3K36me3_24R$data$genes[(H3K36me3_24R$data$adj.P.Val < 0.05)]
genes_H3K36me3_144R <- H3K36me3_144R$data$genes[(H3K36me3_144R$data$adj.P.Val < 0.05)]

genes_H3K9me3_24T <- H3K9me3_24T$data$genes[(H3K9me3_24T$data$adj.P.Val < 0.05)]
genes_H3K9me3_24R <- H3K9me3_24R$data$genes[(H3K9me3_24R$data$adj.P.Val < 0.05)]
genes_H3K9me3_144R <- H3K9me3_144R$data$genes[(H3K9me3_144R$data$adj.P.Val < 0.05)]

H3K27ac Venn Diagrams

ggVennDiagram(list("24T regions"=genes_H3K27ac_24T,"24R regions"=genes_H3K27ac_24R, "144R regions"=genes_H3K27ac_144R))

Version Author Date
8c96567 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
6c6c7f4 infurnoheat 2025-08-04

H3K27me3 Venn Diagrams

ggVennDiagram(list("24T regions"=genes_H3K27me3_24T,"24R regions"=genes_H3K27me3_24R, "144R regions"=genes_H3K27me3_144R))

Version Author Date
8c96567 reneeisnowhere 2025-08-22
fda033f reneeisnowhere 2025-08-12
6c6c7f4 infurnoheat 2025-08-04

H3K36me3 Venn Diagrams

ggVennDiagram(list("24T regions"=genes_H3K36me3_24T,"24R regions"=genes_H3K36me3_24R, "144R regions"=genes_H3K36me3_144R))

Version Author Date
fda033f reneeisnowhere 2025-08-12
6c6c7f4 infurnoheat 2025-08-04

H3K9me3 Venn Diagrams

ggVennDiagram(list("24T regions"=genes_H3K9me3_24T,"24R regions"=genes_H3K9me3_24R, "144R regions"=genes_H3K9me3_144R))

Version Author Date
fda033f reneeisnowhere 2025-08-12
6c6c7f4 infurnoheat 2025-08-04
H3K27ac_toplist <- list("H3K27ac_24T"=H3K27ac_24T$data,"H3K27ac_24R"= H3K27ac_24R$data, "H3K27ac_144R"= H3K27ac_144R$data)
saveRDS(H3K27ac_toplist, "data/DER_data/H3K27ac_toplist.RDS")

H3K27me3_toplist <- list("H3K27me3_24T"=H3K27me3_24T$data,"H3K27me3_24R"= H3K27me3_24R$data, "H3K27me3_144R"= H3K27me3_144R$data)
saveRDS(H3K27me3_toplist,"data/DER_data/H3K27me3_toplist.RDS")


H3K36me3_toplist <- list("H3K36me3_24T"=H3K36me3_24T$data,"H3K36me3_24R"= H3K36me3_24R$data, "H3K36me3_144R"= H3K36me3_144R$data)
saveRDS(H3K36me3_toplist,"data/DER_data/H3K36me3_toplist.RDS")

H3K9me3_toplist <- list("H3K9me3_24T"=H3K9me3_24T$data,"H3K9me3_24R"= H3K9me3_24R$data, "H3K9me3_144R"= H3K9me3_144R$data)

saveRDS(H3K9me3_toplist, "data/DER_data/H3K9me3_toplist.RDS")

sessionInfo()
R version 4.4.2 (2024-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats4    grid      stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] ggVennDiagram_1.5.4         smplot2_0.2.5              
 [3] cowplot_1.2.0               ggrastr_1.0.2              
 [5] Rsubread_2.20.0             gcplyr_1.12.0              
 [7] ggpmisc_0.6.2               ggpp_0.5.9                 
 [9] corrplot_0.95               ggpubr_0.6.1               
[11] DESeq2_1.46.0               SummarizedExperiment_1.36.0
[13] Biobase_2.66.0              MatrixGenerics_1.18.1      
[15] matrixStats_1.5.0           chromVAR_1.28.0            
[17] GenomicRanges_1.58.0        GenomeInfoDb_1.42.3        
[19] IRanges_2.40.1              S4Vectors_0.44.0           
[21] BiocGenerics_0.52.0         genomation_1.38.0          
[23] kableExtra_1.4.0            DT_0.33                    
[25] viridis_0.6.5               viridisLite_0.4.2          
[27] data.table_1.17.8           ComplexHeatmap_2.22.0      
[29] edgeR_4.4.2                 limma_3.62.2               
[31] lubridate_1.9.4             forcats_1.0.0              
[33] stringr_1.5.1               dplyr_1.1.4                
[35] purrr_1.1.0                 readr_2.1.5                
[37] tidyr_1.3.1                 tibble_3.3.0               
[39] ggplot2_3.5.2               tidyverse_2.0.0            
[41] workflowr_1.7.1            

loaded via a namespace (and not attached):
  [1] fs_1.6.6                    bitops_1.0-9               
  [3] DirichletMultinomial_1.48.0 TFBSTools_1.44.0           
  [5] httr_1.4.7                  RColorBrewer_1.1-3         
  [7] doParallel_1.0.17           tools_4.4.2                
  [9] backports_1.5.0             utf8_1.2.6                 
 [11] R6_2.6.1                    lazyeval_0.2.2             
 [13] GetoptLong_1.0.5            withr_3.0.2                
 [15] gridExtra_2.3               quantreg_6.1               
 [17] cli_3.6.5                   textshaping_1.0.1          
 [19] Cairo_1.6-5                 labeling_0.4.3             
 [21] sass_0.4.10                 Rsamtools_2.22.0           
 [23] systemfonts_1.2.3           foreign_0.8-90             
 [25] svglite_2.2.1               R.utils_2.13.0             
 [27] dichromat_2.0-0.1           plotrix_3.8-4              
 [29] BSgenome_1.74.0             pwr_1.3-0                  
 [31] rstudioapi_0.17.1           impute_1.80.0              
 [33] RSQLite_2.4.3               generics_0.1.4             
 [35] shape_1.4.6.1               BiocIO_1.16.0              
 [37] vroom_1.6.5                 gtools_3.9.5               
 [39] car_3.1-3                   GO.db_3.20.0               
 [41] Matrix_1.7-3                ggbeeswarm_0.7.2           
 [43] abind_1.4-8                 R.methodsS3_1.8.2          
 [45] lifecycle_1.0.4             whisker_0.4.1              
 [47] yaml_2.3.10                 carData_3.0-5              
 [49] SparseArray_1.6.2           blob_1.2.4                 
 [51] promises_1.3.3              crayon_1.5.3               
 [53] pwalign_1.2.0               miniUI_0.1.2               
 [55] lattice_0.22-7              annotate_1.84.0            
 [57] KEGGREST_1.46.0             magick_2.8.7               
 [59] pillar_1.11.0               knitr_1.50                 
 [61] rjson_0.2.23                codetools_0.2-20           
 [63] glue_1.8.0                  getPass_0.2-4              
 [65] vctrs_0.6.5                 png_0.1-8                  
 [67] gtable_0.3.6                poweRlaw_1.0.0             
 [69] cachem_1.1.0                xfun_0.52                  
 [71] S4Arrays_1.6.0              mime_0.13                  
 [73] survival_3.8-3              iterators_1.0.14           
 [75] statmod_1.5.0               bit64_4.6.0-1              
 [77] rprojroot_2.1.0             bslib_0.9.0                
 [79] vipor_0.4.7                 KernSmooth_2.23-26         
 [81] rpart_4.1.24                colorspace_2.1-1           
 [83] seqLogo_1.72.0              DBI_1.2.3                  
 [85] Hmisc_5.2-3                 seqPattern_1.38.0          
 [87] nnet_7.3-20                 tidyselect_1.2.1           
 [89] processx_3.8.6              bit_4.6.0                  
 [91] compiler_4.4.2              curl_7.0.0                 
 [93] git2r_0.36.2                htmlTable_2.4.3            
 [95] SparseM_1.84-2              xml2_1.4.0                 
 [97] DelayedArray_0.32.0         plotly_4.11.0              
 [99] rtracklayer_1.66.0          checkmate_2.3.3            
[101] scales_1.4.0                caTools_1.18.3             
[103] callr_3.7.6                 digest_0.6.37              
[105] rmarkdown_2.29              XVector_0.46.0             
[107] htmltools_0.5.8.1           pkgconfig_2.0.3            
[109] base64enc_0.1-3             fastmap_1.2.0              
[111] rlang_1.1.6                 GlobalOptions_0.1.2        
[113] htmlwidgets_1.6.4           UCSC.utils_1.2.0           
[115] shiny_1.11.1                farver_2.1.2               
[117] jquerylib_0.1.4             zoo_1.8-14                 
[119] jsonlite_2.0.0              BiocParallel_1.40.2        
[121] R.oo_1.27.1                 RCurl_1.98-1.17            
[123] magrittr_2.0.3              polynom_1.4-1              
[125] Formula_1.2-5               GenomeInfoDbData_1.2.13    
[127] patchwork_1.3.1             Rcpp_1.1.0                 
[129] stringi_1.8.7               zlibbioc_1.52.0            
[131] MASS_7.3-65                 plyr_1.8.9                 
[133] ggrepel_0.9.6               parallel_4.4.2             
[135] CNEr_1.42.0                 Biostrings_2.74.1          
[137] splines_4.4.2               hms_1.1.3                  
[139] circlize_0.4.16             locfit_1.5-9.12            
[141] ps_1.9.1                    ggsignif_0.6.4             
[143] reshape2_1.4.4              TFMPvalue_0.0.9            
[145] XML_3.99-0.18               evaluate_1.0.4             
[147] tzdb_0.5.0                  foreach_1.5.2              
[149] httpuv_1.6.16               MatrixModels_0.5-4         
[151] clue_0.3-66                 gridBase_0.4-7             
[153] broom_1.0.9                 xtable_1.8-4               
[155] restfulr_0.0.16             rstatix_0.7.2              
[157] later_1.4.2                 memoise_2.0.1              
[159] beeswarm_0.4.0              AnnotationDbi_1.68.0       
[161] GenomicAlignments_1.42.0    cluster_2.1.8.1            
[163] timechange_0.3.0