Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

CI calculation added for odds ratio #1204

Merged
merged 8 commits into from
Nov 28, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,452 changes: 1,226 additions & 1,226 deletions analyses/interaction-plots/results/cooccur_top50.ALL.tsv

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
CTNNB1 DDX3X 5 7 4 118 21.071428571428573 1 2.4802290387181266e-4 0.004464412269692628 3.6055082120534396 12 9 8.955223880597014 6.7164179104477615 31.25 68.75
CTNNB1 KMT2D 2 10 6 116 3.8666666666666667 1 0.1521221251649965 0.608488500659986 0.8178076160701827 12 8 8.955223880597014 5.970149253731344 11.11111111111111 88.88888888888889
CTNNB1 TTN 0 12 7 115 0 -1 1 1 0 12 7 8.955223880597014 5.223880597014926 0 100
CTNNB1 TP53 5 7 2 120 42.857142857142854 1 4.540242466151527e-5 0.0016344872878145498 4.34292095355262 12 7 8.955223880597014 5.223880597014926 35.714285714285715 64.28571428571429
CTNNB1 KMT2C 0 12 7 115 0 -1 1 1 0 12 7 8.955223880597014 5.223880597014926 0 100
CTNNB1 KDM6A 0 12 6 116 0 -1 1 1 0 12 6 8.955223880597014 4.477611940298507 0 100
CTNNB1 PTCH1 0 12 5 117 0 -1 1 1 0 12 5 8.955223880597014 3.7313432835820897 0 100
CTNNB1 SMARCA4 3 9 2 120 20 1 0.005047038855497565 0.060564466265970784 2.2969633517626034 12 5 8.955223880597014 3.7313432835820897 21.428571428571427 78.57142857142857
DDX3X KMT2D 2 7 6 119 5.666666666666667 1 0.0911014729934339 0.4099566284704525 1.0404746009880497 9 8 6.7164179104477615 5.970149253731344 13.333333333333334 86.66666666666667
DDX3X TTN 2 7 5 120 6.857142857142857 1 0.07084119623043927 0.36432615204225915 1.1497141138866418 9 7 6.7164179104477615 5.223880597014926 14.285714285714286 85.71428571428571
DDX3X TP53 2 7 5 120 6.857142857142857 1 0.07084119623043927 0.36432615204225915 1.1497141138866418 9 7 6.7164179104477615 5.223880597014926 14.285714285714286 85.71428571428571
DDX3X KMT2C 1 8 6 119 2.4791666666666665 1 0.39247308984297946 0.7849461796859589 0.40619011556421364 9 7 6.7164179104477615 5.223880597014926 6.666666666666667 93.33333333333333
DDX3X KDM6A 0 9 6 119 0 -1 1 1 0 9 6 6.7164179104477615 4.477611940298507 0 100
DDX3X PTCH1 2 7 3 122 11.619047619047619 1 0.03626038814899659 0.26107479467277545 1.440567551314279 9 5 6.7164179104477615 3.7313432835820897 16.666666666666668 83.33333333333333
DDX3X SMARCA4 2 7 3 122 11.619047619047619 1 0.03626038814899659 0.26107479467277545 1.440567551314279 9 5 6.7164179104477615 3.7313432835820897 16.666666666666668 83.33333333333333
KMT2D TTN 1 7 6 120 2.857142857142857 1 0.3567362127749194 0.7554413917586529 0.44765280260428697 8 7 5.970149253731344 5.223880597014926 7.142857142857143 92.85714285714286
KMT2D TP53 1 7 6 120 2.857142857142857 1 0.3567362127749194 0.7554413917586529 0.44765280260428697 8 7 5.970149253731344 5.223880597014926 7.142857142857143 92.85714285714286
KMT2D KMT2C 1 7 6 120 2.857142857142857 1 0.3567362127749194 0.7554413917586529 0.44765280260428697 8 7 5.970149253731344 5.223880597014926 7.142857142857143 92.85714285714286
KMT2D KDM6A 0 8 6 120 0 -1 1 1 0 8 6 5.970149253731344 4.477611940298507 0 100
KMT2D PTCH1 0 8 5 121 0 -1 1 1 0 8 5 5.970149253731344 3.7313432835820897 0 100
KMT2D SMARCA4 1 7 4 122 4.357142857142857 1 0.2684868006432142 0.7554413917586529 0.5710770602389986 8 5 5.970149253731344 3.7313432835820897 8.333333333333334 91.66666666666667
TTN TP53 0 7 7 120 0 -1 0.9999999999999999 1 -4.8216373327664354e-17 7 7 5.223880597014926 5.223880597014926 0 100
TTN KMT2C 1 6 6 121 3.361111111111111 1 0.31921249185345635 0.7554413917586529 0.495920121591761 7 7 5.223880597014926 5.223880597014926 7.6923076923076925 92.3076923076923
TTN KDM6A 1 6 5 122 4.066666666666666 1 0.2798280905557226 0.7554413917586529 0.5531086909843053 7 6 5.223880597014926 4.477611940298507 8.333333333333334 91.66666666666667
TTN PTCH1 1 6 4 123 5.125 1 0.2385067514892475 0.7554413917586529 0.6224993227327814 7 5 5.223880597014926 3.7313432835820897 9.090909090909092 90.9090909090909
TTN SMARCA4 0 7 5 122 0 -1 1 1 0 7 5 5.223880597014926 3.7313432835820897 0 100
TP53 KMT2C 0 7 7 120 0 -1 0.9999999999999999 1 -4.8216373327664354e-17 7 7 5.223880597014926 5.223880597014926 0 100
TP53 KDM6A 0 7 6 121 0 -1 0.9999999999999999 1 -4.8216373327664354e-17 7 6 5.223880597014926 4.477611940298507 0 100
TP53 PTCH1 1 6 4 123 5.125 1 0.2385067514892475 0.7554413917586529 0.6224993227327814 7 5 5.223880597014926 3.7313432835820897 9.090909090909092 90.9090909090909
TP53 SMARCA4 0 7 5 122 0 -1 1 1 0 7 5 5.223880597014926 3.7313432835820897 0 100
KMT2C KDM6A 0 7 6 121 0 -1 0.9999999999999999 1 -4.8216373327664354e-17 7 6 5.223880597014926 4.477611940298507 0 100
KMT2C PTCH1 0 7 5 122 0 -1 1 1 0 7 5 5.223880597014926 3.7313432835820897 0 100
KMT2C SMARCA4 0 7 5 122 0 -1 1 1 0 7 5 5.223880597014926 3.7313432835820897 0 100
KDM6A PTCH1 0 6 5 123 0 -1 1 1 0 6 5 4.477611940298507 3.7313432835820897 0 100
KDM6A SMARCA4 0 6 5 123 0 -1 1 1 0 6 5 4.477611940298507 3.7313432835820897 0 100
PTCH1 SMARCA4 0 5 5 124 0 -1 1 1 0 5 5 3.7313432835820897 3.7313432835820897 0 100
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign standard_error_or or_ci_lower_bound or_ci_upper_bound p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
CTNNB1 DDX3X 5 7 4 118 21.071428571428573 1 0.7754558137820163 4.609063226573245 96.33304648131853 2.4802290387181266e-4 0.004464412269692628 3.6055082120534396 12 9 8.955223880597014 6.7164179104477615 31.25 68.75
CTNNB1 KMT2D 2 10 6 116 3.8666666666666667 1 0.8805040353807806 0.6883931950224624 21.718853729550965 0.1521221251649965 0.608488500659986 0.8178076160701827 12 8 8.955223880597014 5.970149253731344 11.11111111111111 88.88888888888889
CTNNB1 TTN 0 12 7 115 0 -1 Inf 0 NaN 1 1 0 12 7 8.955223880597014 5.223880597014926 0 100
CTNNB1 TP53 5 7 2 120 42.857142857142854 1 0.9225998461903602 7.025712454357049 261.43038244306246 4.540242466151527e-5 0.0016344872878145498 4.34292095355262 12 7 8.955223880597014 5.223880597014926 35.714285714285715 64.28571428571429
CTNNB1 KMT2C 0 12 7 115 0 -1 Inf 0 NaN 1 1 0 12 7 8.955223880597014 5.223880597014926 0 100
CTNNB1 KDM6A 0 12 6 116 0 -1 Inf 0 NaN 1 1 0 12 6 8.955223880597014 4.477611940298507 0 100
CTNNB1 PTCH1 0 12 5 117 0 -1 Inf 0 NaN 1 1 0 12 5 8.955223880597014 3.7313432835820897 0 100
CTNNB1 SMARCA4 3 9 2 120 20 1 0.9761033642897547 2.952256164442653 135.48959769062407 0.005047038855497565 0.060564466265970784 2.2969633517626034 12 5 8.955223880597014 3.7313432835820897 21.428571428571427 78.57142857142857
DDX3X KMT2D 2 7 6 119 5.666666666666667 1 0.9043932611803049 0.9627035674579348 33.355138795114314 0.0911014729934339 0.4099566284704525 1.0404746009880497 9 8 6.7164179104477615 5.970149253731344 13.333333333333334 86.66666666666667
DDX3X TTN 2 7 5 120 6.857142857142857 1 0.9225998461903601 1.1241139926971282 41.82886119088999 0.07084119623043927 0.36432615204225915 1.1497141138866418 9 7 6.7164179104477615 5.223880597014926 14.285714285714286 85.71428571428571
DDX3X TP53 2 7 5 120 6.857142857142857 1 0.9225998461903601 1.1241139926971282 41.82886119088999 0.07084119623043927 0.36432615204225915 1.1497141138866418 9 7 6.7164179104477615 5.223880597014926 14.285714285714286 85.71428571428571
DDX3X KMT2C 1 8 6 119 2.4791666666666665 1 1.1402061339999907 0.2653033102754288 23.166945616812196 0.39247308984297946 0.7849461796859589 0.40619011556421364 9 7 6.7164179104477615 5.223880597014926 6.666666666666667 93.33333333333333
DDX3X KDM6A 0 9 6 119 0 -1 Inf 0 NaN 1 1 0 9 6 6.7164179104477615 4.477611940298507 0 100
DDX3X PTCH1 2 7 3 122 11.619047619047619 1 0.9921628885933759 1.6619747868094552 81.23003347894597 0.03626038814899659 0.26107479467277545 1.440567551314279 9 5 6.7164179104477615 3.7313432835820897 16.666666666666668 83.33333333333333
DDX3X SMARCA4 2 7 3 122 11.619047619047619 1 0.9921628885933759 1.6619747868094552 81.23003347894597 0.03626038814899659 0.26107479467277545 1.440567551314279 9 5 6.7164179104477615 3.7313432835820897 16.666666666666668 83.33333333333333
KMT2D TTN 1 7 6 120 2.857142857142857 1 1.147979591655332 0.3011285963276379 27.108901000025064 0.3567362127749194 0.7554413917586529 0.44765280260428697 8 7 5.970149253731344 5.223880597014926 7.142857142857143 92.85714285714286
KMT2D TP53 1 7 6 120 2.857142857142857 1 1.147979591655332 0.3011285963276379 27.108901000025064 0.3567362127749194 0.7554413917586529 0.44765280260428697 8 7 5.970149253731344 5.223880597014926 7.142857142857143 92.85714285714286
KMT2D KMT2C 1 7 6 120 2.857142857142857 1 1.147979591655332 0.3011285963276379 27.108901000025064 0.3567362127749194 0.7554413917586529 0.44765280260428697 8 7 5.970149253731344 5.223880597014926 7.142857142857143 92.85714285714286
KMT2D KDM6A 0 8 6 120 0 -1 Inf 0 NaN 1 1 0 8 6 5.970149253731344 4.477611940298507 0 100
KMT2D PTCH1 0 8 5 121 0 -1 Inf 0 NaN 1 1 0 8 5 5.970149253731344 3.7313432835820897 0 100
KMT2D SMARCA4 1 7 4 122 4.357142857142857 1 1.1836612117361192 0.42820233899828086 44.33580143901838 0.2684868006432142 0.7554413917586529 0.5710770602389986 8 5 5.970149253731344 3.7313432835820897 8.333333333333334 91.66666666666667
TTN TP53 0 7 7 120 0 -1 Inf 0 NaN 0.9999999999999999 1 -4.8216373327664354e-17 7 7 5.223880597014926 5.223880597014926 0 100
TTN KMT2C 1 6 6 121 3.361111111111111 1 1.1582736274919025 0.34716861226553836 32.54057971287392 0.31921249185345635 0.7554413917586529 0.495920121591761 7 7 5.223880597014926 5.223880597014926 7.6923076923076925 92.3076923076923
TTN KDM6A 1 6 5 122 4.066666666666666 1 1.1725456869470554 0.4084581232727546 40.48830672106476 0.2798280905557226 0.7554413917586529 0.5531086909843053 7 6 5.223880597014926 4.477611940298507 8.333333333333334 91.66666666666667
TTN PTCH1 1 6 4 123 5.125 1 1.1936485026872357 0.49390082540293617 53.17995769408136 0.2385067514892475 0.7554413917586529 0.6224993227327814 7 5 5.223880597014926 3.7313432835820897 9.090909090909092 90.9090909090909
TTN SMARCA4 0 7 5 122 0 -1 Inf 0 NaN 1 1 0 7 5 5.223880597014926 3.7313432835820897 0 100
TP53 KMT2C 0 7 7 120 0 -1 Inf 0 NaN 0.9999999999999999 1 -4.8216373327664354e-17 7 7 5.223880597014926 5.223880597014926 0 100
TP53 KDM6A 0 7 6 121 0 -1 Inf 0 NaN 0.9999999999999999 1 -4.8216373327664354e-17 7 6 5.223880597014926 4.477611940298507 0 100
TP53 PTCH1 1 6 4 123 5.125 1 1.1936485026872357 0.49390082540293617 53.17995769408136 0.2385067514892475 0.7554413917586529 0.6224993227327814 7 5 5.223880597014926 3.7313432835820897 9.090909090909092 90.9090909090909
TP53 SMARCA4 0 7 5 122 0 -1 Inf 0 NaN 1 1 0 7 5 5.223880597014926 3.7313432835820897 0 100
KMT2C KDM6A 0 7 6 121 0 -1 Inf 0 NaN 0.9999999999999999 1 -4.8216373327664354e-17 7 6 5.223880597014926 4.477611940298507 0 100
KMT2C PTCH1 0 7 5 122 0 -1 Inf 0 NaN 1 1 0 7 5 5.223880597014926 3.7313432835820897 0 100
KMT2C SMARCA4 0 7 5 122 0 -1 Inf 0 NaN 1 1 0 7 5 5.223880597014926 3.7313432835820897 0 100
KDM6A PTCH1 0 6 5 123 0 -1 Inf 0 NaN 1 1 0 6 5 4.477611940298507 3.7313432835820897 0 100
KDM6A SMARCA4 0 6 5 123 0 -1 Inf 0 NaN 1 1 0 6 5 4.477611940298507 3.7313432835820897 0 100
PTCH1 SMARCA4 0 5 5 124 0 -1 Inf 0 NaN 1 1 0 5 5 3.7313432835820897 3.7313432835820897 0 100
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
NF2 SLC35A1 0 3 2 60 0 -1 1 1 0 3 2 4.615384615384615 3.076923076923077 0 100
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign standard_error_or or_ci_lower_bound or_ci_upper_bound p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
NF2 SLC35A1 0 3 2 60 0 -1 Inf 0 NaN 1 1 0 3 2 4.615384615384615 3.076923076923077 0 100
32 changes: 16 additions & 16 deletions analyses/interaction-plots/results/cooccur_top50.LGAT.tsv
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
BRAF FGFR1 0 42 7 163 0 -1 0.3493843776177437 1 -0.4566965179738428 42 7 19.81132075471698 3.30188679245283 0 100
BRAF BCOR 0 42 5 165 0 -1 0.5854914991868638 1 -0.23247940611345894 42 5 19.81132075471698 2.358490566037736 0 100
BRAF IDH1 0 42 5 165 0 -1 0.5854914991868638 1 -0.23247940611345894 42 5 19.81132075471698 2.358490566037736 0 100
BRAF NF1 1 41 4 166 1.0121951219512195 1 1 1 -0 42 5 19.81132075471698 2.358490566037736 2.1739130434782608 97.82608695652173
BRAF PIK3CA 0 42 5 165 0 -1 0.5854914991868638 1 -0.23247940611345894 42 5 19.81132075471698 2.358490566037736 0 100
FGFR1 BCOR 0 7 5 200 0 -1 1 1 0 7 5 3.30188679245283 2.358490566037736 0 100
FGFR1 IDH1 0 7 5 200 0 -1 1 1 0 7 5 3.30188679245283 2.358490566037736 0 100
FGFR1 NF1 2 5 3 202 26.933333333333334 1 0.008948537449269297 0.06711403086951973 2.048247940060156 7 5 3.30188679245283 2.358490566037736 20 80
FGFR1 PIK3CA 3 4 2 203 76.125 1 2.1717282703177644e-4 0.0032575924054766467 3.6631945152176697 7 5 3.30188679245283 2.358490566037736 33.333333333333336 66.66666666666667
BCOR IDH1 0 5 5 202 0 -1 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
BCOR NF1 0 5 5 202 0 -1 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
BCOR PIK3CA 1 4 4 203 12.6875 1 0.11351702328225664 0.5675851164112832 0.9449390057556558 5 5 2.358490566037736 2.358490566037736 11.11111111111111 88.88888888888889
IDH1 NF1 0 5 5 202 0 -1 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
IDH1 PIK3CA 0 5 5 202 0 -1 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
NF1 PIK3CA 0 5 5 202 0 -1 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign standard_error_or or_ci_lower_bound or_ci_upper_bound p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
BRAF FGFR1 0 42 7 163 0 -1 Inf 0 NaN 0.3493843776177437 1 -0.4566965179738428 42 7 19.81132075471698 3.30188679245283 0 100
BRAF BCOR 0 42 5 165 0 -1 Inf 0 NaN 0.5854914991868638 1 -0.23247940611345894 42 5 19.81132075471698 2.358490566037736 0 100
BRAF IDH1 0 42 5 165 0 -1 Inf 0 NaN 0.5854914991868638 1 -0.23247940611345894 42 5 19.81132075471698 2.358490566037736 0 100
BRAF NF1 1 41 4 166 1.0121951219512195 1 1.1315539493492925 0.11017069092647945 9.299560130611807 1 1 -0 42 5 19.81132075471698 2.358490566037736 2.1739130434782608 97.82608695652173
BRAF PIK3CA 0 42 5 165 0 -1 Inf 0 NaN 0.5854914991868638 1 -0.23247940611345894 42 5 19.81132075471698 2.358490566037736 0 100
FGFR1 BCOR 0 7 5 200 0 -1 Inf 0 NaN 1 1 0 7 5 3.30188679245283 2.358490566037736 0 100
FGFR1 IDH1 0 7 5 200 0 -1 Inf 0 NaN 1 1 0 7 5 3.30188679245283 2.358490566037736 0 100
FGFR1 NF1 2 5 3 202 26.933333333333334 1 1.018962132948442 3.655375764565557 198.4486660650219 0.008948537449269297 0.06711403086951973 2.048247940060156 7 5 3.30188679245283 2.358490566037736 20 80
FGFR1 PIK3CA 3 4 2 203 76.125 1 1.0431967416109569 9.852360907185602 588.1854795608971 2.1717282703177644e-4 0.0032575924054766467 3.6631945152176697 7 5 3.30188679245283 2.358490566037736 33.333333333333336 66.66666666666667
BCOR IDH1 0 5 5 202 0 -1 Inf 0 NaN 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
BCOR NF1 0 5 5 202 0 -1 Inf 0 NaN 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
BCOR PIK3CA 1 4 4 203 12.6875 1 1.2267542982905681 1.1458867966750483 140.47867269008134 0.11351702328225664 0.5675851164112832 0.9449390057556558 5 5 2.358490566037736 2.358490566037736 11.11111111111111 88.88888888888889
IDH1 NF1 0 5 5 202 0 -1 Inf 0 NaN 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
IDH1 PIK3CA 0 5 5 202 0 -1 Inf 0 NaN 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
NF1 PIK3CA 0 5 5 202 0 -1 Inf 0 NaN 1 1 0 5 5 2.358490566037736 2.358490566037736 0 100
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
NF2 MYH4 2 5 0 12 Inf 1 0.1228070175438596 0.1228070175438596 0.9107768156582348 7 2 36.8421052631579 10.526315789473685 28.571428571428573 71.42857142857143
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign standard_error_or or_ci_lower_bound or_ci_upper_bound p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
NF2 MYH4 2 5 0 12 Inf 1 Inf NaN Inf 0.1228070175438596 0.1228070175438596 0.9107768156582348 7 2 36.8421052631579 10.526315789473685 28.571428571428573 71.42857142857143
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
FGFR1 PDGFRA 0 4 2 20 0 -1 1.0000000000000002 1.0000000000000002 9.64327466553287e-17 4 2 15.384615384615385 7.6923076923076925 0 100
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign standard_error_or or_ci_lower_bound or_ci_upper_bound p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
FGFR1 PDGFRA 0 4 2 20 0 -1 Inf 0 NaN 1.0000000000000002 1.0000000000000002 9.64327466553287e-17 4 2 15.384615384615385 7.6923076923076925 0 100
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
CTNNB1 PHLPP1 1 21 1 5 0.23809523809523808 -1 0.3888888888888889 0.3888888888888889 -0.4101744650890492 22 2 78.57142857142857 7.142857142857143 4.3478260869565215 95.65217391304348
gene1 gene2 mut11 mut10 mut01 mut00 odds_ratio cooccur_sign standard_error_or or_ci_lower_bound or_ci_upper_bound p q cooccur_score n_mutated_gene1 n_mutated_gene2 perc_mutated_gene1 perc_mutated_gene2 perc_cooccur perc_mutexcl
CTNNB1 PHLPP1 1 21 1 5 0.23809523809523808 -1 1.499206139134658 0.012606678597958023 4.496770657166622 0.3888888888888889 0.3888888888888889 -0.4101744650890492 22 2 78.57142857142857 7.142857142857143 4.3478260869565215 95.65217391304348
9 changes: 8 additions & 1 deletion analyses/interaction-plots/scripts/cooccur_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ filter_mutations <- function(maf_df,
#' `gene1`; `gene2` (gene names);
#' `mut11`; `mut10`; `mut01` (counts of mutations in each category of sharing:
#' `mut11`: both mutated; `mut10`: mutated in the first but not second gene, etc.);
#' `odds_ratio` (odds ratio for for co-occurence);
#' `odds_ratio` (odds ratio for co-occurence);
#' `standard_error_or` (standard error of the odds ratio for co-occurence);
#' `or_ci_lower_bound` (lower bound of the confidence interval for odds ratio for co-occurence );
#' `or_ci_upper_bound` (upper bound of the confidence interval for odds ratio for co-occurence);
#' `cooccur_sign` (1 if co-occurence greater than by chance, -1 if less frequent than expected)
#' `p` (the fisher's exact test p value);
#' `q` (Benjamini-Hochberg adjusted p value);
Expand Down Expand Up @@ -152,6 +155,10 @@ coocurrence <- function(gene_sample_df,
odds_ratio = (mut11 * mut00) / (mut10 * mut01),
cooccur_sign = ifelse(odds_ratio > 1, 1, -1)
) %>%
dplyr::mutate(
standard_error_or = sqrt(1/mut11 + 1/mut00 + 1/mut10 + 1/mut01),
or_ci_lower_bound = exp(log(odds_ratio) - 1.96 * standard_error_or),
or_ci_upper_bound = exp(log(odds_ratio) + 1.96 * standard_error_or)) %>%
dplyr::rowwise() %>%
dplyr::mutate(p = row_fisher(mut11, mut10, mut01, mut00)) %>%
dplyr::ungroup() %>%
Expand Down