Introduction

Time course analysis of PADDI genomics data.

suppressPackageStartupMessages({
  library("gplots")
  library("reshape2")
  library("WGCNA")
  library("dplyr")
  library("DESeq2")
  library("mitch")
  library("MASS")
  library("eulerr")
})

Load the data

load("tca_pairwise.Rdata")

Overview

We will run timecourse analysis with a simple pairwise approach. For each of the groups below, this will involve three comparisons:

  • T0 vs EOS

  • EOS vs POD1

  • T0 vs POD1

The groups/subgroups we will look at are:

  1. Timecourse in low CRP group

  2. Timecourse in high CRP group

  3. Timecourse in low CRP group and treatment group A

  4. Timecourse in low CRP group and treatment group B

  5. Timecourse in high CRP group and treatment group A

  6. Timecourse in high CRP group and treatment group B

In this report I will be loading in the DESeq2 objects and conducting downstream analysis.

Functions

dequant1 <- function(x) {
  all <- nrow(x)
  nde <- length(rownames(subset(x,padj<0.05)))
  nup <- length(rownames(subset(x,padj<0.05 & log2FoldChange>0)))
  ndn <- length(rownames(subset(x,padj<0.05 & log2FoldChange<0)))
  return(c("all"=all,"nde"=nde,
    "up"=nup,"dn"=ndn))
}

dequant2 <- function(x,y) {
  xup <- rownames(subset(x,padj<0.05 & log2FoldChange>0))
  xdn <- rownames(subset(x,padj<0.05 & log2FoldChange<0))
  yup <- rownames(subset(y,padj<0.05 & log2FoldChange>0))
  ydn <- rownames(subset(y,padj<0.05 & log2FoldChange<0))
  nxup <- length(xup)
  nxdn <- length(xdn)
  nyup <- length(yup)
  nydn <- length(ydn)
  iup <- intersect(xup,yup)
  oxup <- setdiff(xup,iup)
  oyup <- setdiff(yup,iup)
  unup <- union(xup,yup)
  idn <- intersect(xdn,ydn)
  oxdn <- setdiff(xdn,idn)
  oydn <- setdiff(ydn,idn)
  undn <- union(xdn,ydn)
  myintersect <- length(c(iup,idn))
  myunion <- length(c(unup,undn))
  myjac <- myintersect / myunion

  res <- c("xup"=nxup,"xdn"=nxdn,"yup"=nyup,"ydn"=nydn,
    "intersect"=myintersect,"union"=myunion,"jac"=myjac)
  return(res)
}

de_euler <- function(x,y,xname,yname) {

  xup <- rownames(subset(x,padj<0.05 & log2FoldChange>0))
  xdn <- rownames(subset(x,padj<0.05 & log2FoldChange<0))
  yup <- rownames(subset(y,padj<0.05 & log2FoldChange>0))
  ydn <- rownames(subset(y,padj<0.05 & log2FoldChange<0))

  xname_up <- paste(xname,"up")
  xname_dn <- paste(xname,"dn")
  yname_up <- paste(yname,"up")
  yname_dn <- paste(yname,"dn")

  v1 <- list(xup, xdn, yup, ydn)
  names(v1) <- c(xname_up, xname_dn, yname_up, yname_dn)
  plot(euler(v1),quantities = TRUE)

}

Object names

Timecourse in low CRP group

tc_lo_t0veos tc_lo_eosvpod1 tc_lo_t0vpod1

tc_lo_t0veos_adj tc_lo_eosvpod1_adj tc_lo_t0vpod1_adj

lapply(list("tc_lo_t0veos"=tc_lo_t0veos,
  "tc_lo_eosvpod1"=tc_lo_eosvpod1,
  "tc_lo_t0vpod1"=tc_lo_t0vpod1,
  "tc_lo_t0veos_adj"=tc_lo_t0veos_adj,
  "tc_lo_eosvpod1_adj"=tc_lo_eosvpod1_adj,
  "tc_lo_t0vpod1_adj"=tc_lo_t0vpod1_adj),dequant1)
## $tc_lo_t0veos
##   all   nde    up    dn 
## 22144  3618  1829  1789 
## 
## $tc_lo_eosvpod1
##   all   nde    up    dn 
## 21793  8341  4082  4259 
## 
## $tc_lo_t0vpod1
##   all   nde    up    dn 
## 21672  7433  3661  3772 
## 
## $tc_lo_t0veos_adj
##   all   nde    up    dn 
## 22144  2062   999  1063 
## 
## $tc_lo_eosvpod1_adj
##   all   nde    up    dn 
## 21793  8155  4057  4098 
## 
## $tc_lo_t0vpod1_adj
##   all   nde    up    dn 
## 21672  6124  3000  3124

Timecourse in high CRP group

tc_hi_t0veos tc_hi_eosvpod1 tc_hi_t0vpod1

tc_hi_t0veos_adj tc_hi_eosvpod1_adj tc_hi_t0vpod1_adj

lapply(list("tc_hi_t0veos"=tc_hi_t0veos,
  "tc_hi_eosvpod1"=tc_hi_eosvpod1,
  "tc_hi_t0vpod1"=tc_hi_t0vpod1,
  "tc_hi_t0veos_adj"=tc_hi_t0veos_adj,
  "tc_hi_eosvpod1_adj"=tc_hi_eosvpod1_adj,
  "tc_hi_t0vpod1_adj"=tc_hi_t0vpod1_adj),dequant1)
## $tc_hi_t0veos
##   all   nde    up    dn 
## 21772  8816  4120  4696 
## 
## $tc_hi_eosvpod1
##   all   nde    up    dn 
## 21487  8173  4118  4055 
## 
## $tc_hi_t0vpod1
##   all   nde    up    dn 
## 21614 10948  4929  6019 
## 
## $tc_hi_t0veos_adj
##   all   nde    up    dn 
## 21772  6211  2913  3298 
## 
## $tc_hi_eosvpod1_adj
##   all   nde    up    dn 
## 21487  6859  3525  3334 
## 
## $tc_hi_t0vpod1_adj
##   all   nde    up    dn 
## 21614  9255  4283  4972

Timecourse in low CRP group and treatment group A

tc_lo_a_t0veos tc_lo_a_eosvpod1 tc_lo_a_t0vpod1

tc_lo_a_t0veos_adj tc_lo_a_eosvpod1_adj tc_lo_a_t0vpod1_adj

lapply(list("tc_lo_a_t0veos"=tc_lo_a_t0veos,
  "tc_lo_a_eosvpod1"=tc_lo_a_eosvpod1,
  "tc_lo_a_t0vpod1"=tc_lo_a_t0vpod1,
  "tc_lo_a_t0veos_adj"=tc_lo_a_t0veos_adj,
  "tc_lo_a_eosvpod1_adj"=tc_lo_a_eosvpod1_adj,
  "tc_lo_a_t0vpod1_adj"=tc_lo_a_t0vpod1_adj),dequant1)
## $tc_lo_a_t0veos
##   all   nde    up    dn 
## 22167  5446  2784  2662 
## 
## $tc_lo_a_eosvpod1
##   all   nde    up    dn 
## 21814  9013  4490  4523 
## 
## $tc_lo_a_t0vpod1
##   all   nde    up    dn 
## 21696  7309  3756  3553 
## 
## $tc_lo_a_t0veos_adj
##   all   nde    up    dn 
## 22167  2993  1328  1665 
## 
## $tc_lo_a_eosvpod1_adj
##   all   nde    up    dn 
## 21814  8227  4210  4017 
## 
## $tc_lo_a_t0vpod1_adj
##   all   nde    up    dn 
## 21696  4439  2325  2114

Timecourse in low CRP group and treatment group B

tc_lo_b_t0veos tc_lo_b_eosvpod1 tc_lo_b_t0vpod1

tc_lo_b_t0veos_adj tc_lo_b_eosvpod1_adj tc_lo_b_t0vpod1_adj

lapply(list("tc_lo_b_t0veos"=tc_lo_b_t0veos,
  "tc_lo_b_eosvpod1"=tc_lo_b_eosvpod1,
  "tc_lo_b_t0vpod1"=tc_lo_b_t0vpod1,
  "tc_lo_b_t0veos_adj"=tc_lo_b_t0veos_adj,
  "tc_lo_b_eosvpod1_adj"=tc_lo_b_eosvpod1_adj,
  "tc_lo_b_t0vpod1_adj"=tc_lo_b_t0vpod1_adj),dequant1)
## $tc_lo_b_t0veos
##   all   nde    up    dn 
## 22091    39    25    14 
## 
## $tc_lo_b_eosvpod1
##   all   nde    up    dn 
## 21736   876   456   420 
## 
## $tc_lo_b_t0vpod1
##   all   nde    up    dn 
## 21715  1315   758   557 
## 
## $tc_lo_b_t0veos_adj
##   all   nde    up    dn 
## 22091     8     7     1 
## 
## $tc_lo_b_eosvpod1_adj
##   all   nde    up    dn 
## 21736  2357  1468   889 
## 
## $tc_lo_b_t0vpod1_adj
##   all   nde    up    dn 
## 21715   157   131    26

Timecourse in high CRP group and treatment group A

tc_hi_a_t0veos tc_hi_a_eosvpod1 tc_hi_a_t0vpod1

tc_hi_a_t0veos_adj tc_hi_a_eosvpod1_adj tc_hi_a_t0vpod1_adj

lapply(list("tc_hi_a_t0veos"=tc_hi_a_t0veos,
  "tc_hi_a_eosvpod1"=tc_hi_a_eosvpod1,
  "tc_hi_a_t0vpod1"=tc_hi_a_t0vpod1,
  "tc_hi_a_t0veos_adj"=tc_hi_a_t0veos_adj,
  "tc_hi_a_eosvpod1_adj"=tc_hi_a_eosvpod1_adj,
  "tc_hi_a_t0vpod1_adj"=tc_hi_a_t0vpod1_adj),dequant1)
## $tc_hi_a_t0veos
##   all   nde    up    dn 
## 22227  4521  2545  1976 
## 
## $tc_hi_a_eosvpod1
##   all   nde    up    dn 
## 21654  3412  1890  1522 
## 
## $tc_hi_a_t0vpod1
##   all   nde    up    dn 
## 21860  4742  2657  2085 
## 
## $tc_hi_a_t0veos_adj
##   all   nde    up    dn 
## 22227  2732  1732  1000 
## 
## $tc_hi_a_eosvpod1_adj
##   all   nde    up    dn 
## 21654  3607  2165  1442 
## 
## $tc_hi_a_t0vpod1_adj
##   all   nde    up    dn 
## 21860    20     5    15

Timecourse in high CRP group and treatment group B

tc_hi_b_t0veos tc_hi_b_eosvpod1 tc_hi_b_t0vpod1

tc_hi_b_t0veos_adj tc_hi_b_eosvpod1_adj tc_hi_b_t0vpod1_adj

lapply(list("tc_hi_b_t0veos"=tc_hi_b_t0veos,
  "tc_hi_b_eosvpod1"=tc_hi_b_eosvpod1,
  "tc_hi_b_t0vpod1"=tc_hi_b_t0vpod1,
  "tc_hi_b_t0veos_adj"=tc_hi_b_t0veos_adj,
  "tc_hi_b_eosvpod1_adj"=tc_hi_b_eosvpod1_adj,
  "tc_hi_b_t0vpod1_adj"=tc_hi_b_t0vpod1_adj),dequant1)
## $tc_hi_b_t0veos
##   all   nde    up    dn 
## 21828  6401  2936  3465 
## 
## $tc_hi_b_eosvpod1
##   all   nde    up    dn 
## 21618  6740  3553  3187 
## 
## $tc_hi_b_t0vpod1
##   all   nde    up    dn 
## 21635  9212  4257  4955 
## 
## $tc_hi_b_t0veos_adj
##   all   nde    up    dn 
## 21828  2544  1317  1227 
## 
## $tc_hi_b_eosvpod1_adj
##   all   nde    up    dn 
## 21618  4848  2680  2168 
## 
## $tc_hi_b_t0vpod1_adj
##   all   nde    up    dn 
## 21635  7921  3722  4199

Effect of correction for cell types

# low CRP group
dequant2(tc_lo_t0veos, tc_lo_t0veos_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 1829.0000000 1789.0000000  999.0000000 1063.0000000 1931.0000000 3749.0000000 
##          jac 
##    0.5150707
de_euler(x=tc_lo_t0veos, y=tc_lo_t0veos_adj, xname="tc_lo_t0veos",yname="tc_lo_t0veos_adj")

dequant2(tc_lo_eosvpod1, tc_lo_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 4082.0000000 4259.0000000 4057.0000000 4098.0000000 7687.0000000 8809.0000000 
##          jac 
##    0.8726303
de_euler(x=tc_lo_eosvpod1, y=tc_lo_eosvpod1_adj, xname="tc_lo_eosvpod1",yname="tc_lo_eosvpod1_adj")

dequant2(tc_lo_t0vpod1, tc_lo_t0vpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 3661.0000000 3772.0000000 3000.0000000 3124.0000000 5992.0000000 7565.0000000 
##          jac 
##    0.7920687
de_euler(x=tc_lo_t0vpod1, y=tc_lo_t0vpod1_adj, xname="tc_lo_t0vpod1", yname="tc_lo_t0vpod1_adj")

# high CRP group
dequant2(tc_hi_t0veos, tc_hi_t0veos_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 4120.0000000 4696.0000000 2913.0000000 3298.0000000 6092.0000000 8935.0000000 
##          jac 
##    0.6818131
de_euler(x=tc_hi_t0veos, y=tc_hi_t0veos_adj, xname="tc_hi_t0veos", yname="tc_hi_t0veos_adj")

dequant2(tc_hi_eosvpod1, tc_hi_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 4118.0000000 4055.0000000 3525.0000000 3334.0000000 6569.0000000 8463.0000000 
##          jac 
##    0.7762023
de_euler(x=tc_hi_eosvpod1,y=tc_hi_eosvpod1_adj, xname="tc_hi_eosvpod1", yname="tc_hi_eosvpod1_adj")

dequant2(tc_hi_t0vpod1, tc_hi_t0vpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 4.929000e+03 6.019000e+03 4.283000e+03 4.972000e+03 8.797000e+03 1.140600e+04 
##          jac 
## 7.712607e-01
de_euler(x=tc_hi_t0vpod1, y=tc_hi_t0vpod1_adj, xname="tc_hi_t0vpod1", yname="tc_hi_t0vpod1_adj")

# Timecourse in low CRP group and treatment group A
dequant2(tc_lo_a_t0veos,tc_lo_a_t0veos_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 2784.0000000 2662.0000000 1328.0000000 1665.0000000 2672.0000000 5767.0000000 
##          jac 
##    0.4633258
de_euler(x=tc_lo_a_t0veos, y=tc_lo_a_t0veos_adj, xname="tc_lo_a_t0veos", yname="tc_lo_a_t0veos_adj")

dequant2(tc_lo_a_eosvpod1, tc_lo_a_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 4490.0000000 4523.0000000 4210.0000000 4017.0000000 7861.0000000 9379.0000000 
##          jac 
##    0.8381491
de_euler(x=tc_lo_a_eosvpod1, y=tc_lo_a_eosvpod1_adj, xname="tc_lo_a_eosvpod1", yname="tc_lo_a_eosvpod1_adj")

dequant2(tc_lo_a_t0vpod1,tc_lo_a_t0vpod1_adj)
##         xup         xdn         yup         ydn   intersect       union 
## 3756.000000 3553.000000 2325.000000 2114.000000 4253.000000 7495.000000 
##         jac 
##    0.567445
de_euler(x=tc_lo_a_t0vpod1, y=tc_lo_a_t0vpod1_adj, xname="tc_lo_a_t0vpod1", yname="tc_lo_a_t0vpod1_adj")

# Timecourse in low CRP group and treatment group B
dequant2(tc_lo_b_t0veos,tc_lo_b_t0veos_adj)
##         xup         xdn         yup         ydn   intersect       union 
## 25.00000000 14.00000000  7.00000000  1.00000000  1.00000000 46.00000000 
##         jac 
##  0.02173913
de_euler(x=tc_lo_b_t0veos, y=tc_lo_b_t0veos_adj, xname="tc_lo_b_t0veos", yname="tc_lo_b_t0veos_adj")

dequant2(tc_lo_b_eosvpod1, tc_lo_b_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
##  456.0000000  420.0000000 1468.0000000  889.0000000  720.0000000 2513.0000000 
##          jac 
##    0.2865101
de_euler(x=tc_lo_b_eosvpod1, y=tc_lo_b_eosvpod1_adj, xname="tc_lo_b_eosvpod1", yname="tc_lo_b_eosvpod1_adj")

dequant2(tc_lo_b_t0vpod1, tc_lo_b_t0vpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
##  758.0000000  557.0000000  131.0000000   26.0000000  152.0000000 1320.0000000 
##          jac 
##    0.1151515
de_euler(x=tc_lo_b_t0vpod1, y=tc_lo_b_t0vpod1_adj, xname="tc_lo_b_t0vpod1", yname="tc_lo_b_t0vpod1_adj")

# Timecourse in high CRP group and treatment group A
dequant2(tc_hi_a_t0veos, tc_hi_a_t0veos_adj)
##         xup         xdn         yup         ydn   intersect       union 
## 2545.000000 1976.000000 1732.000000 1000.000000 2559.000000 4694.000000 
##         jac 
##    0.545164
de_euler(x=tc_hi_a_t0veos, y=tc_hi_a_t0veos_adj, xname="tc_hi_a_t0veos", yname="tc_hi_a_t0veos_adj")

dequant2(tc_hi_a_eosvpod1, tc_hi_a_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 1890.0000000 1522.0000000 2165.0000000 1442.0000000 1989.0000000 5030.0000000 
##          jac 
##    0.3954274
de_euler(x=tc_hi_a_eosvpod1, y=tc_hi_a_eosvpod1_adj, xname="tc_hi_a_eosvpod1", yname="tc_hi_a_eosvpod1_adj")

dequant2(tc_hi_a_t0vpod1, tc_hi_a_t0vpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 2.657000e+03 2.085000e+03 5.000000e+00 1.500000e+01 1.000000e+00 4.761000e+03 
##          jac 
## 2.100399e-04
de_euler(x=tc_hi_a_t0vpod1, y=tc_hi_a_t0vpod1_adj, xname="tc_hi_a_t0vpod1", yname="tc_hi_a_t0vpod1_adj")

#### Timecourse in high CRP group and treatment group B
dequant2(tc_hi_b_t0veos, tc_hi_b_t0veos_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 2936.0000000 3465.0000000 1317.0000000 1227.0000000 2497.0000000 6448.0000000 
##          jac 
##    0.3872519
de_euler(x=tc_hi_b_t0veos, y=tc_hi_b_t0veos_adj, xname="tc_hi_b_t0veos", yname="tc_hi_b_t0veos_adj")

dequant2(tc_hi_b_eosvpod1, tc_hi_b_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 3553.0000000 3187.0000000 2680.0000000 2168.0000000 4604.0000000 6984.0000000 
##          jac 
##    0.6592211
de_euler(x=tc_hi_b_eosvpod1, y=tc_hi_b_eosvpod1_adj, xname="tc_hi_b_eosvpod1", yname="tc_hi_b_eosvpod1_adj")

dequant2(tc_hi_b_t0vpod1, tc_hi_b_t0vpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 4257.0000000 4955.0000000 3722.0000000 4199.0000000 7576.0000000 9557.0000000 
##          jac 
##    0.7927174
de_euler(x=tc_hi_b_t0vpod1, y=tc_hi_b_t0vpod1_adj, xname="tc_hi_b_t0vpod1", yname="tc_hi_b_t0vpod1_adj")

low CRP group

Few changes in T0 vs EOS and more in EOS vs POD1.

TODO: * Euler diagram * scatter plot of stat values * pathway analysis * bar charts and meaning of the DGE results

dequant2(tc_lo_t0veos_adj, tc_lo_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 9.990000e+02 1.063000e+03 4.057000e+03 4.098000e+03 6.500000e+01 1.015200e+04 
##          jac 
## 6.402679e-03
de_euler(x=tc_lo_t0veos_adj, y=tc_lo_eosvpod1_adj, xname="tc_lo_t0veos_adj", yname="tc_lo_eosvpod1_adj")

high CRP group

dequant2(tc_hi_t0veos_adj, tc_hi_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 2.913000e+03 3.298000e+03 3.525000e+03 3.334000e+03 5.400000e+02 1.253000e+04 
##          jac 
## 4.309657e-02
de_euler(x=tc_hi_t0veos_adj, y=tc_hi_eosvpod1_adj, xname="tc_hi_t0veos_adj", yname="tc_hi_eosvpod1_adj")

Timecourse in low CRP group and treatment group A

dequant2(tc_lo_a_t0veos_adj, tc_lo_a_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 1.328000e+03 1.665000e+03 4.210000e+03 4.017000e+03 2.900000e+01 1.119100e+04 
##          jac 
## 2.591368e-03
de_euler(x=tc_lo_a_t0veos_adj, y=tc_lo_a_eosvpod1_adj, xname="tc_lo_a_t0veos_adj", yname="tc_lo_a_eosvpod1_adj")

Timecourse in low CRP group and treatment group B

dequant2(tc_lo_b_t0veos_adj, tc_lo_b_eosvpod1_adj)
##       xup       xdn       yup       ydn intersect     union       jac 
##         7         1      1468       889         0      2365         0
de_euler(x=tc_lo_b_t0veos_adj, y=tc_lo_b_eosvpod1_adj, xname="tc_lo_b_t0veos_adj", yname="tc_lo_b_eosvpod1_adj")

Timecourse in high CRP group and treatment group A

dequant2(tc_hi_a_t0veos_adj, tc_hi_a_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 1.732000e+03 1.000000e+03 2.165000e+03 1.442000e+03 1.370000e+02 6.202000e+03 
##          jac 
## 2.208965e-02
de_euler(x=tc_hi_a_t0veos_adj, y=tc_hi_a_eosvpod1_adj, xname="tc_hi_a_t0veos_adj", yname="tc_hi_a_eosvpod1_adj")

Timecourse in high CRP group and treatment group B

dequant2(tc_hi_b_t0veos_adj, tc_hi_b_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 1.317000e+03 1.227000e+03 2.680000e+03 2.168000e+03 2.110000e+02 7.181000e+03 
##          jac 
## 2.938309e-02
de_euler(x=tc_hi_b_t0veos_adj, y=tc_hi_b_eosvpod1_adj, xname="tc_hi_b_t0veos_adj", yname="tc_hi_b_eosvpod1_adj")

Comparison of high and low CRP groups T0 vs EOS

dequant2(tc_lo_t0veos_adj, tc_hi_t0veos_adj)
##          xup          xdn          yup          ydn    intersect        union 
##  999.0000000 1063.0000000 2913.0000000 3298.0000000 1293.0000000 6980.0000000 
##          jac 
##    0.1852436
de_euler(x=tc_lo_t0veos_adj, y=tc_hi_t0veos_adj, xname="tc_lo_t0veos_adj", yname="tc_hi_t0veos_adj")

Comparison of high and low CRP groups EOS vs POD1

dequant2(tc_lo_eosvpod1_adj, tc_hi_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 4.057000e+03 4.098000e+03 3.525000e+03 3.334000e+03 4.816000e+03 1.019800e+04 
##          jac 
## 4.722495e-01
de_euler(x=tc_lo_eosvpod1_adj, y=tc_hi_eosvpod1_adj, xname="tc_lo_eosvpod1_adj", yname="tc_hi_eosvpod1_adj")

Comparison of high and low CRP groups T0 vs POD1

dequant2(tc_lo_t0vpod1_adj, tc_hi_t0vpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 3.000000e+03 3.124000e+03 4.283000e+03 4.972000e+03 5.012000e+03 1.036700e+04 
##          jac 
## 4.834571e-01
de_euler(x=tc_lo_t0vpod1_adj, y=tc_hi_t0vpod1_adj, xname="tc_lo_t0vpod1_adj", yname="tc_hi_t0vpod1_adj")

Comparison of treatment groups A and B in low CRP T0 vs EOS

dequant2(tc_lo_a_t0veos_adj, tc_lo_b_t0veos_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 1.328000e+03 1.665000e+03 7.000000e+00 1.000000e+00 4.000000e+00 2.997000e+03 
##          jac 
## 1.334668e-03
de_euler(x=tc_lo_a_t0veos_adj, y=tc_lo_b_t0veos_adj, xname="tc_lo_a_t0veos_adj", yname="tc_lo_b_t0veos_adj")

Comparison of treatment groups A and B in low CRP EOS vs POD1

dequant2(tc_lo_a_eosvpod1_adj, tc_lo_b_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 4210.0000000 4017.0000000 1468.0000000  889.0000000 1734.0000000 8850.0000000 
##          jac 
##    0.1959322
de_euler(x=tc_lo_a_eosvpod1_adj, y=tc_lo_b_eosvpod1_adj, xname="tc_lo_a_eosvpod1_adj", yname="tc_lo_b_eosvpod1_adj")

Comparison of treatment groups A and B in low CRP T0 vs POD1

dequant2(tc_lo_a_t0vpod1_adj, tc_lo_b_t0vpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 2.325000e+03 2.114000e+03 1.310000e+02 2.600000e+01 1.460000e+02 4.450000e+03 
##          jac 
## 3.280899e-02
de_euler(x=tc_lo_a_t0vpod1_adj, y=tc_lo_b_t0vpod1_adj, xname="tc_lo_a_t0vpod1_adj", yname="tc_lo_b_t0vpod1_adj")

Comparison of treatment groups A and B in high CRP T0 vs EOS

dequant2(tc_hi_a_t0veos_adj, tc_hi_b_t0veos_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 1732.0000000 1000.0000000 1317.0000000 1227.0000000 1364.0000000 3912.0000000 
##          jac 
##    0.3486708
de_euler(x=tc_hi_a_t0veos_adj, y=tc_hi_b_t0veos_adj, xname="tc_hi_a_t0veos_adj", yname="tc_hi_b_t0veos_adj")

Comparison of treatment groups A and B in high CRP EOS vs POD1

dequant2(tc_hi_a_eosvpod1_adj, tc_hi_b_eosvpod1_adj)
##          xup          xdn          yup          ydn    intersect        union 
## 2165.0000000 1442.0000000 2680.0000000 2168.0000000 1966.0000000 6489.0000000 
##          jac 
##    0.3029743
de_euler(x=tc_hi_a_eosvpod1_adj, y=tc_hi_b_eosvpod1_adj, xname="tc_hi_a_eosvpod1_adj", yname="tc_hi_b_eosvpod1_adj")

Comparison of treatment groups A and B in high CRP T0 vs POD1

dequant2(tc_hi_a_t0vpod1_adj, tc_hi_b_t0vpod1_adj)
##       xup       xdn       yup       ydn intersect     union       jac 
##         5        15      3722      4199         0      7941         0
de_euler(x=tc_hi_a_t0vpod1_adj, y=tc_hi_b_t0vpod1_adj, xname="tc_hi_a_t0vpod1_adj", yname="tc_hi_b_t0vpod1_adj")

STOP HERE

This one is getting long, so I will continue downstream analysis in a separate script.

Session information

For reproducibility

sessionInfo()
## R version 4.4.3 (2025-02-28)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 22.04.5 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## 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       
## 
## time zone: Australia/Melbourne
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] eulerr_7.0.2                MASS_7.3-65                
##  [3] mitch_1.19.3                DESeq2_1.44.0              
##  [5] SummarizedExperiment_1.34.0 Biobase_2.64.0             
##  [7] MatrixGenerics_1.16.0       matrixStats_1.5.0          
##  [9] GenomicRanges_1.56.2        GenomeInfoDb_1.40.1        
## [11] IRanges_2.38.1              S4Vectors_0.42.1           
## [13] BiocGenerics_0.50.0         dplyr_1.1.4                
## [15] WGCNA_1.73                  fastcluster_1.2.6          
## [17] dynamicTreeCut_1.63-1       reshape2_1.4.4             
## [19] gplots_3.2.0               
## 
## loaded via a namespace (and not attached):
##   [1] RColorBrewer_1.1-3      rstudioapi_0.17.1       jsonlite_1.9.1         
##   [4] magrittr_2.0.3          rmarkdown_2.29          zlibbioc_1.50.0        
##   [7] vctrs_0.6.5             memoise_2.0.1.9000      base64enc_0.1-3        
##  [10] htmltools_0.5.8.1       S4Arrays_1.4.1          SparseArray_1.4.8      
##  [13] Formula_1.2-5           sass_0.4.9              KernSmooth_2.23-26     
##  [16] bslib_0.9.0             htmlwidgets_1.6.4       plyr_1.8.9             
##  [19] echarts4r_0.4.5         impute_1.80.0           cachem_1.1.0           
##  [22] mime_0.13               lifecycle_1.0.4         iterators_1.0.14       
##  [25] pkgconfig_2.0.3         Matrix_1.7-3            R6_2.6.1               
##  [28] fastmap_1.2.0           GenomeInfoDbData_1.2.12 shiny_1.10.0           
##  [31] digest_0.6.37           colorspace_2.1-1        GGally_2.2.1           
##  [34] AnnotationDbi_1.66.0    Hmisc_5.2-3             RSQLite_2.3.9          
##  [37] httr_1.4.7              polyclip_1.10-7         abind_1.4-8            
##  [40] compiler_4.4.3          bit64_4.6.0-1           doParallel_1.0.17      
##  [43] htmlTable_2.4.3         backports_1.5.0         BiocParallel_1.38.0    
##  [46] DBI_1.2.3               ggstats_0.9.0           DelayedArray_0.30.1    
##  [49] gtools_3.9.5            caTools_1.18.3          tools_4.4.3            
##  [52] foreign_0.8-89          beeswarm_0.4.0          httpuv_1.6.15          
##  [55] nnet_7.3-20             glue_1.8.0              promises_1.3.2         
##  [58] grid_4.4.3              polylabelr_0.3.0        checkmate_2.3.2        
##  [61] cluster_2.1.8.1         generics_0.1.3          gtable_0.3.6           
##  [64] preprocessCore_1.66.0   tidyr_1.3.1             data.table_1.17.0      
##  [67] xml2_1.3.8              XVector_0.44.0          foreach_1.5.2          
##  [70] pillar_1.10.1           stringr_1.5.1           later_1.4.1            
##  [73] splines_4.4.3           lattice_0.22-6          survival_3.8-3         
##  [76] bit_4.6.0               tidyselect_1.2.1        GO.db_3.19.1           
##  [79] locfit_1.5-9.12         Biostrings_2.72.1       knitr_1.50             
##  [82] gridExtra_2.3           svglite_2.1.3           xfun_0.51              
##  [85] stringi_1.8.4           UCSC.utils_1.0.0        yaml_2.3.10            
##  [88] kableExtra_1.4.0        evaluate_1.0.3          codetools_0.2-20       
##  [91] tibble_3.2.1            cli_3.6.4               rpart_4.1.24           
##  [94] xtable_1.8-4            systemfonts_1.2.1       munsell_0.5.1          
##  [97] jquerylib_0.1.4         Rcpp_1.0.14             png_0.1-8              
## [100] parallel_4.4.3          ggplot2_3.5.1           blob_1.2.4             
## [103] bitops_1.0-9            viridisLite_0.4.2       scales_1.3.0           
## [106] purrr_1.0.4             crayon_1.5.3            rlang_1.1.5            
## [109] KEGGREST_1.44.1