Last updated: 2025-08-12

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 0f14098. 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/DER_data/

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/peak_analysis.Rmd) and HTML (docs/peak_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
html a8f0f26 infurnoheat 2025-08-01 Build site.
Rmd f5674cf infurnoheat 2025-08-01 wflow_publish("analysis/peak_analysis.Rmd")
html cb5da29 infurnoheat 2025-08-01 Build site.
Rmd 38c1eef infurnoheat 2025-08-01 wflow_publish("analysis/peak_analysis.Rmd")
html c6e3989 infurnoheat 2025-07-29 Build site.
Rmd 63f0b60 infurnoheat 2025-07-29 wflow_publish("analysis/peak_analysis.Rmd")
html 1160ce2 infurnoheat 2025-07-24 Build site.
Rmd 876d279 infurnoheat 2025-07-24 wflow_publish("analysis/peak_analysis.Rmd")
html 9f8e509 infurnoheat 2025-07-24 Build site.
Rmd 3c31bea infurnoheat 2025-07-24 wflow_publish("analysis/peak_analysis.Rmd")
html 66c1fa7 infurnoheat 2025-07-24 Build site.
Rmd 5fae1b0 infurnoheat 2025-07-24 wflow_publish("analysis/peak_analysis.Rmd")
html 389b998 infurnoheat 2025-07-23 Build site.
Rmd 1295ae0 infurnoheat 2025-07-23 wflow_publish("analysis/peak_analysis.Rmd")
html d927f5c infurnoheat 2025-07-23 Build site.
Rmd d2f7f9a infurnoheat 2025-07-23 wflow_publish("analysis/peak_analysis.Rmd")
html 3c5800a infurnoheat 2025-07-22 Build site.
Rmd 0edadf3 infurnoheat 2025-07-22 wflow_publish("analysis/peak_analysis.Rmd")
html 29d666e infurnoheat 2025-07-15 Build site.
Rmd dd8be1d infurnoheat 2025-07-15 wflow_publish("analysis/peak_analysis.Rmd")
html 1d53459 infurnoheat 2025-07-14 Build site.
Rmd 7067e5d infurnoheat 2025-07-14 wflow_publish("analysis/peak_analysis.Rmd")

Peak 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)

Data Initialization

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

Functions

drug_pal <- c("#8B006D","#DF707E","#F1B72B", "#3386DD","#707031","#41B333")
pca_plot <-
  function(df,
           col_var = NULL,
           shape_var = NULL,
           title = "") {
    ggplot(df) + geom_point(aes_string(
      x = "PC1",
      y = "PC2",
      color = col_var,
      shape = shape_var
    ),
    size = 5) +
      labs(title = title, x = "PC 1", y = "PC 2") +
      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)
}

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,
    ...
  )
}

Peak Calling for Q=0.01 and Broad=0.1 with No Lambda

Data Initialization

peak_ct <- read_delim("data/peaks/peaks_cts.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 <- rbind(H3K27ac_peaks, H3K27me3_peaks, H3K36me3_peaks, H3K9me3_peaks)

all_peak <- all_peak %>%
  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 <- all_peak[(!all_peak$Treatment %in% "5FU"),]

Peak Visualization

all_peak %>% 
   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
3c5800a infurnoheat 2025-07-22
1d53459 infurnoheat 2025-07-14
all_peak %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
3c5800a infurnoheat 2025-07-22
1d53459 infurnoheat 2025-07-14
all_peak %>% 
  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
3c5800a infurnoheat 2025-07-22
1d53459 infurnoheat 2025-07-14
all_peak %>% 
  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
3c5800a infurnoheat 2025-07-22
1d53459 infurnoheat 2025-07-14

Peak Calling for Q=0.01 and Broad=0.1 with Lambda

Data Initialization

peak_ct <- read_delim("data/peaks/peaks_cts_lq1e2b1e1.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_final_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_lq1e2b1e1_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_lq1e2b1e1_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_lq1e2b1e1_results.tsv",delim = "\t")

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

all_peak_var <- all_peak_var %>%
  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_var <- all_peak_var[(!all_peak_var$Treatment %in% "5FU"),]
all_peak_var <- all_peak_var[(!all_peak_var$Histone_Mark %in% "H3K27ac"),]

Peak Visualization

all_peak_var %>% 
   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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22

Peak Calling for Q=0.01 and Broad=0.5 with No Lambda

Data Initialization

peak_ct <- read_delim("data/peaks/peaks_cts_nlq1e2b5e1.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_final_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_nlq1e2b5e1_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_nlq1e2b5e1_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_nlq1e2b5e1_results.tsv",delim = "\t")

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

all_peak_var <- all_peak_var %>%
  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_var <- all_peak[(!all_peak$Treatment %in% "5FU"),]
all_peak_var <- all_peak_var[(!all_peak_var$Histone_Mark %in% "H3K27ac"),]

Peak Visualization

all_peak_var %>% 
   ggplot(.,aes(x=Sample, y=Count,fill=Histone_Mark))+
   geom_col()+
   ylab("Counts")+
   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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22

Peak Calling for Q=0.01 and Broad=0.5 with Lambda

Data Initialization

peak_ct_var <- read_delim("data/peaks/peaks_cts_lq1e2b5e1.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_final_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_lq1e2b5e1_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_lq1e2b5e1_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_lq1e2b5e1_results.tsv",delim = "\t")

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

all_peak_var <- all_peak_var %>%
  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_var <- all_peak_var[(!all_peak_var$Treatment %in% "5FU"),]
all_peak_var <- all_peak_var[(!all_peak_var$Histone_Mark %in% "H3K27ac"),]

Peak Visualization

all_peak_var %>% 
   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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22

Peak Calling for Q=0.005 and Broad=0.01 with No Lambda

Data Initialization

peak_ct <- read_delim("data/peaks/peaks_cts_nlq5e3b1e2.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_final_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_nlq5e3b1e2_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_nlq5e3b1e2_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_nlq5e3b1e2_results.tsv",delim = "\t")

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

all_peak_var <- all_peak_var %>%
  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_var <- all_peak_var[(!all_peak_var$Treatment %in% "5FU"),]
all_peak_var <- all_peak_var[(!all_peak_var$Histone_Mark %in% "H3K27ac"),]

Peak Visualization

all_peak_var %>% 
   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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22

Peak Calling for Q=0.005 and Broad=0.01 with Lambda

Data Initialization

peak_ct <- read_delim("data/peaks/peaks_cts_lq5e3b1e2.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_final_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_lq5e3b1e2_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_lq5e3b1e2_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_lq5e3b1e2_results.tsv",delim = "\t")

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

all_peak_var <- all_peak_var %>%
  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_var <- all_peak_var[(!all_peak_var$Treatment %in% "5FU"),]
all_peak_var <- all_peak_var[(!all_peak_var$Histone_Mark %in% "H3K27ac"),]

Peak Visualization

all_peak_var %>% 
   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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22
all_peak_var %>% 
  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
3c5800a infurnoheat 2025-07-22

Picard with Broad Peaks

peak_ct <- read_delim("data/peaks/peaks_cts_picard_broad.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_picard_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_picard_broad_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_picard_broad_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_picard_broad_results.tsv",delim = "\t")

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

all_peak_pb <- all_peak_pb %>%
  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_pb <- all_peak_pb[(!all_peak_pb$Treatment %in% "5FU"),]
all_peak_pb %>% 
   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
c6e3989 infurnoheat 2025-07-29
all_peak_pb %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
c6e3989 infurnoheat 2025-07-29
all_peak_pb %>% 
  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
c6e3989 infurnoheat 2025-07-29
all_peak_pb %>% 
  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
c6e3989 infurnoheat 2025-07-29

Picard with Broad as Narrow Peaks

peak_ct <- read_delim("data/peaks/peaks_cts_picard_narrow.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_picard_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_picard_narrow_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_picard_narrow_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_picard_narrow_results.tsv",delim = "\t")

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

all_peak_pn <- all_peak_pn %>%
  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_pn <- all_peak_pn[(!all_peak_pn$Treatment %in% "5FU"),]
all_peak_pn %>% 
   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
c6e3989 infurnoheat 2025-07-29
all_peak_pn %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
c6e3989 infurnoheat 2025-07-29
all_peak_pn %>% 
  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
c6e3989 infurnoheat 2025-07-29
all_peak_pn %>% 
  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
c6e3989 infurnoheat 2025-07-29

Picard with Broad as Stringent Narrow Peaks

peak_ct <- read_delim("data/peaks/peaks_cts_1e3_narrow.txt", delim = "\t")
H3K27ac_peaks <- read_delim("data/peaks/H3K27ac_picard_results.tsv",delim = "\t")
H3K27me3_peaks <- read_delim("data/peaks/H3K27me3_1e3_narrow_results.tsv",delim = "\t")
H3K36me3_peaks <- read_delim("data/peaks/H3K36me3_1e3_narrow_results.tsv",delim = "\t")
H3K9me3_peaks <- read_delim("data/peaks/H3K9me3_1e3_narrow_results.tsv",delim = "\t")

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

all_peak_sn <- all_peak_sn %>%
  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_sn <- all_peak_sn[(!all_peak_sn$Treatment %in% "5FU"),]
all_peak_sn %>% 
   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
c6e3989 infurnoheat 2025-07-29
all_peak_sn %>% 
  ggplot(., aes (x=Histone_Mark, y = Count, fill = Histone_Mark))+
  geom_boxplot()+
   ylab("Count")+
   theme_classic()+
  # facet_wrap(~histone)+
  ggtitle("Peak count across histones")

Version Author Date
c6e3989 infurnoheat 2025-07-29
all_peak_sn %>% 
  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
c6e3989 infurnoheat 2025-07-29
all_peak_sn %>% 
  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
c6e3989 infurnoheat 2025-07-29

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] smplot2_0.2.5               cowplot_1.2.0              
 [3] ggrastr_1.0.2               Rsubread_2.20.0            
 [5] gcplyr_1.12.0               ggpmisc_0.6.2              
 [7] ggpp_0.5.9                  corrplot_0.95              
 [9] ggpubr_0.6.1                DESeq2_1.46.0              
[11] SummarizedExperiment_1.36.0 Biobase_2.66.0             
[13] MatrixGenerics_1.18.1       matrixStats_1.5.0          
[15] chromVAR_1.28.0             GenomicRanges_1.58.0       
[17] GenomeInfoDb_1.42.3         IRanges_2.40.1             
[19] S4Vectors_0.44.0            BiocGenerics_0.52.0        
[21] genomation_1.38.0           kableExtra_1.4.0           
[23] DT_0.33                     viridis_0.6.5              
[25] viridisLite_0.4.2           data.table_1.17.8          
[27] ComplexHeatmap_2.22.0       edgeR_4.4.2                
[29] limma_3.62.2                lubridate_1.9.4            
[31] forcats_1.0.0               stringr_1.5.1              
[33] dplyr_1.1.4                 purrr_1.1.0                
[35] readr_2.1.5                 tidyr_1.3.1                
[37] tibble_3.3.0                ggplot2_3.5.2              
[39] tidyverse_2.0.0             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             R6_2.6.1                   
 [11] lazyeval_0.2.2              GetoptLong_1.0.5           
 [13] withr_3.0.2                 gridExtra_2.3              
 [15] quantreg_6.1                cli_3.6.5                  
 [17] textshaping_1.0.1           labeling_0.4.3             
 [19] sass_0.4.10                 Rsamtools_2.22.0           
 [21] systemfonts_1.2.3           foreign_0.8-90             
 [23] svglite_2.2.1               R.utils_2.13.0             
 [25] dichromat_2.0-0.1           plotrix_3.8-4              
 [27] BSgenome_1.74.0             pwr_1.3-0                  
 [29] rstudioapi_0.17.1           impute_1.80.0              
 [31] RSQLite_2.4.2               generics_0.1.4             
 [33] shape_1.4.6.1               BiocIO_1.16.0              
 [35] vroom_1.6.5                 gtools_3.9.5               
 [37] car_3.1-3                   GO.db_3.20.0               
 [39] Matrix_1.7-3                ggbeeswarm_0.7.2           
 [41] abind_1.4-8                 R.methodsS3_1.8.2          
 [43] lifecycle_1.0.4             whisker_0.4.1              
 [45] yaml_2.3.10                 carData_3.0-5              
 [47] SparseArray_1.6.2           blob_1.2.4                 
 [49] promises_1.3.3              crayon_1.5.3               
 [51] pwalign_1.2.0               miniUI_0.1.2               
 [53] lattice_0.22-7              annotate_1.84.0            
 [55] KEGGREST_1.46.0             pillar_1.11.0              
 [57] knitr_1.50                  rjson_0.2.23               
 [59] codetools_0.2-20            glue_1.8.0                 
 [61] getPass_0.2-4               vctrs_0.6.5                
 [63] png_0.1-8                   gtable_0.3.6               
 [65] poweRlaw_1.0.0              cachem_1.1.0               
 [67] xfun_0.52                   S4Arrays_1.6.0             
 [69] mime_0.13                   survival_3.8-3             
 [71] iterators_1.0.14            statmod_1.5.0              
 [73] bit64_4.6.0-1               rprojroot_2.1.0            
 [75] bslib_0.9.0                 vipor_0.4.7                
 [77] KernSmooth_2.23-26          rpart_4.1.24               
 [79] colorspace_2.1-1            seqLogo_1.72.0             
 [81] DBI_1.2.3                   Hmisc_5.2-3                
 [83] seqPattern_1.38.0           nnet_7.3-20                
 [85] tidyselect_1.2.1            processx_3.8.6             
 [87] bit_4.6.0                   compiler_4.4.2             
 [89] curl_6.4.0                  git2r_0.36.2               
 [91] htmlTable_2.4.3             SparseM_1.84-2             
 [93] xml2_1.3.8                  DelayedArray_0.32.0        
 [95] plotly_4.11.0               rtracklayer_1.66.0         
 [97] checkmate_2.3.2             scales_1.4.0               
 [99] caTools_1.18.3              callr_3.7.6                
[101] digest_0.6.37               rmarkdown_2.29             
[103] XVector_0.46.0              htmltools_0.5.8.1          
[105] pkgconfig_2.0.3             base64enc_0.1-3            
[107] fastmap_1.2.0               rlang_1.1.6                
[109] GlobalOptions_0.1.2         htmlwidgets_1.6.4          
[111] UCSC.utils_1.2.0            shiny_1.11.1               
[113] farver_2.1.2                jquerylib_0.1.4            
[115] zoo_1.8-14                  jsonlite_2.0.0             
[117] BiocParallel_1.40.2         R.oo_1.27.1                
[119] RCurl_1.98-1.17             magrittr_2.0.3             
[121] polynom_1.4-1               Formula_1.2-5              
[123] GenomeInfoDbData_1.2.13     patchwork_1.3.1            
[125] Rcpp_1.1.0                  stringi_1.8.7              
[127] zlibbioc_1.52.0             MASS_7.3-65                
[129] plyr_1.8.9                  parallel_4.4.2             
[131] CNEr_1.42.0                 Biostrings_2.74.1          
[133] splines_4.4.2               hms_1.1.3                  
[135] circlize_0.4.16             locfit_1.5-9.12            
[137] ps_1.9.1                    ggsignif_0.6.4             
[139] reshape2_1.4.4              TFMPvalue_0.0.9            
[141] XML_3.99-0.18               evaluate_1.0.4             
[143] tzdb_0.5.0                  foreach_1.5.2              
[145] httpuv_1.6.16               MatrixModels_0.5-4         
[147] clue_0.3-66                 gridBase_0.4-7             
[149] broom_1.0.9                 xtable_1.8-4               
[151] restfulr_0.0.16             rstatix_0.7.2              
[153] later_1.4.2                 memoise_2.0.1              
[155] beeswarm_0.4.0              AnnotationDbi_1.68.0       
[157] GenomicAlignments_1.42.0    cluster_2.1.8.1            
[159] timechange_0.3.0