MSstatsBioNet 1.1.7
Run this code below to install MSstatsBioNet from bioconductor
if (!require("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("MSstatsBioNet")
We will be taking a subset of the dataset found in this paper. The table is the output of the MSstatsPTM function groupComparisonPTM
(filtered down to the columns that are actually needed)
input = data.table::fread(system.file(
"extdata/garrido-2024.csv",
package = "MSstatsBioNet"
))
head(input)
#> Protein Label log2FC SE DF pvalue
#> <char> <char> <num> <num> <int> <num>
#> 1: P00533_S1039_S1042 t0 vs t1 -0.3200363 0.14994312 9 0.061580951
#> 2: P00533_S1064 t0 vs t1 0.3566531 0.08915347 9 0.003108364
#> 3: P00533_S991_S995 t0 vs t1 -0.1229037 0.10858298 9 0.286937655
#> 4: P00533_T693 t0 vs t1 -0.0233444 0.17724459 9 0.898113182
#> 5: P00533_T693_S695 t0 vs t1 -0.1659957 0.15000754 9 0.297173769
#> 6: P00533_Y1110 t0 vs t1 0.2106324 0.09279031 9 0.049364434
#> adj.pvalue issue
#> <num> <lgcl>
#> 1: 0.28024590 NA
#> 2: 0.06863598 NA
#> 3: 0.57907374 NA
#> 4: 0.96083634 NA
#> 5: 0.58809108 NA
#> 6: 0.25258914 NA
First, we need to convert the group comparison results to a format that can be
processed by INDRA. We can use the annotateProteinInfoFromIndra
function
to obtain these mappings.
In the below example, we convert uniprot IDs to their corresponding Hgnc IDs. We can also extract other information, such as hgnc gene name and protein function.
library(MSstatsBioNet)
annotated_df = annotateProteinInfoFromIndra(input, "Uniprot")
head(annotated_df)
#> Protein Label log2FC SE DF pvalue
#> <char> <char> <num> <num> <int> <num>
#> 1: P00533_S1039_S1042 t0 vs t1 -0.3200363 0.14994312 9 0.061580951
#> 2: P00533_S1064 t0 vs t1 0.3566531 0.08915347 9 0.003108364
#> 3: P00533_S991_S995 t0 vs t1 -0.1229037 0.10858298 9 0.286937655
#> 4: P00533_T693 t0 vs t1 -0.0233444 0.17724459 9 0.898113182
#> 5: P00533_T693_S695 t0 vs t1 -0.1659957 0.15000754 9 0.297173769
#> 6: P00533_Y1110 t0 vs t1 0.2106324 0.09279031 9 0.049364434
#> adj.pvalue issue GlobalProtein UniprotId HgncId HgncName
#> <num> <lgcl> <char> <char> <char> <char>
#> 1: 0.28024590 NA P00533 P00533 3236 EGFR
#> 2: 0.06863598 NA P00533 P00533 3236 EGFR
#> 3: 0.57907374 NA P00533 P00533 3236 EGFR
#> 4: 0.96083634 NA P00533 P00533 3236 EGFR
#> 5: 0.58809108 NA P00533 P00533 3236 EGFR
#> 6: 0.25258914 NA P00533 P00533 3236 EGFR
#> IsTranscriptionFactor IsKinase IsPhosphatase
#> <lgcl> <lgcl> <lgcl>
#> 1: FALSE TRUE FALSE
#> 2: FALSE TRUE FALSE
#> 3: FALSE TRUE FALSE
#> 4: FALSE TRUE FALSE
#> 5: FALSE TRUE FALSE
#> 6: FALSE TRUE FALSE
The package provides a function getSubnetworkFromIndra
that retrieves a
subnetwork of proteins from the INDRA database based on differential abundance
analysis results. This function may help finding off target subnetworks.
subnetwork <- getSubnetworkFromIndra(annotated_df, pvalueCutoff = 0.05, statement_types = c("Phosphorylation"), logfc_cutoff = 1, force_include_proteins = c("P00533_Y1110"))
#> Warning in getSubnetworkFromIndra(annotated_df, pvalueCutoff = 0.05, statement_types = c("Phosphorylation"), : NOTICE: This function includes third-party software components
#> that are licensed under the BSD 2-Clause License. Please ensure to
#> include the third-party licensing agreements if redistributing this
#> package or utilizing the results based on this package.
#> See the LICENSE file for more details.
head(subnetwork$nodes)
#> id hgncName Site logFC adj.pvalue
#> <char> <char> <char> <num> <num>
#> 1: P00533 EGFR Y1110 0.2106324 0.2525891386
#> 2: P28482 MAPK1 Y187 1.1379894 0.0138506355
#> 3: Q13480 GAB1 S650_S651_Y659 1.4252333 0.0050364009
#> 4: Q13480 GAB1 S651_Y659 1.3470807 0.0447363036
#> 5: Q13480 GAB1 Y627_T638 2.5847134 0.0032951498
#> 6: Q13480 GAB1 Y659 2.9336603 0.0003464872
head(subnetwork$edges)
#> source target site interaction evidenceCount paperCount
#> 1 Q13480 P00533 <NA> Phosphorylation 2 1
#> 2 P00533 P28482 <NA> Phosphorylation 8 3
#> 3 P00533 Q13480 Y317 Phosphorylation 1 1
#> 4 P00533 Q13480 <NA> Phosphorylation 32 4
#> 5 P00533 Q13480 Y659 Phosphorylation 14 2
#> 6 P28482 Q13480 S454 Phosphorylation 3 1
#> evidenceLink
#> 1 https://db.indra.bio/statements/from_agents?subject=4066@HGNC&object=3236@HGNC&format=html
#> 2 https://db.indra.bio/statements/from_agents?subject=3236@HGNC&object=6871@HGNC&format=html
#> 3 https://db.indra.bio/statements/from_agents?subject=3236@HGNC&object=4066@HGNC&format=html
#> 4 https://db.indra.bio/statements/from_agents?subject=3236@HGNC&object=4066@HGNC&format=html
#> 5 https://db.indra.bio/statements/from_agents?subject=3236@HGNC&object=4066@HGNC&format=html
#> 6 https://db.indra.bio/statements/from_agents?subject=6871@HGNC&object=4066@HGNC&format=html
#> sourceCounts
#> 1 {"sparser": 1, "reach": 1}
#> 2 {"reach": 1}
#> 3 {"rlimsp": 1}
#> 4 {"reach": 2}
#> 5 {"bel_lc": 2}
#> 6 {"hprd": 2, "signor": 1}
Visualize the subnetwork on your browser
previewNetworkInBrowser(subnetwork$nodes, subnetwork$edges, displayLabelType = "hgncName")
#> Network visualization exported to: /tmp/Rtmp3IdFp6/file22ad3e7d4282e8.html
sessionInfo()
#> R version 4.5.1 Patched (2025-08-23 r88802)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.3 LTS
#>
#> Matrix products: default
#> BLAS: /home/biocbuild/bbs-3.22-bioc/R/lib/libRblas.so
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0 LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_GB LC_COLLATE=C
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: America/New_York
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] MSstatsBioNet_1.1.7 MSstats_4.17.1 MSstatsConvert_1.19.3
#> [4] BiocStyle_2.37.1
#>
#> loaded via a namespace (and not attached):
#> [1] tidyselect_1.2.1 viridisLite_0.4.2 IRdisplay_1.1
#> [4] dplyr_1.1.4 farver_2.1.2 S7_0.2.0
#> [7] bitops_1.0-9 fastmap_1.2.0 lazyeval_0.2.2
#> [10] RCurl_1.98-1.17 base64url_1.4 XML_3.99-0.19
#> [13] digest_0.6.37 lifecycle_1.0.4 survival_3.8-3
#> [16] statmod_1.5.0 r2r_0.1.2 magrittr_2.0.4
#> [19] compiler_4.5.1 rlang_1.1.6 sass_0.4.10
#> [22] tools_4.5.1 yaml_2.3.10 data.table_1.17.8
#> [25] knitr_1.50 htmlwidgets_1.6.4 curl_7.0.0
#> [28] marray_1.87.0 repr_1.1.7 RColorBrewer_1.1-3
#> [31] KernSmooth_2.23-26 pbdZMQ_0.3-14 purrr_1.1.0
#> [34] BiocGenerics_0.55.1 stats4_4.5.1 grid_4.5.1
#> [37] preprocessCore_1.71.2 caTools_1.18.3 log4r_0.4.4
#> [40] ggplot2_4.0.0 scales_1.4.0 gtools_3.9.5
#> [43] MASS_7.3-65 dichromat_2.0-0.1 cli_3.6.5
#> [46] rmarkdown_2.30 crayon_1.5.3 reformulas_0.4.1
#> [49] generics_0.1.4 httr_1.4.7 minqa_1.2.8
#> [52] cachem_1.1.0 splines_4.5.1 parallel_4.5.1
#> [55] BiocManager_1.30.26 base64enc_0.1-3 vctrs_0.6.5
#> [58] boot_1.3-32 Matrix_1.7-4 jsonlite_2.0.0
#> [61] bookdown_0.45 ggrepel_0.9.6 limma_3.65.5
#> [64] plotly_4.11.0 tidyr_1.3.1 jquerylib_0.1.4
#> [67] glue_1.8.0 nloptr_2.2.1 RJSONIO_2.0.0
#> [70] stringi_1.8.7 gtable_0.3.6 lme4_1.1-37
#> [73] tibble_3.3.0 pillar_1.11.1 htmltools_0.5.8.1
#> [76] gplots_3.2.0 RCy3_2.29.1 graph_1.87.0
#> [79] IRkernel_1.3.2 R6_2.6.1 Rdpack_2.6.4
#> [82] evaluate_1.0.5 lattice_0.22-7 rbibutils_2.3
#> [85] backports_1.5.0 bslib_0.9.0 Rcpp_1.1.0
#> [88] uuid_1.2-1 nlme_3.1-168 checkmate_2.3.3
#> [91] xfun_0.53 fs_1.6.6 pkgconfig_2.0.3