Skip to contents

Calculate and plot a local subnetwork of a specific protein or proteins of interest.

Usage

X.local.network(
  data = c(),
  proteins = c(),
  cutoff = 0.5,
  scores.col = NA,
  condition.col = NA,
  min.conditions = 1,
  plot = NULL,
  plot.annotation = NULL,
  plot.design.params = list(),
  plot.cytoscape.path = NA,
  plot.cytoscape.waittime = 40,
  plot.name = paste(proteins, collapse = "_"),
  plot.path = "./"
)

Arguments

data

Data frame with columns for protein1, protein2 and a column with scores

proteins

Vector: proteins whose local network should be plotted.

cutoff

Numeric: Probabilities cutoff applied to the data.

scores.col

Character string: Name of the columns with prediction values.

condition.col

Character string: If the data has more conditions, what is the name of the column containing conditions?

min.conditions

Numeric: At least how many conditions must contain the predicted interaction to not be filtered out?

plot

Character string: "cytoscape" for plotting using cytoscape and "visnetwork" for plotting using visNetwork package. NULL for no plotting.

plot.annotation

Data frame with column 'id' with protein IDs and any other annotation columns.

plot.design.params

List: as design.params in X.plot.network.

plot.cytoscape.path

String: As in X.plot.network.

plot.cytoscape.waittime

Numeric: How many second should R wait for the cytoscape to start.

plot.name

String: Plot name for saved cytoscape network.

plot.path

String: Output destination for the plot.

Value

A data frame with network edges.

Examples

local.subnetwork <- X.local.network(calibrated.model$data%>%dplyr::select(!score),"PF3D7_0412200",
            plot="cytoscape",
            plot.annotation=plasmoDB_data%>%dplyr::rename(protein=Accession),
            plot.cytoscape.path="C://Program Files/Cytoscape_v3.9.1/Cytoscape.exe")
#> Error in calibrated.model$data %>% dplyr::select(!score): could not find function "%>%"