p_val_all_pairs: Comparison p-value between 2 groups of DE genes

Description Usage Arguments Value

Description

First, select the true positive (TP) of the intersection between the following permutations:

TP vitro1 up vitro2 up
vivo1 up a b
vivo2 up c d

The null hypothesis is that the upregulated genes in vitro1 compared with vitro2 (denoted as vitro1_vs_vitro2) do not intersect with vivo1_vs_vivo2 more than vivo2_vs_vivo1, compared with vitro2_vs_vitro1.

For example, if vitro1 and vitro2 are very similar, then they should both contain a similar number of vivo1_vs_vivo2, and/or vivo2_vs_vivo1. If vitro1 and vitro2 are different in the direction of vivo1 and vivo2, then vitro1 should contain a different vivo1 to vivo2 ratio, compared with vitro2.

The probability of evaluating this null hypothesis is evaluated by Fisher's exact test:

$$ p = \frac (a+b)! (c+d)! (a+c)! (b+d)! a! b! c! d! (a+b+c+d)! $$

Usage

1
p_val_all_pairs(comp_list, vitro_list, vivo_list)

Arguments

comp_list

output from all_vivo_all_vitro

vitro_list

all in vitro cells to be compared with each other

vivo_list

all in vivo cells to be compared with each other

Value

a dataframe with the following attributes: model: the cell types in comparison. For example, 'bTSC_vs_hTSC-OKAE, ICM_vs_TB' assumes that bTSC is similar to ICM/TB while hTSC-OKAE is similar to the opposite TB/ICM. ratio: a/c (see the Method section below) rev_ratio: b/d pval: Fisher's exact test p value padj: adjusted p value for false discovery rate


Yutong441/TBdev documentation built on Dec. 18, 2021, 8:22 p.m.