This document has last been compiled on 2021-12-10 18:58:19.

## Reading in metadata from file: results/Year123/data/leaf_meta.txt
## Reading in data from file: results/Year123/data/leaf_normCounts.txt
## Reading in metadata from file: results/Year123/data/root_meta.txt
## Reading in data from file: results/Year123/data/root_normCounts.txt
## Total number of leaf samples: 750 
## Total number of genes in leaf samples: 23113 
## No additional bad samples to remove (probably removed during normalization)
## Removing the 72  samples identified as not part of the main experiment, from the leaf samples
## After filtering leaf samples: 678 samples, 23113 genes
## Total number of root samples: 758 
## Total number of genes in root samples: 24939 
## No additional bad samples to remove (probably removed during normalization)
## Removing the 72  samples identified as not part of the main experiment, from the root samples
## After filtering root samples: 686 samples, 24939 genes

We perform a simple DE analysis separately on each time point, i.e. drought versus control on each time point.

A hypothesis we are making is that plant react extremely fast to drought, both in pre- and post-flowering, so this allows us to look at a single week (e.g. week 3) and determine genes that are different only in that week.

Calculating DE

We use moanin (in our function DE_timepoints) to calculate the DE for each time point between drought and control. The results are saved in results/Year123/DE_timepoint

For each timepoint, there are results for RT430, BT642, and the genotype difference between them. For each of these results, there are four columns in the output: p-value (_pval), adjusted p-value (_qval), a test statistic value (_stat), and an estimate of the log-fold change (_lfc). Below are printouts of a small subset to demonstrate the column naming conventions:

## First 5 rows and 6 columns of output (for leaf)
##                       Group_BT642_Preflowering.14-Group_BT642_Control.14_pval
## Sobic.001G000200.v3.1                                              0.30616305
## Sobic.001G000400.v3.1                                              0.02264834
## Sobic.001G000501.v3.1                                              0.74560549
## Sobic.001G000700.v3.1                                              0.39216945
## Sobic.001G000800.v3.1                                              0.03378754
##                       Group_BT642_Preflowering.14-Group_BT642_Control.14_qval
## Sobic.001G000200.v3.1                                               0.8765976
## Sobic.001G000400.v3.1                                               0.2470620
## Sobic.001G000501.v3.1                                               1.0000000
## Sobic.001G000700.v3.1                                               0.9319634
## Sobic.001G000800.v3.1                                               0.3154974
##                       Group_BT642_Preflowering.14-Group_BT642_Control.14_stat
## Sobic.001G000200.v3.1                                              -1.0242298
## Sobic.001G000400.v3.1                                              -2.2855512
## Sobic.001G000501.v3.1                                              -0.3245973
## Sobic.001G000700.v3.1                                               0.8563430
## Sobic.001G000800.v3.1                                              -2.1277574
##                       Group_BT642_Preflowering.14-Group_BT642_Control.14_lfc
## Sobic.001G000200.v3.1                                            -0.13331908
## Sobic.001G000400.v3.1                                            -0.32049261
## Sobic.001G000501.v3.1                                            -0.06935862
## Sobic.001G000700.v3.1                                             0.15484516
## Sobic.001G000800.v3.1                                            -0.41734988
##                       Group_BT642_Preflowering.21-Group_BT642_Control.21_pval
## Sobic.001G000200.v3.1                                               0.9966408
## Sobic.001G000400.v3.1                                               0.8395441
## Sobic.001G000501.v3.1                                               0.8773106
## Sobic.001G000700.v3.1                                               0.2116989
## Sobic.001G000800.v3.1                                               0.1789071
##                       Group_BT642_Preflowering.21-Group_BT642_Control.21_qval
## Sobic.001G000200.v3.1                                               1.0000000
## Sobic.001G000400.v3.1                                               1.0000000
## Sobic.001G000501.v3.1                                               1.0000000
## Sobic.001G000700.v3.1                                               0.7782598
## Sobic.001G000800.v3.1                                               0.7312212
## First 5 rows and 6 columns of output (for root)
##                       Group_BT642_Preflowering.14-Group_BT642_Control.14_pval
## Sobic.001G000200.v3.1                                               0.1868335
## Sobic.001G000400.v3.1                                               0.1792428
## Sobic.001G000501.v3.1                                               0.5044362
## Sobic.001G000700.v3.1                                               0.5792446
## Sobic.001G000800.v3.1                                               0.8846289
##                       Group_BT642_Preflowering.14-Group_BT642_Control.14_qval
## Sobic.001G000200.v3.1                                               0.5225088
## Sobic.001G000400.v3.1                                               0.5108700
## Sobic.001G000501.v3.1                                               0.8303116
## Sobic.001G000700.v3.1                                               0.8719527
## Sobic.001G000800.v3.1                                               0.9815672
##                       Group_BT642_Preflowering.14-Group_BT642_Control.14_stat
## Sobic.001G000200.v3.1                                              -1.3215827
## Sobic.001G000400.v3.1                                              -1.3447318
## Sobic.001G000501.v3.1                                              -0.6679464
## Sobic.001G000700.v3.1                                              -0.5548042
## Sobic.001G000800.v3.1                                               0.1451684
##                       Group_BT642_Preflowering.14-Group_BT642_Control.14_lfc
## Sobic.001G000200.v3.1                                            -0.14451239
## Sobic.001G000400.v3.1                                            -0.52335949
## Sobic.001G000501.v3.1                                            -0.17285934
## Sobic.001G000700.v3.1                                            -0.06125641
## Sobic.001G000800.v3.1                                             0.01745589
##                       Group_BT642_Preflowering.21-Group_BT642_Control.21_pval
## Sobic.001G000200.v3.1                                             0.960151056
## Sobic.001G000400.v3.1                                             0.001382472
## Sobic.001G000501.v3.1                                             0.913833141
## Sobic.001G000700.v3.1                                             0.104681018
## Sobic.001G000800.v3.1                                             0.166305443
##                       Group_BT642_Preflowering.21-Group_BT642_Control.21_qval
## Sobic.001G000200.v3.1                                              0.99815303
## Sobic.001G000400.v3.1                                              0.01555214
## Sobic.001G000501.v3.1                                              0.98831655
## Sobic.001G000700.v3.1                                              0.37377866
## Sobic.001G000800.v3.1                                              0.49004415
##                       Group_BT642_Preflowering.21-Group_BT642_Control.21_stat
## Sobic.001G000200.v3.1                                              0.04998584
## Sobic.001G000400.v3.1                                             -3.21399303
## Sobic.001G000501.v3.1                                              0.10825260
## Sobic.001G000700.v3.1                                             -1.62514218
## Sobic.001G000800.v3.1                                              1.38593283
##                       Group_BT642_Preflowering.21-Group_BT642_Control.21_lfc
## Sobic.001G000200.v3.1                                            0.004521773
## Sobic.001G000400.v3.1                                           -0.962765095
## Sobic.001G000501.v3.1                                            0.023376187
## Sobic.001G000700.v3.1                                           -0.147109831
## Sobic.001G000800.v3.1                                            0.138093783

The column names show the actual contrast that was calculated. For example, Group_BT642_Preflowering.14-Group_BT642_Control.14 means the difference between the BT642 samples under preflowering drought at timepoint 14 and the BT642 samples under control at timepoint 14. The genotype differences have more complicated column names, since their contrasts are differences of differences.

Summary of results

Leaf

The number of DE genes in leaf in each week.

## Preflowering BT642 
##       condition genotype timepoint count
## 1  Preflowering    BT642    Day014  1641
## 2  Preflowering    BT642    Day021   147
## 3  Preflowering    BT642    Day028    85
## 4  Preflowering    BT642    Day035  3949
## 5  Preflowering    BT642    Day042  4232
## 6  Preflowering    BT642    Day049  2124
## 7  Preflowering    BT642    Day056  4949
## 8  Preflowering    BT642    Day058  3638
## 9  Preflowering    BT642    Day059  1690
## 10 Preflowering    BT642    Day061   947
## 11 Preflowering    BT642    Day063  1531
## 12 Preflowering    BT642    Day070   708
## 13 Preflowering    BT642    Day077   477
## 14 Preflowering    BT642    Day084   468
## 15 Preflowering    BT642    Day091   427
## 16 Preflowering    BT642    Day098    89
## 17 Preflowering    BT642    Day105   755
## 18 Preflowering    BT642    Day119    40
## Preflowering RT430 
##       condition genotype timepoint count
## 1  Preflowering    RT430    Day014  1558
## 2  Preflowering    RT430    Day021   118
## 3  Preflowering    RT430    Day028   172
## 4  Preflowering    RT430    Day035  2423
## 5  Preflowering    RT430    Day042  2903
## 6  Preflowering    RT430    Day049  2297
## 7  Preflowering    RT430    Day056  4463
## 8  Preflowering    RT430    Day058  3572
## 9  Preflowering    RT430    Day059  2829
## 10 Preflowering    RT430    Day061   651
## 11 Preflowering    RT430    Day063  1077
## 12 Preflowering    RT430    Day070   781
## 13 Preflowering    RT430    Day077   293
## 14 Preflowering    RT430    Day084   370
## 15 Preflowering    RT430    Day091   221
## 16 Preflowering    RT430    Day098    58
## 17 Preflowering    RT430    Day105   250
## 18 Preflowering    RT430    Day112   142
## 19 Preflowering    RT430    Day119    34
## Preflowering Both 
##       condition genotype timepoint count
## 1  Preflowering     Both    Day014    96
## 2  Preflowering     Both    Day021    18
## 3  Preflowering     Both    Day028    17
## 4  Preflowering     Both    Day035   231
## 5  Preflowering     Both    Day042   436
## 6  Preflowering     Both    Day049   256
## 7  Preflowering     Both    Day056   559
## 8  Preflowering     Both    Day058   420
## 9  Preflowering     Both    Day059   226
## 10 Preflowering     Both    Day061   181
## 11 Preflowering     Both    Day063   170
## 12 Preflowering     Both    Day070    84
## 13 Preflowering     Both    Day077    82
## 14 Preflowering     Both    Day084    79
## 15 Preflowering     Both    Day091    72
## 16 Preflowering     Both    Day098    27
## 17 Preflowering     Both    Day105   117
## 18 Preflowering     Both    Day119    21
## Postflowering BT642 
##        condition genotype timepoint count
## 1  Postflowering    BT642    Day063     3
## 2  Postflowering    BT642    Day065     7
## 3  Postflowering    BT642    Day066    18
## 4  Postflowering    BT642    Day068    22
## 5  Postflowering    BT642    Day070   230
## 6  Postflowering    BT642    Day077  2641
## 7  Postflowering    BT642    Day084  3199
## 8  Postflowering    BT642    Day091  2036
## 9  Postflowering    BT642    Day098   145
## 10 Postflowering    BT642    Day105  3124
## 11 Postflowering    BT642    Day119  1178
## Postflowering RT430 
##        condition genotype timepoint count
## 1  Postflowering    RT430    Day063    11
## 2  Postflowering    RT430    Day065    56
## 3  Postflowering    RT430    Day066    15
## 4  Postflowering    RT430    Day068    32
## 5  Postflowering    RT430    Day070   857
## 6  Postflowering    RT430    Day077  3702
## 7  Postflowering    RT430    Day084  4321
## 8  Postflowering    RT430    Day091  4730
## 9  Postflowering    RT430    Day098   423
## 10 Postflowering    RT430    Day105  2976
## 11 Postflowering    RT430    Day119  1706
## Postflowering Both 
##        condition genotype timepoint count
## 1  Postflowering     Both    Day063     2
## 2  Postflowering     Both    Day065     9
## 3  Postflowering     Both    Day066     0
## 4  Postflowering     Both    Day068     8
## 5  Postflowering     Both    Day070    52
## 6  Postflowering     Both    Day077   391
## 7  Postflowering     Both    Day084   326
## 8  Postflowering     Both    Day091   680
## 9  Postflowering     Both    Day098    26
## 10 Postflowering     Both    Day105   584
## 11 Postflowering     Both    Day119   159

Root

The number of DE genes in root in each week.

## Preflowering BT642 
##       condition genotype timepoint count
## 1  Preflowering    BT642    Day014   665
## 2  Preflowering    BT642    Day021  1347
## 3  Preflowering    BT642    Day028  5175
## 4  Preflowering    BT642    Day035  9563
## 5  Preflowering    BT642    Day042 12857
## 6  Preflowering    BT642    Day049  9124
## 7  Preflowering    BT642    Day056 10439
## 8  Preflowering    BT642    Day058  7370
## 9  Preflowering    BT642    Day059  5678
## 10 Preflowering    BT642    Day061  3888
## 11 Preflowering    BT642    Day063  4058
## 12 Preflowering    BT642    Day070  1906
## 13 Preflowering    BT642    Day077  1664
## 14 Preflowering    BT642    Day084  1217
## 15 Preflowering    BT642    Day091  2199
## 16 Preflowering    BT642    Day098    89
## 17 Preflowering    BT642    Day105  1452
## 18 Preflowering    BT642    Day119   135
## Preflowering RT430 
##       condition genotype timepoint count
## 1  Preflowering    RT430    Day014   588
## 2  Preflowering    RT430    Day021   342
## 3  Preflowering    RT430    Day028  5596
## 4  Preflowering    RT430    Day035 10195
## 5  Preflowering    RT430    Day042 13384
## 6  Preflowering    RT430    Day049  9912
## 7  Preflowering    RT430    Day056 13024
## 8  Preflowering    RT430    Day058  7408
## 9  Preflowering    RT430    Day059  5870
## 10 Preflowering    RT430    Day061  4887
## 11 Preflowering    RT430    Day063  5135
## 12 Preflowering    RT430    Day070  2655
## 13 Preflowering    RT430    Day077  3516
## 14 Preflowering    RT430    Day084  3333
## 15 Preflowering    RT430    Day091  1959
## 16 Preflowering    RT430    Day098   209
## 17 Preflowering    RT430    Day105  2457
## 18 Preflowering    RT430    Day112   299
## 19 Preflowering    RT430    Day119   335
## Preflowering Both 
##       condition genotype timepoint count
## 1  Preflowering     Both    Day014    63
## 2  Preflowering     Both    Day021   108
## 3  Preflowering     Both    Day028   385
## 4  Preflowering     Both    Day035   765
## 5  Preflowering     Both    Day042  1466
## 6  Preflowering     Both    Day049  1076
## 7  Preflowering     Both    Day056  1467
## 8  Preflowering     Both    Day058   813
## 9  Preflowering     Both    Day059   822
## 10 Preflowering     Both    Day061   436
## 11 Preflowering     Both    Day063   879
## 12 Preflowering     Both    Day070   310
## 13 Preflowering     Both    Day077   550
## 14 Preflowering     Both    Day084   719
## 15 Preflowering     Both    Day091   222
## 16 Preflowering     Both    Day098    31
## 17 Preflowering     Both    Day105   393
## 18 Preflowering     Both    Day119    57
## Postflowering BT642 
##        condition genotype timepoint count
## 1  Postflowering    BT642    Day063    11
## 2  Postflowering    BT642    Day065  3152
## 3  Postflowering    BT642    Day066   816
## 4  Postflowering    BT642    Day068  2753
## 5  Postflowering    BT642    Day070  5447
## 6  Postflowering    BT642    Day077  6633
## 7  Postflowering    BT642    Day084  7134
## 8  Postflowering    BT642    Day091  5064
## 9  Postflowering    BT642    Day098   414
## 10 Postflowering    BT642    Day105  6003
## 11 Postflowering    BT642    Day119  2786
## Postflowering RT430 
##        condition genotype timepoint count
## 1  Postflowering    RT430    Day063     7
## 2  Postflowering    RT430    Day065  1494
## 3  Postflowering    RT430    Day066   559
## 4  Postflowering    RT430    Day068  1273
## 5  Postflowering    RT430    Day070  4065
## 6  Postflowering    RT430    Day077  7017
## 7  Postflowering    RT430    Day084  6061
## 8  Postflowering    RT430    Day091  6779
## 9  Postflowering    RT430    Day098  1128
## 10 Postflowering    RT430    Day105  7316
## 11 Postflowering    RT430    Day112  2238
## 12 Postflowering    RT430    Day119  4596
## Postflowering Both 
##        condition genotype timepoint count
## 1  Postflowering     Both    Day063    12
## 2  Postflowering     Both    Day065   168
## 3  Postflowering     Both    Day066    35
## 4  Postflowering     Both    Day068  1697
## 5  Postflowering     Both    Day070   282
## 6  Postflowering     Both    Day077   710
## 7  Postflowering     Both    Day084   631
## 8  Postflowering     Both    Day091   699
## 9  Postflowering     Both    Day098   129
## 10 Postflowering     Both    Day105   748
## 11 Postflowering     Both    Day119   298

Save results

We save results of each contrast (including contrasts of genotype differences) into a separate comma-delimnated file in results/Year123/DE_timepoint and combine them by condition of drought, for example:

  • leaf_BT642_Preflowering_tpDE_perTP_Day063.csv
  • leaf_RT430_Preflowering_tpDE_perTP_Day063.csv
  • leaf_Preflowering_tpDE_all.csv

  • leaf_GenoDiff_Preflowering_tpDE_perTP_Day063.csv
  • leaf_GenoDiff_Preflowering_tpDE_all.csv

and similarly for root.

## Saving leaf results in results/Year123/DE_timepoint 
## Saving root results in results/Year123/DE_timepoint

Session Info

## [1] "2021-12-10 19:12:44 PST"
## R version 4.1.2 (2021-11-01)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.3 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] forcats_0.5.1               purrr_0.3.4                
##  [3] readr_2.0.2                 tidyr_1.1.4                
##  [5] tibble_3.1.6                ggplot2_3.3.5              
##  [7] tidyverse_1.3.1             stringr_1.4.0              
##  [9] moanin_1.1.2                topGO_2.44.0               
## [11] SparseM_1.81                GO.db_3.13.0               
## [13] AnnotationDbi_1.56.1        graph_1.72.0               
## [15] SummarizedExperiment_1.24.0 Biobase_2.54.0             
## [17] GenomicRanges_1.46.0        GenomeInfoDb_1.30.0        
## [19] IRanges_2.28.0              S4Vectors_0.32.2           
## [21] BiocGenerics_0.40.0         MatrixGenerics_1.6.0       
## [23] matrixStats_0.61.0          dplyr_1.0.7                
## [25] rmarkdown_2.11              knitr_1.36                 
## [27] SCF_4.1.0                  
## 
## loaded via a namespace (and not attached):
##  [1] fs_1.5.0               bitops_1.0-7           lubridate_1.8.0       
##  [4] bit64_4.0.5            httr_1.4.2             tools_4.1.2           
##  [7] backports_1.3.0        bslib_0.3.1            utf8_1.2.2            
## [10] R6_2.5.1               DBI_1.1.1              colorspace_2.0-2      
## [13] withr_2.4.2            tidyselect_1.1.1       gridExtra_2.3         
## [16] bit_4.0.4              compiler_4.1.2         cli_3.1.0             
## [19] rvest_1.0.2            xml2_1.3.2             DelayedArray_0.20.0   
## [22] sass_0.4.0             scales_1.1.1           digest_0.6.28         
## [25] XVector_0.34.0         pkgconfig_2.0.3        htmltools_0.5.2       
## [28] dbplyr_2.1.1           fastmap_1.1.0          limma_3.50.0          
## [31] readxl_1.3.1           rlang_0.4.12           rstudioapi_0.13       
## [34] RSQLite_2.2.8          jquerylib_0.1.4        generics_0.1.1        
## [37] jsonlite_1.7.2         gtools_3.9.2           RCurl_1.98-1.5        
## [40] magrittr_2.0.1         GenomeInfoDbData_1.2.7 Matrix_1.3-4          
## [43] Rcpp_1.0.7             munsell_0.5.0          fansi_0.5.0           
## [46] viridis_0.6.2          lifecycle_1.0.1        stringi_1.7.5         
## [49] yaml_2.2.1             edgeR_3.36.0           ClusterR_1.2.5        
## [52] zlibbioc_1.40.0        grid_4.1.2             blob_1.2.2            
## [55] crayon_1.4.2           lattice_0.20-45        haven_2.4.3           
## [58] Biostrings_2.60.2      splines_4.1.2          hms_1.1.1             
## [61] KEGGREST_1.34.0        locfit_1.5-9.4         pillar_1.6.4          
## [64] reprex_2.0.1           glue_1.5.0             evaluate_0.14         
## [67] modelr_0.1.8           tzdb_0.2.0             png_0.1-7             
## [70] vctrs_0.3.8            cellranger_1.1.0       gtable_0.3.0          
## [73] assertthat_0.2.1       cachem_1.0.6           xfun_0.28             
## [76] broom_0.7.10           viridisLite_0.4.0      memoise_2.0.0         
## [79] gmp_0.6-2.1            ellipsis_0.3.2