Skip to content

Commit

Permalink
Moving forward with the rlog/PCA work; in referencing old code, clean…
Browse files Browse the repository at this point in the history
…ed things up a bit; also, finally corrected replicate names per Alison's notes (see e-mail thread with title 'Quick guide to know what 4tU-seq filenames represent what'
  • Loading branch information
Kris Alavattam committed Jun 19, 2023
1 parent 51d215e commit 950ca0c
Show file tree
Hide file tree
Showing 8 changed files with 810 additions and 153 deletions.
Binary file modified results/2023-0215/notebook/variables.xlsx
Binary file not shown.
182 changes: 91 additions & 91 deletions results/2023-0215/rough-draft_evaluate-categories_expression.R
Original file line number Diff line number Diff line change
Expand Up @@ -486,101 +486,101 @@ colnames(t_cm) <- colnames(t_cm) %>%
gsub("\\.UT_prim_UMI\\.bam", "", .)
colnames(t_cm)

col_cor <- setNames( #DEKHO
col_cor <- setNames(
c(
"n3-d_Q_day7_tcn_N_aux-T_tc-F_rep1_tech1",
"n3-d_Q_day7_tcn_N_aux-T_tc-F_rep2_tech1",
"n3-d_Q_day7_tcn_N_aux-T_tc-F_rep3_tech1", #EXCLUDE
"n3-d_Q_day7_tcn_SS_aux-T_tc-F_rep1_tech1",
"n3-d_Q_day7_tcn_SS_aux-T_tc-F_rep2_tech1",
"n3-d_Q_day7_tcn_SS_aux-T_tc-F_rep3_tech1", #EXCLUDE
"o-d_Q_day7_tcn_N_aux-T_tc-F_rep1_tech1",
"o-d_Q_day7_tcn_N_aux-T_tc-F_rep2_tech1",
"o-d_Q_day7_tcn_SS_aux-T_tc-F_rep1_tech1",
"o-d_Q_day7_tcn_SS_aux-T_tc-F_rep2_tech1",
"r1-n_Q_day8_tcn_N_aux-F_tc-F_rep1_tech1",
"r1-n_Q_day8_tcn_N_aux-F_tc-F_rep2_tech1",
"r1-n_Q_day8_tcn_SS_aux-F_tc-F_rep1_tech1",
"r1-n_Q_day8_tcn_SS_aux-F_tc-F_rep2_tech1",
"r6-n_DSm2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"r6-n_DSm2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"r6-n_DSp24_day3_tcn_SS_aux-F_tc-T_rep1_tech1",
"r6-n_DSp24_day3_tcn_SS_aux-F_tc-T_rep2_tech1",
"r6-n_DSp2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"r6-n_DSp2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"r6-n_DSp48_day4_tcn_SS_aux-F_tc-T_rep1_tech1",
"r6-n_DSp48_day4_tcn_SS_aux-F_tc-T_rep2_tech1", #FIXME ∆ tech1 → tech2
"r6-n_G1_day1_tcn_SS_aux-F_tc-F_rep1_tech1", #FIXME ∆ tech1 → tech2
"r6-n_G1_day1_tcn_SS_aux-F_tc-F_rep2_tech1", #FIXME ∆ tech1 → tech2
"r6-n_Q_day8_tcn_N_aux-F_tc-F_rep1_tech1",
"r6-n_Q_day8_tcn_N_aux-F_tc-F_rep2_tech1",
"r6-n_Q_day8_tcn_SS_aux-F_tc-F_rep1_tech1", #OK
"r6-n_Q_day8_tcn_SS_aux-F_tc-F_rep1_tech2", #OK
"r6-n_Q_day8_tcn_SS_aux-F_tc-F_rep2_tech1",
"t4-n_DSm2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"t4-n_DSm2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"t4-n_DSp24_day3_tcn_SS_aux-F_tc-T_rep1_tech1",
"t4-n_DSp24_day3_tcn_SS_aux-F_tc-T_rep2_tech1",
"t4-n_DSp2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"t4-n_DSp2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"t4-n_DSp48_day4_tcn_SS_aux-F_tc-T_rep1_tech1",
"t4-n_DSp48_day4_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_DSm2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"WT_DSm2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_DSp24_day3_tcn_SS_aux-F_tc-T_rep1_tech1",
"WT_DSp24_day3_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_DSp2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"WT_DSp2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_DSp48_day4_tcn_SS_aux-F_tc-T_rep1_tech1", #OK
"WT_DSp48_day4_tcn_SS_aux-F_tc-T_rep1_tech2", #OK
"WT_DSp48_day4_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_G1_day1_ovn_N_aux-F_tc-F_rep1_tech1",
"WT_G1_day1_ovn_N_aux-F_tc-F_rep2_tech1",
"WT_G1_day1_ovn_SS_aux-F_tc-F_rep1_tech1",
"WT_G1_day1_ovn_SS_aux-F_tc-F_rep2_tech1",
"WT_G1_day1_tcn_SS_aux-F_tc-F_rep1_tech1", #FIXME ∆ tech1 → tech2
"WT_G1_day1_tcn_SS_aux-F_tc-F_rep2_tech1", #FIXME ∆ tech1 → tech2
"WT_Q_day7_ovn_N_aux-F_tc-F_rep1_tech1",
"n3-d_Q_day7_tcn_N_aux-T_tc-F_rep1_tech1",
"n3-d_Q_day7_tcn_N_aux-T_tc-F_rep2_tech1",
"n3-d_Q_day7_tcn_N_aux-T_tc-F_rep3_tech1", #EXCLUDE
"n3-d_Q_day7_tcn_SS_aux-T_tc-F_rep1_tech1",
"n3-d_Q_day7_tcn_SS_aux-T_tc-F_rep2_tech1",
"n3-d_Q_day7_tcn_SS_aux-T_tc-F_rep3_tech1", #EXCLUDE
"o-d_Q_day7_tcn_N_aux-T_tc-F_rep1_tech1",
"o-d_Q_day7_tcn_N_aux-T_tc-F_rep2_tech1",
"o-d_Q_day7_tcn_SS_aux-T_tc-F_rep1_tech1",
"o-d_Q_day7_tcn_SS_aux-T_tc-F_rep2_tech1",
"r1-n_Q_day8_tcn_N_aux-F_tc-F_rep1_tech1", #FIXME* ∆ rep1 → rep2
"r1-n_Q_day8_tcn_N_aux-F_tc-F_rep2_tech1", #FIXME* ∆ rep2 → rep1
"r1-n_Q_day8_tcn_SS_aux-F_tc-F_rep1_tech1", #FIXME* ∆ rep1 → rep2
"r1-n_Q_day8_tcn_SS_aux-F_tc-F_rep2_tech1", #FIXME* ∆ rep2 → rep1
"r6-n_DSm2_day2_tcn_SS_aux-F_tc-T_rep1_tech1", #FIXME* ∆ rep1 → rep2
"r6-n_DSm2_day2_tcn_SS_aux-F_tc-T_rep2_tech1", #FIXME* ∆ rep2 → rep1
"r6-n_DSp24_day3_tcn_SS_aux-F_tc-T_rep1_tech1", #FIXME* ∆ rep1 → rep2
"r6-n_DSp24_day3_tcn_SS_aux-F_tc-T_rep2_tech1", #FIXME* ∆ rep2 → rep1
"r6-n_DSp2_day2_tcn_SS_aux-F_tc-T_rep1_tech1", #FIXME* ∆ rep1 → rep2
"r6-n_DSp2_day2_tcn_SS_aux-F_tc-T_rep2_tech1", #FIXME* ∆ rep2 → rep1
"r6-n_DSp48_day4_tcn_SS_aux-F_tc-T_rep1_tech1", #FIXME* ∆ rep1 → rep2
"r6-n_DSp48_day4_tcn_SS_aux-F_tc-T_rep2_tech1", #FIXME* ∆ rep2 → rep1 #FIXME‡ ∆ tech1 → tech2
"r6-n_G1_day1_tcn_SS_aux-F_tc-F_rep1_tech1", #FIXME* ∆ rep1 → rep2 #FIXME‡ ∆ tech1 → tech2
"r6-n_G1_day1_tcn_SS_aux-F_tc-F_rep2_tech1", #FIXME* ∆ rep2 → rep1 #FIXME‡ ∆ tech1 → tech2
"r6-n_Q_day8_tcn_N_aux-F_tc-F_rep1_tech1", #FIXME* ∆ rep1 → rep2
"r6-n_Q_day8_tcn_N_aux-F_tc-F_rep2_tech1", #FIXME* ∆ rep2 → rep1
"r6-n_Q_day8_tcn_SS_aux-F_tc-F_rep1_tech1", #FIXME* ∆ rep1 → rep2 #OK
"r6-n_Q_day8_tcn_SS_aux-F_tc-F_rep1_tech2", #FIXME* ∆ rep1 → rep2 #OK
"r6-n_Q_day8_tcn_SS_aux-F_tc-F_rep2_tech1", #FIXME* ∆ rep2 → rep1
"t4-n_DSm2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"t4-n_DSm2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"t4-n_DSp24_day3_tcn_SS_aux-F_tc-T_rep1_tech1",
"t4-n_DSp24_day3_tcn_SS_aux-F_tc-T_rep2_tech1",
"t4-n_DSp2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"t4-n_DSp2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"t4-n_DSp48_day4_tcn_SS_aux-F_tc-T_rep1_tech1",
"t4-n_DSp48_day4_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_DSm2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"WT_DSm2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_DSp24_day3_tcn_SS_aux-F_tc-T_rep1_tech1",
"WT_DSp24_day3_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_DSp2_day2_tcn_SS_aux-F_tc-T_rep1_tech1",
"WT_DSp2_day2_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_DSp48_day4_tcn_SS_aux-F_tc-T_rep1_tech1", #OK
"WT_DSp48_day4_tcn_SS_aux-F_tc-T_rep1_tech2", #OK
"WT_DSp48_day4_tcn_SS_aux-F_tc-T_rep2_tech1",
"WT_G1_day1_ovn_N_aux-F_tc-F_rep1_tech1",
"WT_G1_day1_ovn_N_aux-F_tc-F_rep2_tech1",
"WT_G1_day1_ovn_SS_aux-F_tc-F_rep1_tech1",
"WT_G1_day1_ovn_SS_aux-F_tc-F_rep2_tech1",
"WT_G1_day1_tcn_SS_aux-F_tc-F_rep1_tech1", #FIXME ∆ tech1 → tech2
"WT_G1_day1_tcn_SS_aux-F_tc-F_rep2_tech1", #FIXME ∆ tech1 → tech2
"WT_Q_day7_ovn_N_aux-F_tc-F_rep1_tech1",
"WT_Q_day7_ovn_N_aux-F_tc-F_rep2_tech1",
"WT_Q_day7_ovn_SS_aux-F_tc-F_rep1_tech1",
"WT_Q_day7_ovn_SS_aux-F_tc-F_rep2_tech1",
"WT_Q_day7_tcn_N_aux-F_tc-F_rep2_tech1", #FIXME Duplicated #1
"WT_Q_day7_tcn_SS_aux-F_tc-F_rep2_tech1", #FIXME Duplicated #2
"WT_Q_day8_tcn_N_aux-F_tc-F_rep1_tech1",
"WT_Q_day8_tcn_N_aux-F_tc-F_rep2_tech1", #FIXME Duplicated #1
"WT_Q_day8_tcn_SS_aux-F_tc-F_rep1_tech1",
"WT_Q_day8_tcn_SS_aux-F_tc-F_rep2_tech1" #FIXME Duplicated #2
"WT_Q_day7_ovn_SS_aux-F_tc-F_rep1_tech1",
"WT_Q_day7_ovn_SS_aux-F_tc-F_rep2_tech1",
"WT_Q_day7_tcn_N_aux-F_tc-F_rep2_tech1", #FIXME Duplicated #1
"WT_Q_day7_tcn_SS_aux-F_tc-F_rep2_tech1", #FIXME Duplicated #2
"WT_Q_day8_tcn_N_aux-F_tc-F_rep1_tech1",
"WT_Q_day8_tcn_N_aux-F_tc-F_rep2_tech1", #FIXME Duplicated #1
"WT_Q_day8_tcn_SS_aux-F_tc-F_rep1_tech1",
"WT_Q_day8_tcn_SS_aux-F_tc-F_rep2_tech1" #FIXME Duplicated #2
),
c(
"n3d_Q_N_rep1_tech1",
"n3d_Q_N_rep2_tech1",
"n3d_Q_N_rep3_tech1", #EXCLUDE
"n3d_Q_N_rep3_tech1", #EXCLUDE
"n3d_Q_SS_rep1_tech1",
"n3d_Q_SS_rep2_tech1",
"n3d_Q_SS_rep3_tech1", #EXCLUDE
"n3d_Q_SS_rep3_tech1", #EXCLUDE
"od_Q_N_rep1_tech1",
"od_Q_N_rep2_tech1",
"od_Q_SS_rep1_tech1",
"od_Q_SS_rep2_tech1",
"r1n_Q_N_rep1_tech1",
"r1n_Q_N_rep2_tech1",
"r1n_Q_SS_rep1_tech1",
"r1n_Q_SS_rep2_tech1",
"r6n_DSm2_SS_rep1_tech1",
"r6n_DSm2_SS_rep2_tech1",
"r6n_DSp24_SS_rep1_tech1",
"r6n_DSp24_SS_rep2_tech1",
"r6n_DSp2_SS_rep1_tech1",
"r6n_DSp2_SS_rep2_tech1",
"r6n_DSp48_SS_rep1_tech1",
"r6n_DSp48_SS_rep2_tech2", #DONE
"r6n_G1_SS_rep1_tech2", #DONE
"r6n_G1_SS_rep2_tech2", #DONE
"r6n_Q_N_rep1_tech1",
"r6n_Q_N_rep2_tech1",
"r6n_Q_SS_rep1_tech1", #OK
"r6n_Q_SS_rep1_tech2", #OK
"r6n_Q_SS_rep2_tech1",
"r1n_Q_N_rep2_tech1", #DONE* ∆ rep1 → rep2
"r1n_Q_N_rep1_tech1", #DONE* ∆ rep2 → rep1
"r1n_Q_SS_rep2_tech1", #DONE* ∆ rep1 → rep2
"r1n_Q_SS_rep1_tech1", #DONE* ∆ rep2 → rep1
"r6n_DSm2_SS_rep2_tech1", #DONE* ∆ rep1 → rep2
"r6n_DSm2_SS_rep1_tech1", #DONE* ∆ rep2 → rep1
"r6n_DSp24_SS_rep2_tech1", #DONE* ∆ rep1 → rep2
"r6n_DSp24_SS_rep1_tech1", #DONE* ∆ rep2 → rep1
"r6n_DSp2_SS_rep2_tech1", #DONE* ∆ rep1 → rep2
"r6n_DSp2_SS_rep1_tech1", #DONE* ∆ rep2 → rep1
"r6n_DSp48_SS_rep2_tech1", #DONE* ∆ rep1 → rep2
"r6n_DSp48_SS_rep1_tech2", #DONE* ∆ rep2 → rep1 #DONE‡ ∆ tech1 → tech2
"r6n_G1_SS_rep2_tech2", #DONE* ∆ rep1 → rep2 #DONE‡ ∆ tech1 → tech2
"r6n_G1_SS_rep1_tech2", #DONE* ∆ rep2 → rep1 #DONE‡ ∆ tech1 → tech2
"r6n_Q_N_rep2_tech1", #DONE* ∆ rep1 → rep2
"r6n_Q_N_rep1_tech1", #DONE* ∆ rep2 → rep1
"r6n_Q_SS_rep2_tech1", #DONE* ∆ rep1 → rep2 #OK
"r6n_Q_SS_rep2_tech2", #DONE* ∆ rep1 → rep2 #OK
"r6n_Q_SS_rep1_tech1", #DONE* ∆ rep2 → rep1
"t4n_DSm2_SS_rep1_tech1",
"t4n_DSm2_SS_rep2_tech1",
"t4n_DSp24_SS_rep1_tech1",
Expand All @@ -595,25 +595,25 @@ col_cor <- setNames( #DEKHO
"WT_DSp24_SS_rep2_tech1",
"WT_DSp2_SS_rep1_tech1",
"WT_DSp2_SS_rep2_tech1",
"WT_DSp48_SS_rep1_tech1", #OK
"WT_DSp48_SS_rep1_tech2", #OK
"WT_DSp48_SS_rep1_tech1", #OK
"WT_DSp48_SS_rep1_tech2", #OK
"WT_DSp48_SS_rep2_tech1",
"WTovn_G1_N_rep1_tech1",
"WTovn_G1_N_rep2_tech1",
"WTovn_G1_SS_rep1_tech1",
"WTovn_G1_SS_rep2_tech1",
"WT_G1_SS_rep1_tech2", #DONE
"WT_G1_SS_rep2_tech2", #DONE
"WT_G1_SS_rep1_tech2", #DONE‡ ∆ tech1 → tech2
"WT_G1_SS_rep2_tech2", #DONE‡ ∆ tech1 → tech2
"WTovn_Q_N_rep1_tech1",
"WTovn_Q_N_rep2_tech1",
"WTovn_Q_SS_rep1_tech1",
"WTovn_Q_SS_rep2_tech1",
"WTtest_Q_N_rep2_tech1", #DONE
"WTtest_Q_SS_rep2_tech1", #DONE
"WTtest_Q_N_rep2_tech1", #DONE† Duplicated #1
"WTtest_Q_SS_rep2_tech1", #DONE† Duplicated #2
"WT_Q_N_rep1_tech1",
"WT_Q_N_rep2_tech1", #DONE
"WT_Q_N_rep2_tech1", #DONE† Duplicated #1
"WT_Q_SS_rep1_tech1",
"WT_Q_SS_rep2_tech1" #DONE
"WT_Q_SS_rep2_tech1" #DONE† Duplicated #2
)
)

Expand Down
54 changes: 33 additions & 21 deletions results/2023-0215/rough-draft_new-approach-to-analyses.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ filter_process_counts_matrix <- function(named_character_vector) {
)
df <- dplyr::bind_cols(
df[, 1:11],
df[, 12:ncol(df)][, match(named_character_vector, colnames(df)[12:ncol(df)])]
df[, 12:ncol(df)][
, match(named_character_vector, colnames(df)[12:ncol(df)])
]
)
names(df)[12:ncol(df)] <- names(named_character_vector)

Expand Down Expand Up @@ -117,11 +119,20 @@ write_plot_info <- function(


plot_volcano <- function(
table, label, selection, label_size, p_cutoff, FC_cutoff,
point_size = 1, cutoff_line_width = 0.2,
xlim, ylim,
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", "#A020F0"), #TODO More control,
title, subtitle, ...
table,
label,
selection,
label_size,
p_cutoff,
FC_cutoff,
point_size = 1,
cutoff_line_width = 0.2,
xlim,
ylim,
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", "#A020F0"),
title,
subtitle,
...
) {
# ...
#
Expand All @@ -136,7 +147,7 @@ plot_volcano <- function(
# :param FC_cutoff: cut-off for absolute log2 fold-change; vertical lines
# will be drawn at the negative and positive values of
# log2FCcutoff
# <float>
# <float>
# :param xlim: limits of the x-axis <float>
# :param ylim: limits of the y-axis <float>
# :param color: character vector of four hexcode colors <chr>
Expand Down Expand Up @@ -326,7 +337,7 @@ call_DESeq2_results_run_analyses <- function(
# Coerce GRanges object to tibble
t_DGE_unshrunken <- DGE_unshrunken_GR %>% dplyr::as_tibble()

# Identify significant features
# Identify top 5 up- and downregulated significant features
all_unshrunken <- t_DGE_unshrunken$thorough
if(base::isTRUE(selection)) {
selection_down_unshrunken <- t_DGE_unshrunken %>%
Expand Down Expand Up @@ -381,7 +392,7 @@ call_DESeq2_results_run_analyses <- function(
FC_cutoff = threshold_lfc,
xlim = c(x_min, x_max),
ylim = c(y_min, y_max),
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", color),
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", color), #TODO More control
title = info_volcano[1],
subtitle = info_volcano[2]
) +
Expand All @@ -396,7 +407,7 @@ call_DESeq2_results_run_analyses <- function(
FC_cutoff = threshold_lfc,
xlim = c(x_min, x_max),
ylim = c(y_min, y_max),
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", color),
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", color), #TODO More control
cutoff_line_width = 3,
point_size = 2.5,
title = "",
Expand Down Expand Up @@ -433,7 +444,7 @@ call_DESeq2_results_run_analyses <- function(
# ] %>%
ggplot(aes(x = pvalue)) +
geom_histogram(
binwidth = 0.025,
binwidth = 0.025, #TODO More control
fill = "steelblue",
color = "white"
) +
Expand All @@ -453,7 +464,7 @@ call_DESeq2_results_run_analyses <- function(
# ] %>%
ggplot(aes(x = padj)) +
geom_histogram(
binwidth = 0.025,
binwidth = 0.025, #TODO More control
fill = "steelblue",
color = "white"
) +
Expand All @@ -464,6 +475,7 @@ call_DESeq2_results_run_analyses <- function(
) +
theme_slick


# Making plots *with* LFC shrinkage values (apeglm) ----------------------
# Coerce GRanges object to tibble
t_DGE_shrunken <- DGE_shrunken_GR %>% dplyr::as_tibble()
Expand All @@ -474,7 +486,7 @@ call_DESeq2_results_run_analyses <- function(
p_cutoff <- threshold_p
}

# Identify significant features
# Identify top 5 up- and downregulated significant features
all_shrunken <- t_DGE_shrunken$thorough
if(base::isTRUE(selection)) {
selection_down_shrunken <- t_DGE_shrunken %>%
Expand Down Expand Up @@ -529,7 +541,7 @@ call_DESeq2_results_run_analyses <- function(
FC_cutoff = threshold_lfc,
xlim = c(x_min, x_max),
ylim = c(y_min, y_max),
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", color),
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", color), #TODO More control
title = info_volcano[1],
subtitle = info_volcano[2]
) +
Expand All @@ -544,7 +556,7 @@ call_DESeq2_results_run_analyses <- function(
FC_cutoff = threshold_lfc,
xlim = c(x_min, x_max),
ylim = c(y_min, y_max),
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", color),
color = c("#D3D3D3", "#D3D3D3", "#D3D3D3", color), #TODO More control
cutoff_line_width = 3,
point_size = 2.5,
title = "",
Expand Down Expand Up @@ -578,7 +590,7 @@ call_DESeq2_results_run_analyses <- function(
hist_shrunken_s <- t_DGE_shrunken %>%
ggplot(aes(x = padj)) +
geom_histogram(
binwidth = 0.0033,
binwidth = 0.0033, #TODO More control
fill = "steelblue",
color = "white"
) +
Expand Down Expand Up @@ -625,7 +637,7 @@ call_DESeq2_results_run_analyses <- function(
t_DGE_lessAbs_unshrunken <- DGE_lessAbs_unshrunken_GR %>%
dplyr::as_tibble()

# Identify significant features
# Identify top 5 up- and downregulated significant features
all_lessAbs_unshrunken <- t_DGE_lessAbs_unshrunken$thorough
if(base::isTRUE(selection)) {
selection_down_lessAbs_unshrunken <- t_DGE_lessAbs_unshrunken %>%
Expand Down Expand Up @@ -672,7 +684,7 @@ call_DESeq2_results_run_analyses <- function(
FC_cutoff = threshold_lfc,
xlim = c(-2, 2),
ylim = c(0, 5),
color = c("#D3D3D3", "#D3D3D3", color, "#D3D3D3"),
color = c("#D3D3D3", "#D3D3D3", color, "#D3D3D3"), #TODO More control
title = info_volcano[1],
subtitle = info_volcano[2]
) +
Expand All @@ -687,7 +699,7 @@ call_DESeq2_results_run_analyses <- function(
FC_cutoff = threshold_lfc,
xlim = c(-2, 2),
ylim = c(0, 5),
color = c("#D3D3D3", "#D3D3D3", color, "#D3D3D3"),
color = c("#D3D3D3", "#D3D3D3", color, "#D3D3D3"), #TODO More control
cutoff_line_width = 3,
point_size = 2.5,
title = "",
Expand Down Expand Up @@ -721,7 +733,7 @@ call_DESeq2_results_run_analyses <- function(
hist_lessAbs_unshrunken_p <- t_DGE_lessAbs_unshrunken %>%
ggplot(aes(x = pvalue)) +
geom_histogram(
binwidth = 0.025,
binwidth = 0.025, #TODO More control
fill = "steelblue",
color = "white"
) +
Expand All @@ -737,7 +749,7 @@ call_DESeq2_results_run_analyses <- function(
] %>%
ggplot(aes(x = padj)) +
geom_histogram(
binwidth = 0.025,
binwidth = 0.025, #TODO More control
fill = "steelblue",
color = "white"
) +
Expand Down
Loading

0 comments on commit 950ca0c

Please sign in to comment.