Skip to contents

Using one of the network building algorithms, cluster initial network into individual protein complexes.

Usage

X.build.complexes(
  data = NULL,
  algo = "S",
  scores.col = NA,
  init.stats = FALSE,
  final.stats = FALSE,
  standard.set = NULL,
  labels.col = NA,
  rep.steps = 100,
  SP.shift = 0.2,
  SP.finalpreds = "randomized",
  SR.rows = 20
)

Arguments

data

Data frame with pair-wise interactions (columns 'protein1' and 'protein2') and a column with scores from ML model.

algo

Character string: What algorithm should be used for clustering? Options are 'SP' for shuffle-predictions, 'SR' for shuffle-rows, 'TR' for takeout-rows. Any other option (e.g. 'S') means that simple algorithm will be used. Default is 'S'.

scores.col

Character string: Name of the columns with model scores.

init.stats

Logical: Should the initial network stats be calculated? Default is FALSE.

final.stats

Logical: Should the final network stats be calculated? Default is FALSE.

standard.set

Data frame with columns protein1, protein2 and another column with labels.

labels.col

Character string: Name of the columns with labels.

rep.steps

Integer: How many times should the algorithm be repeated before averaging the results? Default is 100.

SP.shift

Numeric: By how much can the predictions be randomly shifted in SP algorithm?

SP.finalpreds

character: Which predictions should be use in final prediction calculation in SP algorithm? 'randomized' for means of randomly changed predictions upon iteration, 'original' for original predictions.

SR.rows

Numeric: Maximum by how many rows can a protein pair shift in order predictions in SR algorithm? Default is 20.

Value

A list with three elements: $data with columns 'protein1', 'protein2' and score contains all data for plotting or further processing of the network, 'stats_initial' contains statistics of the network before clustering. and 'stats_final' contains statistics of the network after clustering.

Examples

network.built <- X.build.complexes(data=cut_data, algo="SP",scores.col="score",init.stats=TRUE,final.stats=TRUE,
                  standard.set=GS,labels.col="complex")
#> Error: object 'cut_data' not found