This document has last been compiled on 2021-12-15 09:45:29.

Extract genes with significant genotype difference in DE_splines

We first extract genes with significant genotype difference in DE_Splitspline analysis (results/RemapYear123/DE_splitsplines). A gene is significant when its adjusted p-value < 0.05.

## Saving results of significant genotype difference of DE_splines to results/RemapYear123/interestingGeneSets/globalGeno/leaf_Postflowering_all.tsv

Split selected genes into upregulated or downregulated in the region of interest

Then we extract upregulated or downregulated genes w.r.t their summarized t-statistic for each genotype in DE_timepoint analysis: \(sign(\frac{1}{N}\sum_{i=1}^{N}t_i)\times\frac{1}{N}\sum_{i=1}^{N}|t_i|\). \(N\) is the number of drought time points. These summarized t-statistics are computed in mRNA_DE_tps.Rmd. They are saved in results/RemapYear123/data.

A gene is marked as upregulated if its summarized t-statistics is greater than the 0.8 percentile over all summarized t-statistics over all genes and both genotypes.

A gene is marked as downregulated if its summarized t-statistics is less than the 0.2 percentile over all summarized t-statistics over all genes and both genotypes.

Note that these quantiles are taken over all genes, meaning genes that are not found significant too.

## The quantiles are 1.173 and -1.019
## Saving significant upregulated genes to results/RemapYear123/interestingGeneSets/globalGeno/leaf_Postflowering_upregulated.tsv
## Saving significant down_regulated genes to results/RemapYear123/interestingGeneSets/globalGeno/leaf_Postflowering_downregulated.tsv

Summary

We provide a summary of the number of genes in each case.

##                                                                                                                                                           case
## 1                                                                      leaf, Postflowering: Significant genotype difference in DE splines (adj p-value < 0.05)
## 2  leaf, Postflowering: Significant genotype difference in DE splines (adj p-value < 0.05) and both genotypes in the upper 0.2 quantile of t-statistic (1.173)
## 3 leaf, Postflowering: Significant genotype difference in DE splines (adj p-value < 0.05) and both genotypes in the lower 0.2 quantile of t-statistic (-1.019)
##   counts
## 1   1973
## 2    269
## 3    298

Intersect the results in expressed in one of the genotypes, or both expressed

For the selected genes with significant genotype difference in DE_Splitspline analysis, we also group them w.r.t whether they expressed only in a certain genotype, or both genotypes. They are saved in results/RemapYear123/interestingGeneSets/globalGeno. Note that “non-expressed” here is not our minimal threshold filter (which is applied jointly across both genotypes).

Here, “non-expressed” is defined per genotype and is whether the top 75% of the log-counts across samples (the 3rd quantile) is greater than x (see function classifyGenoExpression used in mRNA_getFilteredGenes). Currently it is x=8, and is a fairly stringent requirement for being considered expressed.

## Table of expressed/non-expressed in all genes:
##               BT642Expressed
## RT430Expressed FALSE  TRUE
##          FALSE 15963   931
##          TRUE    471 11307
## Table of expressed/non-expressed in these subsetted genes:
##               BT642Expressed
## RT430Expressed FALSE TRUE
##          FALSE  1001  114
##          TRUE     86  772
## Saving genes with significant genotype difference as well as expressed in both genotypes to results/RemapYear123/interestingGeneSets/globalGeno/leaf_Postflowering_both_expressed.tsv
## Saving genes with significant genotype difference and not expressed in BT642 to results/RemapYear123/interestingGeneSets/globalGeno/leaf_Postflowering_BT642_not_expressed.tsv
## Saving genes with significant genotype difference and not expressed in RT430 to results/RemapYear123/interestingGeneSets/globalGeno/leaf_Postflowering_RT430_not_expressed.tsv

Summary

We provide a summary of the number of genes in each case.

##                                                                                                                   case
## 1 leaf, Postflowering: Significant genotype difference in DE splines (adj p-value < 0.05) and both genotypes expressed
## 2      leaf, Postflowering: Significant genotype difference in DE splines (adj p-value < 0.05) and BT642 not expressed
## 3      leaf, Postflowering: Significant genotype difference in DE splines (adj p-value < 0.05) and RT430 not expressed
##   counts
## 1    772
## 2     86
## 3    114