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")
  library("RhpcBLASctl")
})

RhpcBLASctl::blas_set_num_threads(1)

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.5.2 (2025-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.4 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/libopenblasp-r0.3.26.so;  LAPACK version 3.12.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=en_US.UTF-8          
##  [9] LC_ADDRESS=en_US.UTF-8        LC_TELEPHONE=en_US.UTF-8     
## [11] LC_MEASUREMENT=en_US.UTF-8    LC_IDENTIFICATION=en_US.UTF-8
## 
## time zone: Etc/UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] RhpcBLASctl_0.23-42         gtools_3.9.5               
##  [3] xlsx_0.6.5                  DT_0.34.0                  
##  [5] ggplot2_4.0.3               kableExtra_1.4.0           
##  [7] beeswarm_0.4.0              eulerr_7.1.0               
##  [9] MASS_7.3-65                 mitch_1.22.1               
## [11] DESeq2_1.50.2               SummarizedExperiment_1.40.0
## [13] Biobase_2.70.0              MatrixGenerics_1.22.0      
## [15] matrixStats_1.5.0           GenomicRanges_1.62.1       
## [17] Seqinfo_1.0.0               IRanges_2.44.0             
## [19] S4Vectors_0.48.1            BiocGenerics_0.56.0        
## [21] generics_0.1.4              dplyr_1.2.1                
## [23] WGCNA_1.74                  fastcluster_1.3.0          
## [25] dynamicTreeCut_1.63-1       reshape2_1.4.5             
## [27] gplots_3.3.0               
## 
## loaded via a namespace (and not attached):
##   [1] RColorBrewer_1.1-3    rstudioapi_0.18.0     jsonlite_2.0.0       
##   [4] magrittr_2.0.5        farver_2.1.2          rmarkdown_2.31       
##   [7] vctrs_0.7.3           base64enc_0.1-6       htmltools_0.5.9      
##  [10] S4Arrays_1.10.1       progress_1.2.3        SparseArray_1.10.10  
##  [13] Formula_1.2-5         sass_0.4.10           KernSmooth_2.23-26   
##  [16] bslib_0.10.0          htmlwidgets_1.6.4     plyr_1.8.9           
##  [19] echarts4r_0.5.0       impute_1.84.0         cachem_1.1.0         
##  [22] mime_0.13             lifecycle_1.0.5       iterators_1.0.14     
##  [25] pkgconfig_2.0.3       Matrix_1.7-5          R6_2.6.1             
##  [28] fastmap_1.2.0         shiny_1.13.0          digest_0.6.39        
##  [31] colorspace_2.1-2      GGally_2.4.0          textshaping_1.0.5    
##  [34] crosstalk_1.2.2       Hmisc_5.2-5           labeling_0.4.3       
##  [37] polyclip_1.10-7       abind_1.4-8           compiler_4.5.2       
##  [40] withr_3.0.2           doParallel_1.0.17     htmlTable_2.5.0      
##  [43] S7_0.2.2              backports_1.5.1       BiocParallel_1.44.0  
##  [46] ggstats_0.13.0        DelayedArray_0.36.1   caTools_1.18.3       
##  [49] tools_4.5.2           foreign_0.8-91        otel_0.2.0           
##  [52] httpuv_1.6.17         nnet_7.3-20           glue_1.8.1           
##  [55] promises_1.5.0        grid_4.5.2            polylabelr_1.0.0     
##  [58] checkmate_2.3.4       cluster_2.1.8.2       gtable_0.3.6         
##  [61] preprocessCore_1.72.0 tidyr_1.3.2           hms_1.1.4            
##  [64] data.table_1.18.2.1   xml2_1.5.2            XVector_0.50.0       
##  [67] foreach_1.5.2         pillar_1.11.1         stringr_1.6.0        
##  [70] limma_3.66.0          later_1.4.8           rJava_1.0-18         
##  [73] splines_4.5.2         lattice_0.22-9        survival_3.8-6       
##  [76] tidyselect_1.2.1      locfit_1.5-9.12       knitr_1.51           
##  [79] gridExtra_2.3         svglite_2.2.2         xfun_0.57            
##  [82] statmod_1.5.1         stringi_1.8.7         statnet.common_4.13.0
##  [85] yaml_2.3.12           evaluate_1.0.5        codetools_0.2-20     
##  [88] xlsxjars_0.9.0        tibble_3.3.1          BiocManager_1.30.27  
##  [91] cli_3.6.6             rpart_4.1.27          xtable_1.8-8         
##  [94] systemfonts_1.3.2     jquerylib_0.1.4       network_1.20.0       
##  [97] Rcpp_1.1.1-1.1        coda_0.19-4.1         parallel_4.5.2       
## [100] prettyunits_1.2.0     bitops_1.0-9          viridisLite_0.4.3    
## [103] scales_1.4.0          purrr_1.2.2           crayon_1.5.3         
## [106] rlang_1.2.0