R package NetFeaturePval

Find Features Enriched among Nodes that Interact with Each Single Node

This package lets you find features (node Z) of nodes (node Y) that all interact with one node (node X), this is repeated for all nodes in the network and done using a single function call:

# Install:
install.packages("devtools")
devtools::install_github("vitkl/NetFeaturePval", dependencies = T)

# Run analysis
res = permutationPval(interactions2permute = nodeX ~ nodeY,
  associations2test = nodeX ~ nodeZ, node_attr = NULL,
  data, statistic = nodeX + nodeZ ~ .N, select_nodes = NULL, N = 1000,
  cores = NULL, seed = NULL, also_permuteYZ = F, clustermq = F)
# plot p-value distribution (histogram)
plot(res)

One use case is predicting proteins domains that mediate binding of other proteins to a seed protein:
Vignette: Predict protein domains likely to mediate binding

This is done by computing a statistic that can be as simple as count of nodes (Y) with a given feature (Z) among all nodes that interact with node X. Formula interface allows defining any statistic needed.
As a next step, a specified number of random networks are generated by permuting X-Y interactions or both X-Y and Y-Z interactions. These random networks are used to calculate calculate an empirical p-value telling how often the observed stastistic or larger seen in these random networks.

Two parallelisation strategies are implemented:

  • multi-core parallel procession using parLapply.
  • multi-node parallel processing on a computing cluster using clustermq package.