(OPTIONAL, since the R-script complete_deg_pipeline_custom_cutoff.R runs completely) Generate PCA-plot
#mamba activate r_env
#install.packages("ggfun")
# Import the required libraries
library("AnnotationDbi")
library("clusterProfiler")
library("ReactomePA")
library(gplots)
library(tximport)
library(DESeq2)
#library("org.Hs.eg.db")
library(dplyr)
library(tidyverse)
#install.packages("devtools")
#devtools::install_version("gtable", version = "0.3.0")
library(gplots)
library("RColorBrewer")
#install.packages("ggrepel")
library("ggrepel")
# install.packages("openxlsx")
library(openxlsx)
library(EnhancedVolcano)
library(DESeq2)
library(edgeR)
setwd("~/DATA/Data_Tam_RNAseq_2026_Dicl_Mero_Azith_Rifa_on_AYE/results/star_salmon")
# Define paths to your Salmon output quantification files
# Store sample names in a character vector
samples <- c(
"AYE-O_Azi20_solid_r1", "AYE-O_Azi20_solid_r2", "AYE-O_Azi20_solid_r3", "AYE-O_ctr_r1", "AYE-O_ctr_r2",
"AYE-O_ctr_r3", "AYE-O_ctr_solid_r1", "AYE-O_ctr_solid_r2", "AYE-O_ctr_solid_r3",
"AYE-O_Diclo375_r1", "AYE-O_Diclo375_r2", "AYE-O_Diclo375_r3", "AYE-O_Mero0.5_r1",
"AYE-O_Mero0.5_r2", "AYE-O_Mero0.5_r3", "AYE-O_Rifampicin2_r1", "AYE-O_Rifampicin2_r2",
"AYE-O_Rifampicin2_r3", "AYE-T_Azi20_solid_r1", "AYE-T_Azi20_solid_r2", "AYE-T_Azi20_solid_r3",
"AYE-T_ctr_r1", "AYE-T_ctr_r2", "AYE-T_ctr_r3", "AYE-T_ctr_solid_r1", "AYE-T_ctr_solid_r2",
"AYE-T_ctr_solid_r3", "AYE-T_Diclo375_r1", "AYE-T_Diclo375_r2", "AYE-T_Diclo375_r3",
"AYE-T_Mero0.15_r1", "AYE-T_Mero0.15_r2", "AYE-T_Mero0.15_r3", "AYE-T_Rifampicin2_r1",
"AYE-T_Rifampicin2_r2", "AYE-T_Rifampicin2_r3", "AYE-WT_Azi20_solid_r1", "AYE-WT_Azi20_solid_r2",
"AYE-WT_Azi20_solid_r3", "AYE-WT_ctr_r1", "AYE-WT_ctr_r2", "AYE-WT_ctr_r3", "AYE-WT_ctr_solid_r1",
"AYE-WT_ctr_solid_r2", "AYE-WT_ctr_solid_r3", "AYE-WT_Diclo1250_solid_r1", "AYE-WT_Diclo1250_solid_r2",
"AYE-WT_Diclo1250_solid_r3", "AYE-WT_Diclo750_r1", "AYE-WT_Diclo750_r2", "AYE-WT_Diclo750_r3",
"AYE-WT_Mero0.35-0.5_r1", "AYE-WT_Mero0.35-0.5_r2", "AYE-WT_Mero0.35-0.5_r3", "AYE-WT_Rifampicin1.5_r1",
"AYE-WT_Rifampicin1.5_r2", "AYE-WT_Rifampicin1.5_r3", "F_Azi20_solid_r1", "F_Azi20_solid_r2",
"F_Azi20_solid_r3", "F_ctr_solid_r1", "F_ctr_solid_r2", "F_ctr_solid_r3",
"O-Trans_ctr_r1","O-Trans_ctr_r2","O-Trans_ctr_r3", "O-Trans_Diclo375_r1","O-Trans_Diclo375_r2","O-Trans_Diclo375_r3",
"O-Trans_Mero0.25_r1", "O-Trans_Mero0.25_r2", "O-Trans_Mero0.25_r3", "O-Trans_Rifampicin2_r1",
"O-Trans_Rifampicin2_r2", "O-Trans_Rifampicin2_r3", "WT-Trans_ctr_r1", "WT-Trans_ctr_r2",
"WT-Trans_ctr_r3", "WT-Trans_Diclo750_r1", "WT-Trans_Diclo750_r2", "WT-Trans_Diclo750_r3"
)
# Automatically generate the named vector
files <- setNames(paste0("./", samples, "/quant.sf"), samples)
# Import the transcript abundance data with tximport
txi <- tximport(files, type = "salmon", txIn = TRUE, txOut = TRUE)
# -----------------------------------------------------------------
# ---- Step 1: Create Detailed Metadata from Your Sample Names ----
# Extract metadata from sample names
samples <- names(files)
# Parse the complex sample names
metadata <- data.frame(
sample = samples,
stringsAsFactors = FALSE
)
# Extract strain (everything before first underscore or hyphen treatment)
metadata$strain <- sapply(strsplit(samples, "[-_]"), function(x) {
if(x[1] %in% c("AYE", "O", "WT", "F")) {
if(x[1] == "AYE" && length(x) > 1 && x[2] %in% c("WT", "T", "O")) {
paste(x[1:2], collapse = "-")
} else if(x[1] %in% c("O", "WT") && x[2] == "Trans") {
paste(x[1:2], collapse = "-")
} else {
x[1]
}
} else {
x[1]
}
})
# Extract treatment type
metadata$treatment <- sapply(samples, function(x) {
if(grepl("_ctr", x)) return("ctrl")
if(grepl("Diclo", x)) return("Diclo")
if(grepl("Mero", x)) return("Mero")
if(grepl("Azi", x)) return("Azi")
if(grepl("Rifampicin", x)) return("Rifampicin")
return("ctrl")
})
# Extract concentration
metadata$concentration <- sapply(samples, function(x) {
if(grepl("Diclo1250", x)) return("1250")
if(grepl("Diclo750", x)) return("750")
if(grepl("Diclo375", x)) return("375")
if(grepl("Mero0.5", x)) return("0.5")
if(grepl("Mero0.35", x)) return("0.35")
if(grepl("Mero0.25", x)) return("0.25")
if(grepl("Mero0.15", x)) return("0.15")
if(grepl("Azi20", x)) return("20")
if(grepl("Rifampicin2", x)) return("2")
if(grepl("Rifampicin1.5", x)) return("1.5")
return("0")
})
# Extract condition (solid vs liquid)
metadata$condition <- ifelse(grepl("_solid", samples), "solid", "liquid")
# Extract replicate
metadata$replicate <- sapply(strsplit(samples, "_"), function(x) {
rep_part <- x[length(x)]
gsub("r", "", rep_part)
})
# Create combined group for easy comparisons
metadata$group <- paste(metadata$strain, metadata$treatment, metadata$concentration, sep = "_")
# Set row names
rownames(metadata) <- metadata$sample
# Reorder to match txi columns
metadata <- metadata[colnames(txi$counts), ]
# ---------------------------------------------
# ---- Step 2: Choose Your Design Strategy ----
# Strategy A: Full Factorial Design (if balanced)
#dds <- DESeqDataSetFromTximport(txi, metadata,
# design = ~ strain + treatment + condition)
# --> Strategy B: Combined Group Factor ⭐ RECOMMENDED
metadata$group <- factor(paste(metadata$strain,
metadata$treatment,
metadata$concentration,
metadata$condition,
sep = "_"))
dds <- DESeqDataSetFromTximport(txi, metadata,
design = ~ group)
dds <- DESeq(dds)
# See all available comparisons
resultsNames(dds)
# -------------------------------------------------------------
# ---- Step 3: Set Up Specific Comparisons from Your Notes ----
# ==========================================
# 1. Define Exact Comparisons from Your Notes
# ==========================================
planned_comparisons <- list(
# --- Baseline / Strain Controls ---
AYE_T_ctr_vs_AYE_WT_ctr = list(treat = "AYE-T_ctrl_0_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_O_ctr_vs_AYE_WT_ctr = list(treat = "AYE-O_ctrl_0_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
O_Trans_ctr_vs_AYE_WT_ctr = list(treat = "O-Trans_ctrl_0_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
WT_Trans_ctr_vs_AYE_WT_ctr = list(treat = "WT-Trans_ctrl_0_liquid",ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_O_ctr_vs_AYE_T = list(treat = "AYE-O_ctrl_0_liquid", ctrl = "AYE-T_ctrl_0_liquid"),
O_Trans_ctr_vs_AYE_T = list(treat = "O-Trans_ctrl_0_liquid", ctrl = "AYE-T_ctrl_0_liquid"),
WT_Trans_ctr_vs_AYE_T = list(treat = "WT-Trans_ctrl_0_liquid",ctrl = "AYE-T_ctrl_0_liquid"),
# --- Condition Effects (Solid vs Liquid) ---
AYE_WT_ctr_solid_vs_AYE_WT_ctr = list(treat = "AYE-WT_ctrl_0_solid", ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_O_ctr_solid_vs_AYE_O_ctr = list(treat = "AYE-O_ctrl_0_solid", ctrl = "AYE-O_ctrl_0_liquid"),
AYE_T_ctr_solid_vs_AYE_T_ctr = list(treat = "AYE-T_ctrl_0_solid", ctrl = "AYE-T_ctrl_0_liquid"),
AYE_O_ctr_solid_vs_AYE_WT_ctr_solid= list(treat = "AYE-O_ctrl_0_solid", ctrl = "AYE-WT_ctrl_0_solid"),
AYE_T_ctr_solid_vs_AYE_WT_ctr_solid= list(treat = "AYE-T_ctrl_0_solid", ctrl = "AYE-WT_ctrl_0_solid"),
# --- Diclofenac ---
AYE_WT_Diclo750_vs_AYE_WT_ctr = list(treat = "AYE-WT_Diclo_750_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_T_Diclo375_vs_AYE_WT_ctr = list(treat = "AYE-T_Diclo_375_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_O_Diclo375_vs_AYE_WT_ctr = list(treat = "AYE-O_Diclo_375_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
O_Trans_Diclo375_vs_AYE_WT_ctr = list(treat = "O-Trans_Diclo_375_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
WT_Trans_Diclo750_vs_AYE_WT_ctr = list(treat = "WT-Trans_Diclo_750_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
Diclo_AYE_WT_1250_solid_vs_solid_ctr = list(treat = "AYE-WT_Diclo_1250_solid", ctrl = "AYE-WT_ctrl_0_solid"),
# --- Meropenem ---
AYE_WT_Mero_vs_AYE_WT_ctr = list(treat = "AYE-WT_Mero_0.35_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_T_Mero_vs_AYE_WT_ctr = list(treat = "AYE-T_Mero_0.15_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_O_Mero_vs_AYE_WT_ctr = list(treat = "AYE-O_Mero_0.5_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
O_Trans_Mero_vs_AYE_WT_ctr = list(treat = "O-Trans_Mero_0.25_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_T_Mero_vs_AYE_T_ctr = list(treat = "AYE-T_Mero_0.15_liquid", ctrl = "AYE-T_ctrl_0_liquid"),
# --- Azithromycin (Solid) ---
AYE_WT_Azi_vs_solid_ctr = list(treat = "AYE-WT_Azi_20_solid", ctrl = "AYE-WT_ctrl_0_solid"),
AYE_T_Azi_vs_solid_ctr = list(treat = "AYE-T_Azi_20_solid", ctrl = "AYE-T_ctrl_0_solid"),
AYE_O_Azi_vs_solid_ctr = list(treat = "AYE-O_Azi_20_solid", ctrl = "AYE-O_ctrl_0_solid"),
F_Azi_vs_F_solid_ctr = list(treat = "F_Azi_20_solid", ctrl = "F_ctrl_0_solid"),
# --- Rifampicin ---
AYE_WT_Rif_vs_AYE_WT_ctr = list(treat = "AYE-WT_Rifampicin_1.5_liquid", ctrl = "AYE-WT_ctrl_0_liquid"),
AYE_T_Rif_vs_AYE_T_ctr = list(treat = "AYE-T_Rifampicin_2_liquid", ctrl = "AYE-T_ctrl_0_liquid"),
AYE_O_Rif_vs_AYE_O_ctr = list(treat = "AYE-O_Rifampicin_2_liquid", ctrl = "AYE-O_ctrl_0_liquid"),
O_Trans_Rif_vs_O_Trans_ctr = list(treat = "O-Trans_Rifampicin_2_liquid", ctrl = "O-Trans_ctrl_0_liquid")
)
# Additional Analyses
planned_comparisons <- list(
# --- Diclofenac_2 ---
# * AYE-T_Diclo_375_liquid vs AYE-T_ctrl_0_liquid
# * AYE-O_Diclo_375_liquid vs AYE-O_ctrl_0_liquid
# * O-Trans_Diclo_375_liquid vs AYE-O-Trans_ctrl_0_liquid
# * WT-Trans_Diclo_750_liquid vs AYE-WT-Trans_ctrl_0_liquid
AYE_T_Diclo375_vs_AYE_T_ctr = list(treat = "AYE-T_Diclo_375_liquid", ctrl = "AYE-T_ctrl_0_liquid"),
AYE_O_Diclo375_vs_AYE_O_ctr = list(treat = "AYE-O_Diclo_375_liquid", ctrl = "AYE-O_ctrl_0_liquid"),
O_Trans_Diclo375_vs_O_Trans_ctr = list(treat = "O-Trans_Diclo_375_liquid", ctrl = "O-Trans_ctrl_0_liquid"),
WT_Trans_Diclo750_vs_WT_Trans_ctr = list(treat = "WT-Trans_Diclo_750_liquid", ctrl = "WT-Trans_ctrl_0_liquid"),
# --- Meropenem_2 ---
# * AYE-T_Mero_0.15_liquid vs AYE-T_ctrl_0_liquid
# * AYE-O_Mero_0.5_liquid vs AYE-O_ctrl_0_liquid
# * O-Trans_Mero_0.25_liquid vs AYE-O-Trans_ctrl_0_liquid
AYE_T_Mero_vs_AYE_T_ctr = list(treat = "AYE-T_Mero_0.15_liquid", ctrl = "AYE-T_ctrl_0_liquid"),
AYE_O_Mero_vs_AYE_O_ctr = list(treat = "AYE-O_Mero_0.5_liquid", ctrl = "AYE-O_ctrl_0_liquid"),
O_Trans_Mero_vs_O_Trans_ctr = list(treat = "O-Trans_Mero_0.25_liquid", ctrl = "O-Trans_ctrl_0_liquid")
)
# ==========================================
# 2. Verification & Validation Script
# ==========================================
# Identify which column in colData holds your group names
group_col <- if("group" %in% colnames(colData(dds))) "group" else
if("treatment" %in% colnames(colData(dds))) "treatment" else
stop("❌ Please specify the correct colData column containing group names.")
actual_groups <- unique(colData(dds)[[group_col]])
cat("\n", paste(rep("=", 85), collapse=""), "\n")
cat("📋 VERIFICATION OF NOTE-DERIVED COMPARISONS\n")
cat(paste(rep("=", 85), collapse=""), "\n\n")
validation_results <- data.frame(
Comparison_Name = character(),
Treatment_String = character(),
Control_String = character(),
Status = character(),
Suggested_Contrast = character(),
stringsAsFactors = FALSE
)
for(name in names(planned_comparisons)) {
trt <- planned_comparisons[[name]]$treat
ctl <- planned_comparisons[[name]]$ctrl
# Find closest matches in actual data
trt_match <- actual_groups[grepl(trt, actual_groups, fixed = TRUE)]
ctl_match <- actual_groups[grepl(ctl, actual_groups, fixed = TRUE)]
status <- if(length(trt_match) > 0 && length(ctl_match) > 0) "✅ VALID" else "⚠️ CHECK"
contrast_str <- if(status == "✅ VALID")
paste0('c("', group_col, '", "', trt_match[1], '", "', ctl_match[1], '")') else "N/A"
validation_results <- rbind(validation_results, data.frame(
Comparison_Name = name,
Treatment_String = trt,
Control_String = ctl,
Status = status,
Suggested_Contrast = contrast_str,
stringsAsFactors = FALSE
))
cat(sprintf("%-45s | T:%-25s C:%-20s | %s\n", name, trt, ctl, status))
if(status == "⚠️ CHECK") {
if(length(trt_match) == 0) cat(" 🔍 Treat not found. Closest: ", paste(head(actual_groups[grepl(strsplit(trt, "_")[[1]][1], actual_groups)], 3), collapse=", "), "\n")
if(length(ctl_match) == 0) cat(" 🔍 Ctrl not found. Closest: ", paste(head(actual_groups[grepl(strsplit(ctl, "_")[[1]][1], actual_groups)], 3), collapse=", "), "\n")
}
}
# ==========================================
# 3. Auto-Generate DESeq2 results() Calls (Optional)
# ==========================================
valid_comparisons <- validation_results[validation_results$Status == "✅ VALID", ]
if(nrow(valid_comparisons) > 0) {
cat("\n📜 READY-TO-RUN DESeq2 CONTRASTS:\n")
cat(paste(rep("-", 60), collapse=""), "\n")
for(i in seq_len(nrow(valid_comparisons))) {
cat(sprintf('res_%s <- results(dds, contrast = %s)\n',
gsub("[^A-Za-z0-9]", "_", valid_comparisons$Comparison_Name[i]),
valid_comparisons$Suggested_Contrast[i]))
}
} else {
cat("\n⚠️ No exact matches found. Check your colData group naming convention.\n")
}
# -----------------------------
# ---- Step 4: PCA figures ----
# 🔍 What each figure shows:
#
# 01_PCA_by_Strain.png → Tests if genetic background (AYE-WT, AYE-T, AYE-O, Trans, F) is the dominant source of variation.
# 02_PCA_by_Treatment.png → Shows clustering by antibiotic/drug exposure (ctrl, Diclo, Mero, Azi, Rifampicin).
# 03_PCA_by_Condition.png → Reveals batch/growth media effects (solid vs liquid).
# 04_PCA_CombinedGroups.png → Full experimental grouping with labeled sample names for quick outlier detection.
# 05_PCA_Ellipses.png → Adds 95% confidence boundaries per strain to visualize group spread and overlap.
#
# ⚠️ Quick Checklist Before Running:
#
# Ensure metadata columns (strain, treatment, condition, group) are attached to colData(dds).
# If ggrepel is missing, run install.packages("ggrepel").
# All PNGs will save to your current working directory (getwd()).
# Install if missing: install.packages(c("ggplot2", "ggrepel"))
library(DESeq2)
library(ggplot2)
library(ggrepel)
# 1. Variance Stabilizing Transformation & Extract PCA Data
vsd <- vst(dds, blind = FALSE)
pca_data <- plotPCA(vsd, intgroup = c("strain", "treatment", "condition", "group"), returnData = TRUE)
percent_var <- round(100 * attr(pca_data, "percentVar"))
# Consistent theme for all plots
base_theme <- theme_bw(base_size = 12) +
theme(plot.title = element_text(hjust = 0.5, face = "bold", size = 13),
legend.position = "right",
legend.title = element_text(face = "bold"),
panel.grid.major = element_line(color = "grey90"),
panel.grid.minor = element_blank())
# --- Plot 1: Colored by Strain ---
p1 <- ggplot(pca_data, aes(x = PC1, y = PC2, color = strain, shape = condition)) +
geom_point(size = 3, alpha = 0.8) +
geom_text_repel(aes(label = name), size = 2.5, max.overlaps = 20, show.legend = FALSE) +
labs(x = paste0("PC1: ", percent_var[1], "% variance"),
y = paste0("PC2: ", percent_var[2], "% variance"),
title = "PCA: Samples Colored by Strain",
color = "Strain", shape = "Condition") +
base_theme
ggsave("01_PCA_by_Strain.png", p1, width = 8, height = 6, dpi = 300)
# --- Plot 2: Colored by Treatment ---
p2 <- ggplot(pca_data, aes(x = PC1, y = PC2, color = treatment, shape = condition)) +
geom_point(size = 3, alpha = 0.8) +
labs(x = paste0("PC1: ", percent_var[1], "% variance"),
y = paste0("PC2: ", percent_var[2], "% variance"),
title = "PCA: Samples Colored by Treatment",
color = "Treatment", shape = "Condition") +
base_theme
ggsave("02_PCA_by_Treatment.png", p2, width = 8, height = 6, dpi = 300)
# --- Plot 3: Colored by Condition (Solid vs Liquid) ---
p3 <- ggplot(pca_data, aes(x = PC1, y = PC2, color = condition, shape = strain)) +
geom_point(size = 3, alpha = 0.8) +
labs(x = paste0("PC1: ", percent_var[1], "% variance"),
y = paste0("PC2: ", percent_var[2], "% variance"),
title = "PCA: Samples Colored by Growth Condition",
color = "Condition", shape = "Strain") +
base_theme
ggsave("03_PCA_by_Condition.png", p3, width = 8, height = 6, dpi = 300)
# --- Plot 4: Combined Groups with Sample Labels ---
p4 <- ggplot(pca_data, aes(x = PC1, y = PC2, color = group)) +
geom_point(size = 3, alpha = 0.8) +
geom_text_repel(aes(label = name), size = 2, max.overlaps = 30, box.padding = 0.3) +
labs(x = paste0("PC1: ", percent_var[1], "% variance"),
y = paste0("PC2: ", percent_var[2], "% variance"),
title = "PCA: Combined Experimental Groups",
color = "Group") +
base_theme + theme(legend.position = "none")
ggsave("04_PCA_CombinedGroups.png", p4, width = 9, height = 7, dpi = 300)
# --- Plot 5: 95% Confidence Ellipses (by Strain) ---
p5 <- ggplot(pca_data, aes(x = PC1, y = PC2, color = strain, fill = strain)) +
geom_point(size = 3, alpha = 0.7) +
stat_ellipse(level = 0.95, alpha = 0.2, geom = "polygon", show.legend = FALSE) +
labs(x = paste0("PC1: ", percent_var[1], "% variance"),
y = paste0("PC2: ", percent_var[2], "% variance"),
title = "PCA: 95% Confidence Ellipses by Strain",
color = "Strain", fill = "Strain") +
base_theme
ggsave("05_PCA_Ellipses.png", p5, width = 8, height = 6, dpi = 300)
message("✅ All 5 PCA plots saved to working directory!")
LOG of Rscript complete_deg_pipeline_custom_cutoff.R
-rw-rw-r-- 1 jhuang jhuang 355609 Jun 22 12:53 DEG_29_AYE_T_Rif_vs_Ctrl.xlsx
-rw-rw-r-- 1 jhuang jhuang 253271 Jun 22 12:53 Volcano_29_AYE_T_Rif_vs_Ctrl.png
-rw-rw-r-- 1 jhuang jhuang 368843 Jun 22 12:53 DEG_30_AYE_O_Rif_vs_Ctrl.xlsx
-rw-rw-r-- 1 jhuang jhuang 358124 Jun 22 12:53 Volcano_30_AYE_O_Rif_vs_Ctrl.png
-rw-rw-r-- 1 jhuang jhuang 347126 Jun 22 12:53 DEG_31_O_Trans_Rif_vs_Ctrl.xlsx
-rw-rw-r-- 1 jhuang jhuang 283473 Jun 22 12:53 Volcano_31_O_Trans_Rif_vs_Ctrl.png
-rw-rw-r-- 1 jhuang jhuang 352375 Jun 22 12:53 DEG_32_AYE_T_Diclo375_vs_AYE_T_ctr.xlsx
-rw-rw-r-- 1 jhuang jhuang 257075 Jun 22 12:53 Volcano_32_AYE_T_Diclo375_vs_AYE_T_ctr.png
-rw-rw-r-- 1 jhuang jhuang 355610 Jun 5 16:26 DEG_29_AYE_T_Rif_vs_Ctrl.xlsx
-rw-rw-r-- 1 jhuang jhuang 254804 Jun 5 16:26 Volcano_29_AYE_T_Rif_vs_Ctrl.png
-rw-rw-r-- 1 jhuang jhuang 368843 Jun 5 16:26 DEG_30_AYE_O_Rif_vs_Ctrl.xlsx
-rw-rw-r-- 1 jhuang jhuang 358417 Jun 5 16:26 Volcano_30_AYE_O_Rif_vs_Ctrl.png
-rw-rw-r-- 1 jhuang jhuang 347127 Jun 5 16:26 DEG_31_O_Trans_Rif_vs_Ctrl.xlsx
-rw-rw-r-- 1 jhuang jhuang 284084 Jun 5 16:26 Volcano_31_O_Trans_Rif_vs_Ctrl.png
-rw-rw-r-- 1 jhuang jhuang 1579 Jun 5 16:26 DEG_Summary_All_31.csv
(r_env) jhuang@WS-2290C:/mnt/md1/DATA/Data_Tam_RNAseq_2026_Dicl_Mero_Azith_Rifa_on_AYE/results/star_salmon$ Rscript complete_deg_pipeline_custom_cutoff.R
There were 22 warnings (use warnings() to see them)
📖 Parsing annotation file to build tx2gene mapping...
✅ Created tx2gene mapping with 7520 entries.
📥 Importing Salmon quantifications...
reading in files with read_tsv
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
removing duplicated transcript rows from tx2gene
summarizing abundance
summarizing counts
summarizing length
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
using counts and average transcript lengths from tximport
🚀 Running DESeq2 pipeline...
estimating size factors
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
using 'avgTxLength' from assays(dds), correcting for library size
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
Note: levels of factors in the design contain characters other than
letters, numbers, '_' and '.'. It is recommended (but not required) to use
only letters, numbers, and delimiters '_' or '.', as these are safe characters
for column names in R. [This is a message, not a warning or an error]
final dispersion estimates
fitting model and testing
Available groups in dds:
[1] "AYE-O_Azi_20_solid" "AYE-O_ctrl_0_liquid"
[3] "AYE-O_ctrl_0_solid" "AYE-O_Diclo_375_liquid"
[5] "AYE-O_Mero_0.5_liquid" "AYE-O_Rifampicin_2_liquid"
[7] "AYE-T_Azi_20_solid" "AYE-T_ctrl_0_liquid"
[9] "AYE-T_ctrl_0_solid" "AYE-T_Diclo_375_liquid"
[11] "AYE-T_Mero_0.15_liquid" "AYE-T_Rifampicin_2_liquid"
[13] "AYE-WT_Azi_20_solid" "AYE-WT_ctrl_0_liquid"
[15] "AYE-WT_ctrl_0_solid" "AYE-WT_Diclo_1250_solid"
[17] "AYE-WT_Diclo_750_liquid" "AYE-WT_Mero_0.35-0.5_liquid"
[19] "AYE-WT_Rifampicin_1.5_liquid" "F_Azi_20_solid"
[21] "F_ctrl_0_solid" "O-Trans_ctrl_0_liquid"
[23] "O-Trans_Diclo_375_liquid" "O-Trans_Mero_0.25_liquid"
[25] "O-Trans_Rifampicin_2_liquid" "WT-Trans_ctrl_0_liquid"
[27] "WT-Trans_Diclo_750_liquid"
📖 Parsing annotation file for gene names...
🚀 PROCESSING 38 COMPARISONS
Base Thresholds: padj <= 0.05, |log2FC| >= 2 (Dynamic adjustments apply per comparison)
================================================================================
[01/38] 01_AYE_T_ctr_vs_AYE_WT_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 1.4
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 16, Down: 151)
[02/38] 02_AYE_O_ctr_vs_AYE_WT_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 1.4
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 9, Down: 9)
[03/38] 03_O_Trans_ctr_vs_AYE_WT_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 1.4
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 10, Down: 44)
[04/38] 04_WT_Trans_ctr_vs_AYE_WT_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 1.4
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 15, Down: 153)
[05/38] 05_AYE_O_ctr_vs_AYE_T_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 1.4
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 28, Down: 3)
[06/38] 06_O_Trans_ctr_vs_AYE_T_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 1.4
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 11, Down: 10)
[07/38] 07_WT_Trans_ctr_vs_AYE_T_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 1.4
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 4, Down: 14)
[08/38] 08_AYE_WT_ctr_solid_vs_liquid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 485, Down: 324)
[09/38] 09_AYE_O_ctr_solid_vs_liquid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 475, Down: 309)
[10/38] 10_AYE_T_ctr_solid_vs_liquid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 501, Down: 332)
[11/38] 11_AYE_O_ctr_solid_vs_AYE_WT_solid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 12, Down: 5)
[12/38] 12_AYE_T_ctr_solid_vs_AYE_WT_solid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 5, Down: 8)
[13/38] 13_AYE_WT_Diclo750_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 12, Down: 45)
[14/38] 14_AYE_T_Diclo375_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 75, Down: 181)
[15/38] 15_AYE_O_Diclo375_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 26, Down: 240)
[16/38] 16_O_Trans_Diclo375_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 17, Down: 82)
[17/38] 17_WT_Trans_Diclo750_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 25, Down: 230)
[18/38] 18_AYE_WT_Diclo1250_solid_vs_Ctrl_solid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 66, Down: 26)
[19/38] 19_AYE_WT_Mero_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 359, Down: 175)
[20/38] 20_AYE_T_Mero_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 93, Down: 110)
[21/38] 21_AYE_O_Mero_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 267, Down: 244)
[22/38] 22_O_Trans_Mero_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 183, Down: 153)
[23/38] 23_AYE_T_Mero_vs_AYE_T_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 91, Down: 27)
[24/38] 24_AYE_WT_Azi_solid_vs_Ctrl_solid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 341, Down: 329)
[25/38] 25_AYE_T_Azi_solid_vs_Ctrl_solid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 510, Down: 433)
[26/38] 26_AYE_O_Azi_solid_vs_Ctrl_solid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 484, Down: 443)
[27/38] 27_F_Azi_solid_vs_Ctrl_solid
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 147, Down: 271)
[28/38] 28_AYE_WT_Rif_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 1.2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 8, Down: 11)
[29/38] 29_AYE_T_Rif_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 1.2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 34, Down: 41)
[30/38] 30_AYE_O_Rif_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 1.2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 71, Down: 100)
[31/38] 31_O_Trans_Rif_vs_Ctrl
-> Using dynamic LFC cutoff: |log2FC| >= 1.2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 6, Down: 10)
[32/38] 32_AYE_T_Diclo375_vs_AYE_T_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 47, Down: 6)
[33/38] 33_AYE_O_Diclo375_vs_AYE_O_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 8, Down: 73)
[34/38] 34_O_Trans_Diclo375_vs_O_Trans_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 2, Down: 17)
[35/38] 35_WT_Trans_Diclo750_vs_WT_Trans_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 10, Down: 27)
[36/38] 36_AYE_T_Mero_vs_AYE_T_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 91, Down: 27)
[37/38] 37_AYE_O_Mero_vs_AYE_O_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 242, Down: 135)
[38/38] 38_O_Trans_Mero_vs_O_Trans_ctr
-> Using dynamic LFC cutoff: |log2FC| >= 2
🔍 DEBUG: Columns in res_df : baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean
🔍 DEBUG: Columns in anno_df : gene_id, gene_id_clean, gene_name
🔍 DEBUG: Columns after join: baseMean, log2FoldChange, lfcSE, stat, pvalue, padj, GeneID, GeneID_clean, gene_id, gene_name
✅ Annotation step completed successfully.
✅ Excel + Volcano saved (Up: 177, Down: 50)
================================================================================
📊 FINAL SUMMARY OF ALL 38 COMPARISONS
name total up down sig_total pct_sig
# |log2FC| >= 1.4
01_AYE_T_ctr_vs_AYE_WT_ctr 3609 16 151 167 4.6
02_AYE_O_ctr_vs_AYE_WT_ctr 3609 9 9 18 0.5
03_O_Trans_ctr_vs_AYE_WT_ctr 3609 10 44 54 1.5
04_WT_Trans_ctr_vs_AYE_WT_ctr 3609 15 153 168 4.7
05_AYE_O_ctr_vs_AYE_T_ctr 3609 28 3 31 0.9
06_O_Trans_ctr_vs_AYE_T_ctr 3609 11 10 21 0.6
07_WT_Trans_ctr_vs_AYE_T_ctr 3609 4 14 18 0.5
# |log2FC| >= 2
08_AYE_WT_ctr_solid_vs_liquid 3609 485 324 809 22.4
09_AYE_O_ctr_solid_vs_liquid 3609 475 309 784 21.7
10_AYE_T_ctr_solid_vs_liquid 3609 501 332 833 23.1
11_AYE_O_ctr_solid_vs_AYE_WT_solid 3609 12 5 17 0.5
12_AYE_T_ctr_solid_vs_AYE_WT_solid 3609 5 8 13 0.4
13_AYE_WT_Diclo750_vs_Ctrl 3609 12 45 57 1.6
14_AYE_T_Diclo375_vs_Ctrl 3609 75 181 256 7.1
15_AYE_O_Diclo375_vs_Ctrl 3609 26 240 266 7.4
16_O_Trans_Diclo375_vs_Ctrl 3609 17 82 99 2.7
17_WT_Trans_Diclo750_vs_Ctrl 3609 25 230 255 7.1
18_AYE_WT_Diclo1250_solid_vs_Ctrl_solid 3609 66 26 92 2.5
19_AYE_WT_Mero_vs_Ctrl 3609 359 175 534 14.8
20_AYE_T_Mero_vs_Ctrl 3609 93 110 203 5.6
21_AYE_O_Mero_vs_Ctrl 3609 267 244 511 14.2
22_O_Trans_Mero_vs_Ctrl 3609 183 153 336 9.3
23_AYE_T_Mero_vs_AYE_T_Ctrl 3609 91 27 118 3.3
24_AYE_WT_Azi_solid_vs_Ctrl_solid 3609 341 329 670 18.6
25_AYE_T_Azi_solid_vs_Ctrl_solid 3609 510 433 943 26.1
26_AYE_O_Azi_solid_vs_Ctrl_solid 3609 484 443 927 25.7
27_F_Azi_solid_vs_Ctrl_solid 3609 147 271 418 11.6
# |log2FC| >= 1.2
28_AYE_WT_Rif_vs_Ctrl 3609 8 11 19 0.5
29_AYE_T_Rif_vs_Ctrl 3609 34 41 75 2.1
30_AYE_O_Rif_vs_Ctrl 3609 71 100 171 4.7
31_O_Trans_Rif_vs_Ctrl 3609 6 10 16 0.4
# |log2FC| >= 2
name total up down sig_total
32_AYE_T_Diclo375_vs_AYE_T_ctr 3609 46 6 52
33_AYE_O_Diclo375_vs_AYE_O_ctr 3609 8 73 81 2.2
34_O_Trans_Diclo375_vs_O_Trans_ctr 3609 2 17 19 0.5
35_WT_Trans_Diclo750_vs_WT_Trans_ctr 3609 10 27 37 1.0
36_AYE_T_Mero_vs_AYE_T_ctr 3609 91 27 118 3.3
37_AYE_O_Mero_vs_AYE_O_ctr 3609 242 135 377 10.4
38_O_Trans_Mero_vs_O_Trans_ctr 3609 177 50 227 6.3
✨ All files saved to: /mnt/md1/DATA/Data_Tam_RNAseq_2026_Dicl_Mero_Azith_Rifa_on_AYE/results/star_salmon/DEG_Results_Complete
📁 Each comparison contains:
1️ DEG_
.xlsx (3 sheets: Complete_Results, Up_Regulated, Down_Regulated)
2️ Volcano_
.png (GeneName labels for top significant genes)
📤 EXPORTING COMPLETE RESULTS TO CSV FOR KEGG/GO…
✅ Successfully exported 38 CSV files to DEG_Results_Complete