This section of the code imports the CSV files containing the results of your differential gene expression analysis. Each file likely represents a different comparison (e.g., LI vs. CI at different time points). The header = TRUE argument ensures that the first row of each file is treated as column names.
# Import CSV files
L1I_C1I <- read.csv("contrast_LI_CI_1DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L1I_L1NI <- read.csv("contrast_LI_LNI_1DPI_Ashr_gene-level_vsd.csv", header = TRUE)
C1I_C1NI <- read.csv("contrast_CI_CNI_1DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L1NI_C1NI <- read.csv("contrast_LNI_CNI_1DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L7I_C7I <- read.csv("contrast_LI_CI_7DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L7I_L7NI <- read.csv("contrast_LI_LNI_7DPI_Ashr_gene-level_vsd.csv", header = TRUE)
C7I_C7NI <- read.csv("contrast_CI_CNI_7DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L7NI_C7NI <- read.csv("contrast_LNI_CNI_7DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L13I_C13I <- read.csv("contrast_LI_CI_13DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L13I_L13NI <- read.csv("contrast_LI_LNI_13DPI_Ashr_gene-level_vsd.csv", header = TRUE)
C13I_C13NI <- read.csv("contrast_CI_CNI_13DPI_Ashr_gene-level_vsd.csv", header = TRUE)
## Warning in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,
## : EOF within quoted string
L13NI_C13NI <- read.csv("contrast_LNI_CNI_13DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L19I_C19I <- read.csv("contrast_LI_CI_19DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L19I_L19NI <- read.csv("contrast_LI_LNI_19DPI_Ashr_gene-level_vsd.csv", header = TRUE)
C19I_C19NI <- read.csv("contrast_CI_CNI_19DPI_Ashr_gene-level_vsd.csv", header = TRUE)
L19NI_C19NI <- read.csv("contrast_LNI_CNI_19DPI_Ashr_gene-level_vsd.csv", header = TRUE)
CI7_CI1<-read.csv("7DPICI_1DPICI_Ashr_gene-level_vsd.csv", header = TRUE)
CI13_CI1<-read.csv("13DPICI_1DPICI_Ashr_gene-level_vsd.csv", header = TRUE)
CI19_CI1<-read.csv("19DPICI_1DPICI_Ashr_gene-level_vsd.csv", header = TRUE)
LI7_LI1<-read.csv("7DPILI_1DPILI_Ashr_gene-level_vsd.csv", header = TRUE)
LI13_LI1<-read.csv("13DPILI_1DPILI_Ashr_gene-level_vsd.csv", header = TRUE)
LI19_LI1<-read.csv("19DPILI_1DPILI_Ashr_gene-level_vsd.csv", header = TRUE)
# Check the data
head(L1I_C1I)
## FeatureID baseMean log2FoldChange lfcSE stat pvalue
## 1 LOC_Os01g02390 243.77356 8.012921 1.2018452 6.879239 6.02e-12
## 2 LOC_Os01g02400 463.97076 1.999869 0.3012772 6.673047 2.51e-11
## 3 LOC_Os01g02420 28.91100 5.512108 1.2885445 4.808829 1.52e-06
## 4 LOC_Os01g02490 22.13266 6.516777 1.4019891 5.021821 5.12e-07
## 5 LOC_Os01g02580 215.35539 4.272259 0.6396421 6.740144 1.58e-11
## 6 LOC_Os01g02610 267.40782 4.212503 0.5440093 7.794131 6.49e-15
## padj svalue
## 1 6.16000e-09 1.010000e-08
## 2 2.12000e-08 3.550000e-05
## 3 3.65924e-04 1.041685e-03
## 4 1.36778e-04 3.670940e-04
## 5 1.44000e-08 3.930000e-08
## 6 2.66000e-11 3.380000e-10
head(L7I_C7I)
## FeatureID baseMean log2FoldChange lfcSE stat pvalue padj
## 1 LOC_Os01g02320 68.04372 2.845853 0.5777447 5.707819 1.14e-08 2.36e-06
## 2 LOC_Os01g02370 81.06417 -9.397608 1.5486703 -6.373429 1.85e-10 5.97e-08
## 3 LOC_Os01g02390 243.77356 10.197282 1.7280797 6.279748 3.39e-10 9.97e-08
## 4 LOC_Os01g02420 28.91100 6.516018 1.0939197 6.115328 9.64e-10 2.48e-07
## 5 LOC_Os01g02490 22.13266 7.662080 1.6487986 5.028904 4.93e-07 5.82e-05
## 6 LOC_Os01g02570 497.21374 2.833343 0.5421673 5.974123 2.31e-09 5.41e-07
## svalue
## 1 0.000119988
## 2 0.000000150
## 3 0.000000332
## 4 0.000000772
## 5 0.000250262
## 6 0.000056200
Define thresholds for classifying genes as upregulated or downregulated based on their log2 fold change and statistical significance (s-value). The code then creates subsets of your data, filtering for genes that meet these criteria. This step is crucial for focusing your Venn diagram analysis on specific gene sets of interest.
# Define thresholds
Upregulated <- 1 # Update this threshold based on your criteria
Downregulated <- -1 # Update this threshold based on your criteria
# Make subsets of your files, upregulated
LI1_CI1_upregulated <- subset(L1I_C1I, (log2FoldChange > Upregulated & svalue < 0.005))
LI7_CI7_upregulated <- subset(L7I_C7I, (log2FoldChange > Upregulated & svalue < 0.005))
LI13_CI13_upregulated <- subset(L13I_C13I, (log2FoldChange > Upregulated & svalue < 0.005))
LI19_CI19_upregulated <- subset(L19I_C19I, (log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated #
LI1_CI1_downregulated <- subset(L1I_C1I, (log2FoldChange < Downregulated & svalue < 0.005))
LI7_CI7_downregulated <- subset(L7I_C7I, (log2FoldChange < Downregulated & svalue < 0.005))
LI13_CI13_downregulated <- subset(L13I_C13I, (log2FoldChange < Downregulated & svalue < 0.005))
LI19_CI19_downregulated <- subset(L19I_C19I, (log2FoldChange < Downregulated & svalue < 0.005))
The gene subsets LI1_CI1_upregulated, LI7_CI7_upregulated, LI13_CI13_upregulated, and LI19_CI19_upregulated, as well as LI1_CI1_downregulated, LI7_CI7_downregulated, LI13_CI13_downregulated, and LI19_CI19_downregulated are both time-specific and treatment-specific. Time-Specific: Each subset is specific to a particular time point post-inoculation (1, 7, 13, or 19 DPI), reflecting the dynamic changes in gene expression that occur during the course of infection. Treatment-Specific: The subsets are derived from the comparison between Lagrue inoculated (LI) and Cypress inoculated (CI) plants, indicating that the observed differences in gene expression are a response to the specific treatment.
# Make subsets of your files, upregulated #
LI1_LNI1_upregulated <- subset(L1I_L1NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI7_LNI7_upregulated <- subset(L7I_L7NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI13_LNI13_upregulated <- subset(L13I_L13NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI19_LNI19_upregulated <- subset(L19I_L19NI, (log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated #
LI1_LNI1_downregulated <- subset(L1I_L1NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI7_LNI7_downregulated <- subset(L7I_L7NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI13_LNI13_downregulated <- subset(L13I_L13NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI19_LNI19_downregulated <- subset(L19I_L19NI, (log2FoldChange < Downregulated & svalue < 0.005))
Time- and Genotype-Specific: These genes show differential expression in Lagrue inoculated plants compared to non-inoculated plants at 1 DPI. This suggests a genotype-specific response to inoculation at this early stage. Upregulated genes may reveal Lagrue-specific defense factors or pathways that become activated upon infection, while downregulated genes may highlight mechanisms normally active in the plant but suppressed during infection. Similar to above, the other subsets showcase the evolution of genotype-specific responses over time. The patterns observed here could pinpoint key time points for genotype-specific interventions or identify potential biomarkers for Lagrue resistance.
# Make subsets of your files, upregulated #
CI1_CNI1_upregulated <- subset(C1I_C1NI, (log2FoldChange > Upregulated & svalue < 0.005))
CI7_CNI7_upregulated <- subset(C7I_C7NI, (log2FoldChange > Upregulated & svalue < 0.005))
CI13_CNI13_upregulated <- subset(C13I_C13NI, (log2FoldChange > Upregulated & svalue < 0.005))
CI19_CNI19_upregulated <- subset(C19I_C19NI, (log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated #
CI1_CNI1_downregulated <- subset(C1I_C1NI, (log2FoldChange < Downregulated & svalue < 0.005))
CI7_CNI7_downregulated <- subset(C7I_C7NI, (log2FoldChange < Downregulated & svalue < 0.005))
CI13_CNI13_downregulated <- subset(C13I_C13NI, (log2FoldChange < Downregulated & svalue < 0.005))
CI19_CNI19_downregulated <- subset(C19I_C19NI, (log2FoldChange < Downregulated & svalue < 0.005))
Time- and Genotype-Specific: This subset reveals genes with altered expression due to Cypress inoculation at 1 DPI, reflecting a genotype-specific response. Upregulated genes may represent susceptibility mechanisms specific to the Cypress strain or pathways affected by the early stages of infection. These other subsets capture the temporal evolution of genotype-specific responses to Cypress inoculation, offering insights into the stages of infection and the plant’s defense strategies against this particular pathogen.
# Make subsets of your files, upregulated: Time-specific_1 DPI #
CI1_CNI1_upregulated <- subset(C1I_C1NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI1_LNI1_upregulated <- subset(L1I_L1NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI1_CI1_upregulated <- subset(L1I_C1I, (log2FoldChange > Upregulated & svalue < 0.005))
LNI1_CNI1_upregulated <- subset(L1NI_C1NI, (log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated: Time-specific_1 DPI #
CI1_CNI1_downregulated <- subset(C1I_C1NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI1_LNI1_downregulated <- subset(L1I_L1NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI1_CI1_downregulated <- subset(L1I_C1I, (log2FoldChange < Downregulated & svalue < 0.005))
LNI1_CNI1_downregulated <- subset(L1NI_C1NI, (log2FoldChange < Downregulated & svalue < 0.005))
# Make subsets of your files, upregulated: Time-specific_7 DPI #
CI7_CNI7_upregulated <- subset(C7I_C7NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI7_LNI7_upregulated <- subset(L7I_L7NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI7_CI7_upregulated <- subset(L7I_C7I, (log2FoldChange > Upregulated & svalue < 0.005))
LNI7_CNI7_upregulated <- subset(L7NI_C7NI, (log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated: Time-specific_7 DPI #
CI7_CNI7_downregulated <- subset(C7I_C7NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI7_LNI7_downregulated <- subset(L7I_L7NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI7_CI7_downregulated <- subset(L7I_C7I, (log2FoldChange < Downregulated & svalue < 0.005))
LNI7_CNI7_downregulated <- subset(L7NI_C7NI, (log2FoldChange < Downregulated & svalue < 0.005))
# Make subsets of your files, upregulated: Time-specific_13 DPI #
CI13_CNI13_upregulated <- subset(C13I_C13NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI13_LNI13_upregulated <- subset(L13I_L13NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI13_CI13_upregulated <- subset(L13I_C13I, (log2FoldChange > Upregulated & svalue < 0.005))
LNI13_CNI13_upregulated <- subset(L13NI_C13NI, (log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated: Time-specific_13 DPI #
CI13_CNI13_downregulated <- subset(C13I_C13NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI13_LNI13_downregulated <- subset(L13I_L13NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI13_CI13_downregulated <- subset(L13I_C13I, (log2FoldChange < Downregulated & svalue < 0.005))
LNI13_CNI13_downregulated <- subset(L13NI_C13NI, (log2FoldChange < Downregulated & svalue < 0.005))
# Make subsets of your files, upregulated: Time-specific_19 DPI #
CI19_CNI19_upregulated <- subset(C19I_C19NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI19_LNI19_upregulated <- subset(L19I_L19NI, (log2FoldChange > Upregulated & svalue < 0.005))
LI19_CI19_upregulated <- subset(L19I_C19I, (log2FoldChange > Upregulated & svalue < 0.005))
LNI19_CNI19_upregulated <- subset(L19NI_C19NI, (log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated: Time-specific_19 DPI #
CI19_CNI19_downregulated <- subset(C19I_C19NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI19_LNI19_downregulated <- subset(L19I_L19NI, (log2FoldChange < Downregulated & svalue < 0.005))
LI19_CI19_downregulated <- subset(L19I_C19I, (log2FoldChange < Downregulated & svalue < 0.005))
LNI19_CNI19_downregulated <- subset(L19NI_C19NI, (log2FoldChange < Downregulated & svalue < 0.005))
Time-Specific: These subsets provide snapshots of gene expression changes at specific time points, highlighting the temporal dynamics of plant responses. The identification of early vs. late responders can help elucidate the progression of infection and defense mechanisms.
# Make subsets of your files, upregulated #
CI7_CI1_upregulated <- subset(CI7_CI1,
(log2FoldChange > Upregulated & svalue < 0.005))
CI13_CI1_upregulated <- subset (CI13_CI1,
(log2FoldChange > Upregulated & svalue < 0.005))
CI19_CI1_upregulated <- subset (CI19_CI1,
(log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated #
CI7_CI1_downregulated <- subset(CI7_CI1,
(log2FoldChange < Downregulated & svalue < 0.005))
CI13_CI1_downregulated <- subset (CI13_CI1,
(log2FoldChange < Downregulated & svalue < 0.005))
CI19_CI1_downregulated <- subset (CI19_CI1,
(log2FoldChange < Downregulated & svalue < 0.005))
Time-Specific: These subsets track the changes in gene expression in Cypress inoculated plants as the infection progresses (7, 13, and 19 DPI) compared to the baseline of 1 DPI. Upregulated genes at later time points might indicate sustained defense responses or adaptations to the infection, while downregulated genes could reveal pathways that are suppressed as the disease progresses.
# Make subsets of your files, upregulated #
LI7_LI1_upregulated <- subset(CI7_CI1,
(log2FoldChange > Upregulated & svalue < 0.005))
LI13_LI1_upregulated <- subset (CI13_CI1,
(log2FoldChange > Upregulated & svalue < 0.005))
LI19_LI1_upregulated <- subset (CI19_CI1,
(log2FoldChange > Upregulated & svalue < 0.005))
# Make subsets of your files, downregulated #
LI7_LI1_downregulated <- subset(CI7_CI1,
(log2FoldChange < Downregulated & svalue < 0.005))
LI13_LI1_downregulated <- subset (CI13_CI1,
(log2FoldChange < Downregulated & svalue < 0.005))
LI19_LI1_downregulated <- subset (CI19_CI1,
(log2FoldChange < Downregulated & svalue < 0.005))
Time-Specific: Similarly, these subsets monitor the temporal changes in gene expression in Lagrue inoculated plants compared to their 1 DPI state. The patterns observed here might reveal differences in the temporal dynamics of plant response to Lagrue compared to Cypress. For instance, if certain defense genes are upregulated earlier in Lagrue inoculated plants than in Cypress inoculated plants, it might suggest a faster or more robust response to Lagrue.
# Check the subsets
sapply(list(LI1_CI1_upregulated, LI7_CI7_upregulated, LI13_CI13_upregulated, LI19_CI19_upregulated), nrow)
## [1] 119 139 162 146
sapply(list(LI1_CI1_downregulated, LI7_CI7_downregulated, LI13_CI13_downregulated, LI19_CI19_downregulated), nrow)
## [1] 2 123 190 366
This section is where the core visualization happens. You are generating multiple 4-way Venn diagrams to visualize the overlap between differentially expressed genes across different comparisons and time points. These diagrams compare up/down-regulated genes between Lagrue and Cypress inoculated samples across multiple time points (1, 7, 13, and 19 DPI). The discussion could focus on: The overall degree of overlap between time points. Whether specific time points have a larger proportion of unique genes. If there’s a trend in the overlap as the time points progress. These diagrams focus on a single time point (e.g., 1 DPI) but compare all four sample types. The discussion could focus on: Which sample types share the most up/down-regulated genes at that time point. If there are significant differences in the number of differentially expressed genes between sample types. These diagrams compare Cypress or Lagrue inoculated samples across time points, highlighting the evolution of gene expression changes within a single sample type over time. The discussion could focus on: How the number of differentially expressed genes changes over time. Whether certain genes are consistently up/down-regulated across time points.
Shared Gene Sets: The overlapping regions of the Venn diagrams represent genes that are differentially expressed in multiple conditions. These shared genes may highlight core responses to biotic stress or fundamental mechanisms involved in plant-pathogen interactions. Unique Gene Sets: The non-overlapping regions represent genes that are uniquely differentially expressed in a single condition. These unique genes may reveal condition-specific adaptations or responses that are not shared across all treatments or time points. They are of particular interest for understanding the nuances of the plant’s response to different pathogens or at different stages of infection. Temporal Dynamics: By comparing Venn diagrams across time points, we can track the evolution of gene expression patterns. This may uncover a shift in the plant’s response as the infection progresses, with certain pathways being activated or suppressed at different stages. Genotype and Treatment Effects: By comparing Venn diagrams between different genotypes or treatments, we can identify genes that are specifically associated with a particular genotype (e.g., Lagrue vs. Cypress) or treatment (e.g., inoculated vs. non-inoculated). These genes may be potential targets for breeding programs or disease management strategies.
# Generate Venn diagram for upregulated genes: LI_CI #
vennplot_UP <- venn.diagram(
x = list(
LI1_CI1_upregulated$FeatureID,
LI7_CI7_upregulated$FeatureID,
LI13_CI13_upregulated$FeatureID,
LI19_CI19_upregulated$FeatureID
),
category.names = c("LICI_1DPI_UP", "LICI_7DPI_UP", "LICI_13DPI_UP", "LICI_19DPI_UP"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP)
# Generate Venn diagram for downregulated genes: LI_CI #
vennplot_DOWN <- venn.diagram(
x = list(
LI1_CI1_downregulated$FeatureID,
LI7_CI7_downregulated$FeatureID,
LI13_CI13_downregulated$FeatureID,
LI19_CI19_downregulated$FeatureID
),
category.names = c("LICI_1DPI_DOWN", "LICI_7DPI_DOWN", "LICI_13DPI_DOWN", "LICI_19DPI_DOWN"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN)
Temporal Dynamics of Differential Gene Expression (Time- and Treatment-Specific): The progression from 1 DPI to 19 DPI reveals a dynamic landscape of gene regulation in response to Lagrue versus Cypress inoculation. The increasing or decreasing overlap between time points suggests a complex interplay of shared and unique responses. Early unique genes might be involved in pathogen recognition or strain-specific responses, while late unique genes may reflect adaptations to prolonged infection or recovery processes. The identification of conserved DEGs across time points could uncover core genes crucial for the overall defense response. Biological Implications: Understanding the temporal dynamics of gene expression can provide valuable insights into the plant’s defense strategies, potential vulnerabilities at specific time points, and targets for intervention. For example, genes consistently upregulated throughout the time course in Lagrue inoculated plants might represent potential targets for enhancing resistance against this particular strain.
# Generate Venn diagram for upregulated genes: LI_LNI #
vennplot_UP_LILNI <- venn.diagram(
x = list(
LI1_LNI1_upregulated$FeatureID,
LI7_LNI7_upregulated$FeatureID,
LI13_LNI13_upregulated$FeatureID,
LI19_LNI19_upregulated$FeatureID
),
category.names = c("LILNI_1DPI_UP", "LILNI_7DPI_UP", "LILNI_13DPI_UP", "LILNI_19DPI_UP"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP_LILNI)
# Generate Venn diagram for downregulated genes: LI_LNI #
vennplot_DOWN_LILNI <- venn.diagram(
x = list(
LI1_LNI1_downregulated$FeatureID,
LI7_LNI7_downregulated$FeatureID,
LI13_LNI13_downregulated$FeatureID,
LI19_LNI19_downregulated$FeatureID
),
category.names = c("LILNI_1DPI_DOWN", "LILNI_7DPI_DOWN", "LILNI_13DPI_DOWN", "LILNI_19DPI_DOWN"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN_LILNI)
# Generate Venn diagram for upregulated genes: CI_CNI #
vennplot_UP_CICNI <- venn.diagram(
x = list(
CI1_CNI1_upregulated$FeatureID,
CI7_CNI7_upregulated$FeatureID,
CI13_CNI13_upregulated$FeatureID,
CI19_CNI19_upregulated$FeatureID
),
category.names = c("CICNI_1DPI_UP", "CICNI_7DPI_UP", "CICNI_13DPI_UP", "CICNI_19DPI_UP"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP_CICNI)
# Generate Venn diagram for downregulated genes: CI_CNI #
vennplot_DOWN_CICNI <- venn.diagram(
x = list(
CI1_CNI1_downregulated$FeatureID,
CI7_CNI7_downregulated$FeatureID,
CI13_CNI13_downregulated$FeatureID,
CI19_CNI19_downregulated$FeatureID
),
category.names = c("CICNI_1DPI_DOWN", "CICNI_7DPI_DOWN", "CICNI_13DPI_DOWN", "CICNI_19DPI_DOWN"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN_CICNI)
Genotype-Specific Responses to Inoculation (Time- and Genotype-Specific): The comparison between inoculated and non-inoculated plants of the same genotype unveils genes involved in the specific response to pathogen presence. The overlap between time points reflects consistent genotype-specific responses, while the unique genes at different time points might indicate temporal shifts in the plant’s response mechanisms. Biological Implications: Unraveling genotype-specific responses is crucial for understanding the genetic basis of disease resistance or susceptibility. Genes that are uniquely upregulated in inoculated plants may represent potential targets for developing resistant cultivars or designing targeted treatments.
# Generate Venn diagram for upregulated genes: Time-specific_1 DPI #
vennplot_UP_1DPI <- venn.diagram(
x = list(
CI1_CNI1_upregulated$FeatureID,
LI1_LNI1_upregulated$FeatureID,
LI1_CI1_upregulated$FeatureID,
LNI1_CNI1_upregulated$FeatureID
),
category.names = c("CICNI_1DPI_UP", "LILNI_1DPI_UP", "LICI_1DPI_UP", "LNICNI_1DPI_UP"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP_1DPI)
# Generate Venn diagram for downregulated genes: Time-specific_1 DPI #
vennplot_DOWN_1DPI <- venn.diagram(
x = list(
CI1_CNI1_downregulated$FeatureID,
LI1_LNI1_downregulated$FeatureID,
LI1_CI1_downregulated$FeatureID,
LNI1_CNI1_downregulated$FeatureID
),
category.names = c("CICNI_1DPI_DOWN", "LILNI_1DPI_DOWN", "LICI_1DPI_DOWN", "LNICNI_1DPI_DOWN"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN_1DPI)
# Generate Venn diagram for upregulated genes: Time-specific_7 DPI #
vennplot_UP_7DPI <- venn.diagram(
x = list(
CI7_CNI7_upregulated$FeatureID,
LI7_LNI7_upregulated$FeatureID,
LI7_CI7_upregulated$FeatureID,
LNI7_CNI7_upregulated$FeatureID
),
category.names = c("CICNI_7DPI_UP", "LILNI_7DPI_UP", "LICI_7DPI_UP", "LNICNI_7DPI_UP"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP_7DPI)
# Generate Venn diagram for downregulated genes: Time-specific_7 DPI #
vennplot_DOWN_7DPI <- venn.diagram(
x = list(
CI7_CNI7_downregulated$FeatureID,
LI7_LNI7_downregulated$FeatureID,
LI7_CI7_downregulated$FeatureID,
LNI7_CNI7_downregulated$FeatureID
),
category.names = c("CICNI_7DPI_DOWN", "LILNI_7DPI_DOWN", "LICI_7DPI_DOWN", "LNICNI_7DPI_DOWN"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN_7DPI)
# Generate Venn diagram for upregulated genes: Time-specific_13 DPI #
vennplot_UP_13DPI <- venn.diagram(
x = list(
CI13_CNI13_upregulated$FeatureID,
LI13_LNI13_upregulated$FeatureID,
LI13_CI13_upregulated$FeatureID,
LNI13_CNI13_upregulated$FeatureID
),
category.names = c("CICNI_13DPI_UP", "LILNI_13DPI_UP", "LICI_13DPI_UP", "LNICNI_13DPI_UP"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP_13DPI)
# Generate Venn diagram for downregulated genes: Time-specific_13 DPI #
vennplot_DOWN_13DPI <- venn.diagram(
x = list(
CI13_CNI13_downregulated$FeatureID,
LI13_LNI13_downregulated$FeatureID,
LI13_CI13_downregulated$FeatureID,
LNI13_CNI13_downregulated$FeatureID
),
category.names = c("CICNI_13DPI_DOWN", "LILNI_13DPI_DOWN", "LICI_13DPI_DOWN", "LNICNI_13DPI_DOWN"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN_13DPI)
# Generate Venn diagram for upregulated genes: Time-specific_19 DPI #
vennplot_UP_19DPI <- venn.diagram(
x = list(
CI19_CNI19_upregulated$FeatureID,
LI19_LNI19_upregulated$FeatureID,
LI19_CI19_upregulated$FeatureID,
LNI19_CNI19_upregulated$FeatureID
),
category.names = c("CICNI_19DPI_UP", "LILNI_19DPI_UP", "LICI_19DPI_UP", "LNICNI_19DPI_UP"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP_19DPI)
# Generate Venn diagram for downregulated genes: Time-specific_19 DPI #
vennplot_DOWN_19DPI <- venn.diagram(
x = list(
CI19_CNI19_downregulated$FeatureID,
LI19_LNI19_downregulated$FeatureID,
LI19_CI19_downregulated$FeatureID,
LNI19_CNI19_downregulated$FeatureID
),
category.names = c("CICNI_19DPI_DOWN", "LILNI_19DPI_DOWN", "LICI_19DPI_DOWN", "LNICNI_19DPI_DOWN"),
fill = c("red", "green", "blue", "yellow"),
alpha = c(0.8, 0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN_19DPI)
Comparative Analysis of Gene Expression at Specific Time Points (Time-Specific): These diagrams provide a snapshot of the global gene expression landscape at specific stages of infection. By comparing the Venn diagrams across time points and different sample types, we can discern the following: Common Stress Responses: Genes shared across all sample types at a particular time point might represent universal responses to biotic stress, regardless of the specific pathogen. Pathogen-Specific Responses: Genes unique to inoculated samples may reveal defense mechanisms tailored to specific pathogens. Genotype-Specific Responses: Genes uniquely differentially expressed in a particular genotype (Lagrue or Cypress) could reflect genetic predispositions to resistance or susceptibility. Temporal Shifts: Changes in the size and composition of overlapping regions between time points may indicate a shift in the plant’s priorities, from early recognition and defense to later adaptation and recovery mechanisms. Biological Implications: Identifying key genes involved in specific time-dependent processes can aid in understanding the chronological order of events in the plant-pathogen interaction. This knowledge can guide the timing of interventions or treatments to maximize their effectiveness.
# Generate Venn diagram for upregulated genes: Cypress Inoculated Across Time #
vennplot_UP_CI <- venn.diagram(
x = list(
CI7_CI1_upregulated$FeatureID,
CI13_CI1_upregulated$FeatureID,
CI19_CI1_upregulated$FeatureID
),
category.names = c("C7I_C1I_UP", "C13I_C1I_UP", "C19I_C1I_UP"),
fill = c("red", "green", "blue"),
alpha = c(0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP_CI)
# Generate Venn diagram for downregulated genes: Cypress Inoculated Across Time #
vennplot_DOWN_CI <- venn.diagram(
x = list(
CI7_CI1_downregulated$FeatureID,
CI13_CI1_downregulated$FeatureID,
CI19_CI1_downregulated$FeatureID
),
category.names = c("C7I_C1I_DOWN", "C13I_C1I_DOWN", "C19I_C1I_DOWN"),
fill = c("red", "green", "blue"),
alpha = c(0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN_CI)
# Generate Venn diagram for upregulated genes: Lagrue Inoculated Across Time #
vennplot_UP_LI <- venn.diagram(
x = list(
LI7_LI1_upregulated$FeatureID,
LI13_LI1_upregulated$FeatureID,
LI19_LI1_upregulated$FeatureID
),
category.names = c("L7I_L1I_UP", "L13I_L1I_UP", "L19I_L1I_UP"),
fill = c("red", "green", "blue"),
alpha = c(0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_UP_LI)
# Generate Venn diagram for downregulated genes: Cypress Inoculated Across Time #
vennplot_DOWN_LI <- venn.diagram(
x = list(
LI7_LI1_downregulated$FeatureID,
LI13_LI1_downregulated$FeatureID,
LI19_LI1_downregulated$FeatureID
),
category.names = c("L7I_L1I_DOWN", "L13I_L1I_DOWN", "L19I_L1I_DOWN"),
fill = c("red", "green", "blue"),
alpha = c(0.8, 0.8, 0.8),
cex = 1.5,
cat.fontface = 2,
filename = NULL
)
# Set the plot resolution to 1000 DPI
options(repr.plot.width = 6, repr.plot.height = 6, units = "in", res = 1000)
# Draw the Venn diagram
grid.newpage()
grid.draw(vennplot_DOWN_LI)
Tracking the Evolution of Gene Expression (Time-Specific): These diagrams focus on how gene expression changes over time within inoculated plants, using the 1 DPI time point as a baseline. This comparison allows us to distinguish between early and late responders and assess the duration of specific responses. Biological Implications: This information can help identify critical time windows for intervention. For example, genes that are upregulated early in the infection but return to baseline levels later might be essential for the initial defense response, and targeting these genes could be crucial for disease prevention. Conversely, genes that are consistently upregulated or show delayed upregulation might be involved in long-term adaptation to infection and could be targets for promoting disease tolerance.
# Four-way upregulated for LAGRUE X CYPRESS INCOCULATED #
Venn_UP_LC <- plotVenn(list("L1I_C1I_UP"=LI1_CI1_upregulated$FeatureID, "L7I_C7I_UP"=LI7_CI7_upregulated$FeatureID, "L13I_C13I_UP"=LI13_CI13_upregulated$FeatureID, "L9I_C19I_UP"=LI19_CI19_upregulated$FeatureID), outFile = "DataSourceVenn_LIxCI_UP.svg") # produces associated diagram
# generate lists of each intersect
intersects <- listVennRegions(Venn_UP_LC)
# pull lists together
intersects <- plyr::ldply(intersects, cbind)
# insert own appropriate col name for V1
colnames(intersects)<-c('Intersect','V1')
# transpose data into columns for each intersect
intersects <- dcast(setDT(intersects), rowid(Intersect) ~ Intersect, value.var =
"V1")[,Intersect:=NULL]
# Save the table
write.table(intersects,
file = "Lagrue_Cypress_I_up_only.txt", sep="\t")
# Check the data
head(intersects)
## 0, 0, 0, 1 (L9I_C19I_UP) 0, 0, 1, 0 (L13I_C13I_UP)
## <char> <char>
## 1: LOC_Os01g02000 LOC_Os01g02440
## 2: LOC_Os01g02890 LOC_Os01g02470
## 3: LOC_Os01g65880 LOC_Os01g02600
## 4: LOC_Os01g70550 LOC_Os01g26210
## 5: LOC_Os02g32770 LOC_Os01g37690
## 6: LOC_Os02g35820 LOC_Os01g57082
## 0, 0, 1, 1 (L13I_C13I_UP, L9I_C19I_UP) 0, 1, 0, 0 (L7I_C7I_UP)
## <char> <char>
## 1: LOC_Os01g02730 LOC_Os01g66650
## 2: LOC_Os01g02840 LOC_Os02g05780
## 3: LOC_Os01g65800 LOC_Os02g06290
## 4: LOC_Os02g35460 LOC_Os02g39030
## 5: LOC_Os03g13640 LOC_Os02g55670
## 6: LOC_Os06g04920 LOC_Os03g07480
## 0, 1, 0, 1 (L7I_C7I_UP, L9I_C19I_UP) 0, 1, 1, 0 (L7I_C7I_UP, L13I_C13I_UP)
## <char> <char>
## 1: LOC_Os02g02860 LOC_Os01g07630
## 2: <NA> LOC_Os02g02970
## 3: <NA> LOC_Os04g20930
## 4: <NA> LOC_Os07g45439
## 5: <NA> LOC_Os07g46400
## 6: <NA> LOC_Os09g39130
## 0, 1, 1, 1 (L7I_C7I_UP, L13I_C13I_UP, L9I_C19I_UP) 1, 0, 0, 0 (L1I_C1I_UP)
## <char> <char>
## 1: LOC_Os01g02320 LOC_Os01g02400
## 2: LOC_Os01g02570 LOC_Os01g58100
## 3: LOC_Os01g02750 LOC_Os02g06840
## 4: LOC_Os01g05730 LOC_Os02g37590
## 5: LOC_Os01g51290 LOC_Os02g38494
## 6: LOC_Os02g06205 LOC_Os03g48430
## 1, 0, 0, 1 (L1I_C1I_UP, L9I_C19I_UP) 1, 0, 1, 0 (L1I_C1I_UP, L13I_C13I_UP)
## <char> <char>
## 1: LOC_Os08g45130 LOC_Os02g05950
## 2: <NA> LOC_Os03g55200
## 3: <NA> LOC_Os08g19590
## 4: <NA> LOC_Os11g47310
## 5: <NA> <NA>
## 6: <NA> <NA>
## 1, 0, 1, 1 (L1I_C1I_UP, L13I_C13I_UP, L9I_C19I_UP)
## <char>
## 1: LOC_Os01g03570
## 2: LOC_Os06g15730
## 3: LOC_Os07g31070
## 4: LOC_Os07g46090
## 5: LOC_Os11g38320
## 6: <NA>
## 1, 1, 0, 0 (L1I_C1I_UP, L7I_C7I_UP)
## <char>
## 1: LOC_Os02g06010
## 2: LOC_Os02g40350
## 3: LOC_Os04g18360
## 4: LOC_Os08g37180
## 5: <NA>
## 6: <NA>
## 1, 1, 0, 1 (L1I_C1I_UP, L7I_C7I_UP, L9I_C19I_UP)
## <char>
## 1: LOC_Os07g23390
## 2: <NA>
## 3: <NA>
## 4: <NA>
## 5: <NA>
## 6: <NA>
## 1, 1, 1, 0 (L1I_C1I_UP, L7I_C7I_UP, L13I_C13I_UP)
## <char>
## 1: LOC_Os01g19320
## 2: LOC_Os02g38740
## 3: LOC_Os03g32499
## 4: LOC_Os05g03370
## 5: LOC_Os08g37380
## 6: <NA>
## 1, 1, 1, 1 (L1I_C1I_UP, L7I_C7I_UP, L13I_C13I_UP, L9I_C19I_UP)
## <char>
## 1: LOC_Os01g02390
## 2: LOC_Os01g02420
## 3: LOC_Os01g02490
## 4: LOC_Os01g02580
## 5: LOC_Os01g02610
## 6: LOC_Os01g13660
# Four-way downregulated for LAGRUE X CYPRESS INCOCULATED #
Venn_DOWN_LC <- plotVenn(list("L1I_C1I_UP"=LI1_CI1_downregulated$FeatureID, "L7I_C7I_UP"=LI7_CI7_downregulated$FeatureID, "L13I_C13I_UP"=LI13_CI13_downregulated$FeatureID, "L9I_C19I_UP"=LI19_CI19_downregulated$FeatureID), outFile = "DataSourceVenn_LIxCI_DOWN.svg") # produces associated diagram
# generate lists of each intersect
intersects <- listVennRegions(Venn_DOWN_LC)
# pull lists together
intersects <- plyr::ldply(intersects, cbind)
# insert own appropriate col name for V1
colnames(intersects)<-c('Intersect','V1')
# transpose data into columns for each intersect
intersects <- dcast(setDT(intersects), rowid(Intersect) ~ Intersect, value.var =
"V1")[,Intersect:=NULL]
# Save the table
write.table(intersects,
file = "Lagrue_Cypress_I_down_only.txt", sep="\t")
# Check the data
head(intersects)
## 0, 0, 0, 1 (L9I_C19I_UP) 0, 0, 1, 0 (L13I_C13I_UP)
## <char> <char>
## 1: LOC_Os01g03330 LOC_Os01g14630
## 2: LOC_Os01g03340 LOC_Os01g19970
## 3: LOC_Os01g03390 LOC_Os01g27890
## 4: LOC_Os01g04580 LOC_Os01g28500
## 5: LOC_Os01g04620 LOC_Os01g32120
## 6: LOC_Os01g06740 LOC_Os01g63480
## 0, 0, 1, 1 (L13I_C13I_UP, L9I_C19I_UP) 0, 1, 0, 0 (L7I_C7I_UP)
## <char> <char>
## 1: LOC_Os01g06660 LOC_Os01g32670
## 2: LOC_Os01g58100 LOC_Os01g52710
## 3: LOC_Os02g04915 LOC_Os02g06200
## 4: LOC_Os02g06160 LOC_Os02g33070
## 5: LOC_Os02g32970 LOC_Os04g50700
## 6: LOC_Os02g36020 LOC_Os07g17270
## 0, 1, 0, 1 (L7I_C7I_UP, L9I_C19I_UP) 0, 1, 1, 0 (L7I_C7I_UP, L13I_C13I_UP)
## <char> <char>
## 1: LOC_Os02g32230 LOC_Os01g70100
## 2: LOC_Os02g50060 LOC_Os02g20200
## 3: LOC_Os04g06734 LOC_Os02g35440
## 4: LOC_Os05g06790 LOC_Os03g40800
## 5: LOC_Os05g06814 LOC_Os03g47670
## 6: LOC_Os07g44830 LOC_Os04g38290
## 0, 1, 1, 1 (L7I_C7I_UP, L13I_C13I_UP, L9I_C19I_UP) 1, 0, 0, 0 (L1I_C1I_UP)
## <char> <char>
## 1: LOC_Os01g02370 LOC_Os07g11790
## 2: LOC_Os01g02780 <NA>
## 3: LOC_Os01g02790 <NA>
## 4: LOC_Os01g02830 <NA>
## 5: LOC_Os01g03360 <NA>
## 6: LOC_Os01g18910 <NA>
## 1, 1, 1, 1 (L1I_C1I_UP, L7I_C7I_UP, L13I_C13I_UP, L9I_C19I_UP)
## <char>
## 1: LOC_Os02g32250
## 2: <NA>
## 3: <NA>
## 4: <NA>
## 5: <NA>
## 6: <NA>
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.