partial_cor: Partial correlation analysis

View source: R/partial_cor.R

partial_corR Documentation

Partial correlation analysis

Description

A method that integrates differential expression (DE) analysis and differential network (DN) analysis to select biomarker candidates for cancer studies. partial_cor is the second step of the partial correlation calculation after getting the result from select_rho_partial function.

Usage

partial_cor(
  data_list = NULL,
  rho_group1 = NULL,
  rho_group2 = NULL,
  p_val = NULL,
  permutation = 1000,
  permutation_thres = 0.05,
  fdr = TRUE
)

Arguments

data_list

This is a list of pre-processed data outputted by the select_rho_partial function.

rho_group1

This is a character string indicating the rule for choosing rho value for group 1, "min": minimum rho, "ste": one standard error from minimum, or user can input rho of their choice. The default is minimum.

rho_group2

This is a character string indicating the rule for choosing rho value for group 2, "min": minimum rho, "ste": one standard error from minimum, or user can input rho of their choice, the default is minimum.

p_val

This is optional. It is a p*1 dataframe that contains the p-value for each biomolecule from DE analysis.

permutation

This is a positive integer representing the desired number of permutations. The default is 1000.

permutation_thres

This is a integer representing the threshold for the permutation test. The default is 0.05 to achieve 95 percent confidence.

fdr

This is a boolean value indicating whether to apply multiple testing correction (TRUE) or not (FALSE). The default is TRUE. However, if users find the output network is too sparse even after relaxing the permutation_thres, it's probably a good idea to turn off the multiple testing correction.

Value

A list containing an activity score dataframe with "ID", "P_value", "Node_Degree" and "Activity_Score" as columns and a differential network dataframe with the binary and the weight connection values.

Examples

# step 1: select_rho_partial
pre_data <- select_rho_partial(data = Met_GU, class_label = Met_Group_GU, id = Met_name_GU, error_curve = TRUE)
# step 2: partial_cor
result <- partial_cor(data_list = pre_data, rho_group1 = 'min', rho_group2 = "min", p_val = pvalue_M_GU, permutation = 1000,
                      permutation_thres = 0.05, fdr = TRUE)

ressomlab/INDEED documentation built on Aug. 3, 2022, 4:45 p.m.