Venn diagram signficance of overlap calculation
0
0
Entering edit mode
2.8 years ago
bojkem91 • 0

Hello! I am new to bioinformatics, and I would really appreciate someone's help. I have a question regarding the calculation of the significance of overlap on the Venn diagram. Let's say for two samples group(three samples in each group), I have a number of DEGs:

#### Sample_Group_KO_plus_1_vs_Pos
## out of 21852 with nonzero total read count
## LFC > 0 (up)       : 3028, 14%
## LFC < 0 (down)     : 3318, 15%
## outliers [1]       : 26, 0.12%
## low counts [2]     : 5928, 27%
## (mean count < 1)

#### Sample_Group_KO_plus_2_vs_Pos
##
## out of 21852 with nonzero total read count
## LFC > 0 (up)       : 3038, 14%
## LFC < 0 (down)     : 3224, 15%
## outliers [1]       : 26, 0.12%
## low counts [2]     : 5928, 27%
## (mean count < 1)


From those two samples, I have filtered out significantly DEGs based on criteria: abs(LFC) >= 1 and p.adj < 0.1

For sample KO_plus_1_vs_Pos:702

For sample KO_plus_2_vs_Pos:1118

Now I used the fisher test to calculate the significance:

fisher.test(matrix(c(11135,175,591,527),nrow=2),alternative="greater")


527 - Number of overlapped significant DE genes between two samples KO_plus_1 and KO_plus_2

175 - Unique significant DE genes for sample KO_plus_1_vs_Pos

591 - Unique significant DE genes for sample KO_plus_2_vs_Pos

11135 - the sum of DEGs from sample KO_plus_1 and KO_plus_2 subtracted by the sum of intersected genes + unique genes (527+175+591).

Is my solution correct? Thank you very much for your help!

RNA-Seq R • 549 views