From c9db82f2fc087d269285d7e6e61e27568ef412e7 Mon Sep 17 00:00:00 2001 From: marinaEM Date: Fri, 23 Feb 2024 18:39:50 +0100 Subject: [PATCH] seeds-reproducibility RWR --- examples/DTSEA_comparison/DTSEA_test.R | 22 ++++++++++-------- .../summary_DTSEAcomparisonFA.csv.gz | Bin 496 -> 0 bytes .../summary_DTSEAcomparisonFA.zip | Bin 785 -> 720 bytes .../summary_DTSEAcomparisonFA_curated.csv | 9 +++++++ .../summary_DTSEAcomparisonFA_curated.zip | Bin 749 -> 742 bytes .../summary_DTSEAcomparisonFM.zip | Bin 889 -> 956 bytes .../summary_DTSEAcomparisonFM_curated.csv | 17 ++++++++++++++ .../summary_DTSEAcomparisonFM_curated.zip | Bin 853 -> 978 bytes summary_DTSEAcomparisonFA.gz | Bin 20 -> 0 bytes 9 files changed, 38 insertions(+), 10 deletions(-) delete mode 100644 examples/DTSEA_comparison/summary_DTSEAcomparisonFA.csv.gz create mode 100644 examples/DTSEA_comparison/summary_DTSEAcomparisonFA_curated.csv create mode 100644 examples/DTSEA_comparison/summary_DTSEAcomparisonFM_curated.csv delete mode 100644 summary_DTSEAcomparisonFA.gz diff --git a/examples/DTSEA_comparison/DTSEA_test.R b/examples/DTSEA_comparison/DTSEA_test.R index a0adf57..dccae6e 100644 --- a/examples/DTSEA_comparison/DTSEA_test.R +++ b/examples/DTSEA_comparison/DTSEA_test.R @@ -14,7 +14,7 @@ if (!require(pacman, quietly = TRUE)){ library(pacman) -p_load(magrittr, dplyr, BiocManager, devtools, here, ggplot2) +p_load(magrittr, dplyr, BiocManager, devtools, here, ggplot2, tibble) # Install the required packages for DTSEA and DisGeNet @@ -51,14 +51,15 @@ colnames(drug_targets)<- gsub("drugbank_id", "drug_id", colnames(drug_targets)) ############## # Perform a simple DTSEA analysis using default optional parameters then sort # the result dataframe by normalized enrichment scores (NES) +set.seed(234) result_FA <- DTSEA(network = graph, disease = FA_signature$Gene, drugs = drug_targets, verbose = FALSE) %>% arrange(desc(NES)) relevantFA_results <- select(result_FA, -leadingEdge) %>% arrange(desc(NES)) %>% filter(NES > 0 & padj < .01) -NES_FAdrug_targets <- relevantFA_results[,c(1,2,6)] %>% add_column(target = drug_targets$gene_target[match(relevantFA_results$drug_id, drug_targets$drug_id)]) %>% +NES_FAdrug_targets <- relevantFA_results[,c(1,3,6)] %>% add_column(target = drug_targets$gene_target[match(relevantFA_results$drug_id, drug_targets$drug_id)]) %>% add_column(drug = drug_targets$drug_name[match(relevantFA_results$drug_id, drug_targets$drug_id)]) -length(unique(NES_FAdrug_targets$target)) ## 54 unique targets +length(unique(NES_FAdrug_targets$target)) ## 52 unique targets ############ @@ -66,14 +67,15 @@ length(unique(NES_FAdrug_targets$target)) ## 54 unique targets ############## # Perform a simple DTSEA analysis using default optional parameters then sort # the result dataframe by normalized enrichment scores (NES) +set.seed(234) result_FM <- DTSEA(network = graph, disease = FM_signature$symbol, drugs = drug_targets, verbose = FALSE) %>% arrange(desc(NES)) relevantFM_results <- select(result_FM, -leadingEdge) %>% arrange(desc(NES)) %>% filter(NES > 0 & padj < .01) -NES_FMdrug_targets <- relevantFM_results[,c(1,2,6)] %>% add_column(target = drug_targets$gene_target[match(relevantFM_results$drug_id, drug_targets$drug_id)]) %>% +NES_FMdrug_targets <- relevantFM_results[,c(1,3,6)] %>% add_column(target = drug_targets$gene_target[match(relevantFM_results$drug_id, drug_targets$drug_id)]) %>% add_column(drug = drug_targets$drug_name[match(relevantFM_results$drug_id, drug_targets$drug_id)]) -length(unique(NES_FMdrug_targets$target)) ## 85 unique targets +length(unique(NES_FMdrug_targets$target)) ## 91 unique targets ############################### @@ -87,12 +89,12 @@ length(unique(NES_FMdrug_targets$target)) ## 85 unique targets ### 1. Load relevant filtered drexml results FA_drexml<- read.delim(gzfile(here("examples", "fanconi_anemia" , "results","shap_filtered_stability_symbol.tsv.gz"))) %>% column_to_rownames("circuit_name") -overlapFA <- colnames(FA_drexml)[colnames(FA_drexml) %in% NES_FAdrug_targets$target] ## 7 overlap +overlapFA <- colnames(FA_drexml)[colnames(FA_drexml) %in% NES_FAdrug_targets$target] ## 6 overlap ### 2. Rank targets in NES_FAdrug_targets based on p-value nes_fa_ranks <- NES_FAdrug_targets %>% mutate(rank_nes_fa = row_number()) %>% - select(drug_id, drug ,target, pval, NES, rank_nes_fa) %>% + select(drug_id, drug ,target, padj, NES, rank_nes_fa) %>% filter(target %in% overlapFA) ### 3. Calculate mean absolute SHAP values and count relevant circuits for all targets @@ -109,7 +111,7 @@ FA_stats_df <- as.data.frame(t(FA_stats), stringsAsFactors = FALSE) %>% ### 4. Create summarisation table -summary_DTSEAcomparisonFA <- merge(nes_fa_ranks, FA_stats_df, by = "target", all.x = TRUE) %>% .[order(.$pval,decreasing = F),] +summary_DTSEAcomparisonFA <- merge(nes_fa_ranks, FA_stats_df, by = "target", all.x = TRUE) %>% .[order(.$padj,decreasing = F),] write.table( summary_DTSEAcomparisonFA, here("examples", "DTSEA_comparison" ,"summary_DTSEAcomparisonFA.tsv"), sep="\t", quote = F, row.names = F, col.names = T) ### 5. Compare with cmap results @@ -130,7 +132,7 @@ overlapFM <- colnames(FM_drexml)[colnames(FM_drexml) %in% NES_FMdrug_targets$tar ### 2. Rank targets in NES_FAdrug_targets based on p-value nes_fm_ranks <- NES_FMdrug_targets %>% mutate(rank_nes_fm = row_number()) %>% - select(drug_id, drug ,target, pval, NES, rank_nes_fm) %>% + select(drug_id, drug ,target, padj, NES, rank_nes_fm) %>% filter(target %in% overlapFM) ### 3. Calculate mean absolute SHAP values and count relevant circuits for all targets @@ -147,7 +149,7 @@ FM_stats_df <- as.data.frame(t(FM_stats), stringsAsFactors = FALSE) %>% ### 4. Create summarisation table -summary_DTSEAcomparisonFM <- merge(nes_fm_ranks, FM_stats_df, by = "target", all.x = TRUE) %>% .[order(.$pval,decreasing = F),] +summary_DTSEAcomparisonFM <- merge(nes_fm_ranks, FM_stats_df, by = "target", all.x = TRUE) %>% .[order(.$padj,decreasing = F),] write.table( summary_DTSEAcomparisonFM, here("examples", "DTSEA_comparison" ,"summary_DTSEAcomparisonFM.tsv"), sep="\t" ,quote = F, row.names = F, col.names = T) ### 5. Compare with cmap results diff --git a/examples/DTSEA_comparison/summary_DTSEAcomparisonFA.csv.gz b/examples/DTSEA_comparison/summary_DTSEAcomparisonFA.csv.gz deleted file mode 100644 index 04eea8c729296a462dd2f7cea08e88ed95ce3087..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 496 zcmVzmDP{cXnV z*Ji$1&tG@z-S_zp^NZ{4#l!Xe4r{lMoAvL__O`8>W9R(cdwqR`!O8QUqR!iPDnHO*01ZGt?vqOiqb_aN0wK ziXb48N4a)hwE@_tvy&$zISOveZ3)zl^C(mbNXH@%9|b8^kZN58NcdCaN+V=2cpR&S zO55rA>0YFU!%Ul$ltp2wL(_O7@>Hlm3c51@rC`P)fP?~F!Wh)jEr8OfWXyyOi4A)xAlTOq-u`VQ_K3g4r4!i( m6j=#sf}Ivhi4JqN%AQY|$AFt^f}~Qrj@2I?E|C~V0{{Rk|N1=u diff --git a/examples/DTSEA_comparison/summary_DTSEAcomparisonFA.zip b/examples/DTSEA_comparison/summary_DTSEAcomparisonFA.zip index a0f90549ef617cd747adfab9f52c97fa683c6ff6..d33a772176aa9f37f17536b06a6fa51098cc6cd0 100644 GIT binary patch delta 615 zcmbQpc7atqz?+#xgnsU{hU7Q$y{dyeVQ^k;$0QnsE^0Xk2nQ9us0S~WV=Ui%S)>%^e=jV?b z$+CH~4d1pMzg@a}_Wzd)-_}!@ml`pQp#GOC?V1Wb{aHp_=gbxUNsU&4!|C688l zikUY?`&wuyTEA|8R&c+}{rlN~=~U(rV!AL#=B@_w z*%Xr#s;$jCrH@W<+bOXs-EYT_x>B*di|%N~zQ4ULPww$=Ewg~K(=is#GZ#cCDY2WD zDtYQGEH-LCv!GR^x#OuW|AQGCYrpyb-FA2D?Cph}I#*V`dm}tqw_31U^UUNA)+=M; z;{9e8oSbp)d;R&_&l7iK$KQGz$onJ4`Q4$L0?G_xo;ym6T~jYDl1OO2kfI+0C0z?+#xgn?%lbzZJ(B};8-}VsMoBMvHOafUlZ5-edkwRk`_O{v8?{{v%T9_ zKTh7g`0I}Pn3C6r_4n?%#(Q_p|0Ns0o$uavS5HpsZ(jEP6{p`O{SJxGxZ1nAwtoBV zN2fpB(z|!NaK_!ZTK@R+FW!V4>ArAwPSWH^ufTr8!izWR9{SvBNqA(*W`1pjO6QKi zIUlBMS~_X6_RjO?^!4j}Os3`t`$|1cSa;Fe#8Yw$%dBYv1x=ThpVpZ}}u#p`u>cENc!&fZ+adcO0i z#aR>Mw$AKx5pDl{gY|e)Z>mm}@JK5+7oTxd@b=}m%U-`O>VM91fycXm^>;R->7&I< zW^koM9h7o&bZpISO@1)NlykzQ^y}NNUuIHtUwHcL?N_-n^LKsED-8-iackD($-j48ozz_E$0tQnx`87QmN1kUVoteX-Lcm|DzLnuWp5#-v`SX zO1}Iem)__Hc(Ze4hsg1(GBGd|0#i?bHzSh>Ga|tu%gHh*z|tSXmPUrjRZObfu=EF{ PC$C~sV4DCmhk*eAG}k@N diff --git a/examples/DTSEA_comparison/summary_DTSEAcomparisonFA_curated.csv b/examples/DTSEA_comparison/summary_DTSEAcomparisonFA_curated.csv new file mode 100644 index 0000000..742ad17 --- /dev/null +++ b/examples/DTSEA_comparison/summary_DTSEAcomparisonFA_curated.csv @@ -0,0 +1,9 @@ +target drug_id drug padj NES rank_nes_overall mean_abs_shap circuits_above_zero +PIK3CD DB11891 Fimepinostat 5.86409023807469E-05 2.35164642871307 17 0.256086674697682 88 +EGFR DB12174 CUDC-101 0.000107047195274 2.30956196828472 18 0.00192081948265 4 +VEGFA DB10772 Foreskin keratinocyte (neonatal) 0.000605901166843 2.25022081918057 22 0.00120908257817 1 +TNF DB05992 Plinabulin 0.001806398537351 2.17902906869224 34 0.92890530672613 117 +EGFR DB03496 Alvocidib 0.001922283066699 2.1385974800089 43 0.00192081948265 4 +LPL DB13751 Glycyrrhizic acid 0.002994358115833 1.98861632676143 80 0.119130985152545 41 +TUBB3 DB04845 Ixabepilone 0.003973089808473 2.12724378082689 46 0.059374744208029 19 +VEGFA DB05294 Vandetanib 0.006768006463629 2.06043311812418 65 0.00120908257817 1 diff --git a/examples/DTSEA_comparison/summary_DTSEAcomparisonFA_curated.zip b/examples/DTSEA_comparison/summary_DTSEAcomparisonFA_curated.zip index f514b1717fe2c7fe6a49b2d5adf5efc3d387d229..fd0fec374627ffecfc18577496f05994fe6f2272 100644 GIT binary patch literal 742 zcmWIWW@Zs#-~hs)$>9+UP{72@z@W;Yz))P8o10iv8SfGj?CO}DpIeYvlv$jg=jIrn zTw0V^lA5BITwE3!!pp$!d-XFxm-zGa*PVAob4xXLZC`cX_i^0nJ7Sf^8hrYd?@#U0@Bdn`L7Z9SedvAPYvuNT zY95Liy9Ac3{=|(5j?Rl@v^83o-CNRATUF0v;_%U%)jz~mAXVd3{0bYv)Yzvg! z-V0n#7kJRTX?NzmU7PM*o9*B4l9Z8lb>cbXy7kbrtyj`nMt5e4oR)#ajNg z|AY2le;R6bub6Qqn>?#wmpNy!Xkv>09EslG0|6PD5$}WygLsZ*pOa5Fw&&ta;xDiN zd@O9?%UiE}UYS-3t0ovr9d_{&so7-xam7^kkdXOKTnAZZbG84f&k^u!u0Hj4n^e*7 z#QQ8WL!;Hso7~#o$of84cw$p-5@MdKL8O8{N#Xvfi3B&^caxNxA delta 644 zcmaFH`j%BZz?+#xgn^Ij_?*TE0F0J5ZU}Sm0 z%)kI9N+)^y-*yl zQp^4K|J~nq=k006vb%}<*OeWYzIU&fcl&hv1*gxR-lh5bYjE3jBlFjLUS9uOT-RKm zdo`E;>IHxG^6U5CBypa$oT$=t^l(w3pGUxt$RnrqCAb#|@GLgIw{RaL@9zd7rxL}Z z3Oq`ePd>f+>bFN?7hl-b?4Mz#x%N*Oxn_Oz5K^5fa$-jU??z^!RK=hq5idWB9U@FS zUOoxT6j$a=PKnqWdvkxt*_+-spE_>5-M_F!ss3Dm-;F0d9wD`I68=8NS`OK9wLa0k zP*POCJ4or*6p44QR-K&PJTKrw&)TFQ#(PzdYYi?cMTGe!dA`tXJJBfORA{wx=WfZ? zn=d%mz3PAKe%&^F|Ejl<_p<)A&W^OXc&=GoxyOBV;TEqcCz6Ex=ee)#`**Z0Z0%v! zzxTA3-s*W-Z#>^3#YXk<(M)zJzS?Ow{~oT%bDtud8vp-{^x6e^(!N?}UH)|_DNpO& zx{59I;EiQ&NsGJBX$nOu1^l|tQ02!bSG-xf{mzO_AInpEtQar3OD$)xV%oa$?JJ3< z-)kDX*B@`4&@Z@dcI?*tt!HAd%D-B^?dR+V6Z6+97ddhlc3yRqll0DE>QsF1&?kF* zL1fhNs7VnU60Lsn26(e`Je+Cs<0B&j0}n7I1b8zti7+D)5nOI^8I!p%mQ*zP0Fwe+ J3KJ-;0RWFeB+vi= diff --git a/examples/DTSEA_comparison/summary_DTSEAcomparisonFM.zip b/examples/DTSEA_comparison/summary_DTSEAcomparisonFM.zip index 26ca22d1ba12ca9d26e8a8b9b3d8a0082d26a5de..3ceb7c9d86d067fbbf55dc3493930c58a312bbf0 100644 GIT binary patch delta 882 zcmey#wufCJz?+#xgnjM*ZE5GIl%9zHOHF{$F|9eEHkQo2&D@_UrDx{O!v| znY;D-WWUGXdfB3W_CExp$A)XEi3T zKYG(5d(IXG$e=^BbT0P~7T;E%ZFV5lLE;snB<~k#0x0;R1?9V0l8E1NYZd&Y^ za;`{QKP!vZL-3Q z9xY9dh#t3MpE)1JtgADnA2#HqbahDaXsQs!i;QCF^S+ulVWW$QyHN z)eGip32M9kcug^1J^Spb_2;EuwcfdV!)9vi%Ul0=zS*gJPMjFO$f7yY=1THuUfJ}u z&jgn(s_8mmGUN3Bhf137?=e>8RC(;n`n5^_F<w5{H*`8QF2<;iuS$855OV0~wXgNo0?slGoZns@!($1NoEj-SEsheN4o#yOkf zFKJsfI`_v!rk2i5%vsj|HuF&Yxzne#*z>K*TfIeIuWinAZsv59(A#iB+ezP0rL?~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AcomparisonFA.gz deleted file mode 100644 index 229151a5a27ab0cc4661f529cc0eda27e3c03e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20 Rcmb2|=3oE=W@ZQtBmoVe0J#7F