Learn R Programming

cape (version 3.1.2)

get_network: Convert the final results to an adjacency matrix.

Description

This function converts the significant cape interactions to an adjacency matrix, which is then used by plot_network

Usage

get_network(
  data_obj,
  geno_obj,
  p_or_q = 0.05,
  min_std_effect = 0,
  standardize = FALSE,
  collapse_linked_markers = TRUE,
  threshold_power = 1,
  verbose = FALSE,
  plot_linkage_blocks = FALSE
)

Value

This function returns the data object with an adjacency matrix defining the final cape network based on the above parameters. The network is put into the slot collapsed_net if collapse_linked_markers is set to TRUE, and full_net if collapse_linked_markers is set to FALSE. run_cape automatically requests both networks be generated.

Arguments

data_obj

a Cape object

geno_obj

a genotype object

p_or_q

A threshold indicating the maximum adjusted p value considered significant. If an fdr method has been used to correct for multiple testing, this value specifies the maximum q value considered significant.

min_std_effect

This numerical value offers an additional filtering method. If specified, only interactions with standardized effect sizes greater then the min_std_effect will be returned.

standardize

A logical value indicating whether the values returned in the adjacency matrix should be effect sizes (FALSE) or standardized effect sizes (TRUE). Defaults to FALSE.

collapse_linked_markers

A logical value. If TRUE markers are combined into linkage blocks based on correlation. If FALSE, each marker is treated as an independent observation.

threshold_power

A numerical value indicating the power to which to raise the marker correlation matrix. This parameter is used in linkage_blocks_network to determine soft thresholding in determining linkage block structure. Larger values result in more splitting of linkage blocks. Smaller values result in less splitting. The default value of 1 uses the unmodified correlation matrix to determine linkage block structure.

verbose

A logical value indicating whether to print algorithm progress to standard out.

plot_linkage_blocks

A logical value indicating whether to plot heatmaps showing the marker correlation structure and where the linkage block boundaries were drawn.