RWR_netstats: Command-line interface for RWR_netstats.R

View source: R/RWR_netstats.R

RWR_netstatsR Documentation

Command-line interface for RWR_netstats.R

Description

Command-line interface for RWR_netstats.R

Usage

RWR_netstats(
  data = NULL,
  flist = NULL,
  network_1 = NULL,
  network_2 = NULL,
  outdir = NULL,
  basic_statistics = F,
  scoring_metric = "jaccard",
  pairwise_between_mpo_layer = F,
  multiplex_layers_to_refnet = F,
  net_to_net_similarity = F,
  calculate_tau_for_mpo = F,
  calculate_exclusivity_for_mpo = F,
  verbose = F
)

Arguments

data

The filepath to an mpo object.

flist

An flist. Currently creates "faux mpo" object for fast statistical inferences.

network_1

A path to an edgelist. Used for basic statistics, overlap_sim_multiplex_layer, overlap_pair, and calculate tau

network_2

A path to an edgelist. Used for basic statistics and overlap_pair.

outdir

If a directory is supplied, all output data are saved to tsv within that dir.

basic_statistics

A boolean denoting a return for basic statistics concerning supplied networks, or flists. Default False.

scoring_metric

A string denoting either "jaccard", "overlap" or "both" to describe. Default is "jaccard".

pairwise_between_mpo_layer

A boolean denoting a return of the pairwise score (defined by scoring_metric) between each layer of the supplied multiplex. Default False

multiplex_layers_to_refnet

A boolean denoting a return of the calculated score (defined by scoring_metric: default jaccard) between a multiplex network and a reference network (supplied as "network_1"). Default False

net_to_net_similarity

A boolean denoting a scoring between two supplied networks (network_1 and network_2) (scoring defined by scoring_metric: default jaccard). Default False

calculate_exclusivity_for_mpo

A boolean denoting a return of total percentage of edges that exist within all n layers of the multiplex. Default False

verbose

A boolean denoting the verbosity of output

calculate_tau

A boolean denoting a return of the distribution of "tau", with respect to the network layers, calculated via edge overlap weight / total edgeweight multipled by the total number of layers Default False

merged_with_all_edges

A boolean denoting a return of a merged down multiplex network along with network edge counts and vertex counts. Default False

merged_with_edgecounts

A boolean denoting a return of a merged down multiplex, but simplified with edge weights denoting the total number of layers in which that edge existed. Default False

Value

A list of data frames, igraph networks, and vectors denoting various parameter defined statistics.

Examples


# An example of running netstats with all statistics: 
extdata.dir <- system.file("example_data", package="RWRtoolkit")
mpo_path <- paste(extdata.dir, "string_interactions.Rdata", sep = "/")
gold <- paste(extdata.dir, "netstat/combined_score-random-gold.tsv", sep="/")
test <- paste(extdata.dir, "netstat/combined_score-random-test.tsv", sep="/")

output_nstats <- RWR_netstats(
   data = mpo_path,
   network_1 = gold,
   network_2 = test,
   basic_statistics = T,
   scoring_metric = "jaccard",
   pairwise_between_mpo_layer = T,
   multiplex_layers_to_refnet = T,
   net_to_net_similarity = T,
   calculate_tau_for_mpo = T,
   calculate_exclusivity_for_mpo = T,
   outdir = "./rwr_netstats/",
   verbose = T
)

print(output_nstats)


dkainer/RWRtoolkit documentation built on Jan. 11, 2025, 3:26 a.m.