refNet: Create reference gene association network

View source: R/refNet.R

refNetR Documentation

Create reference gene association network

Description

refNet creates reference gene association network for batch effect evaluation. The output is required for create_ref_sample and batchPred functions.

Usage

refNet(
  network_gold_standard = NULL,
  input_edata = input_edata,
  gold_standard_path = NULL,
  false_positive = 0.025,
  true_positive = 0.5
)

Arguments

network_gold_standard

Datatable of gene-gene network gold standard. Column 1 and 2 are gene IDs. Column 3 is posterior probability with known edges set to 1. refNet is optimised for "full networks", which can be be downloaded from http://giant.princeton.edu/download/.

input_edata

Character vector of gene ids that exist within your expression dataset.

gold_standard_path

(Optional). Path to gene-gene network gold standard file. Can be specified in place of network_gold_standard.

false_positive

cutoff value for false positive gene-gene interactions. Only false positives with lower post probability are listed.

true_positive

cutoff value for true positive gene-gene interactions. Only true positives with higher post probability are listed.

Value

A reference gene association network for genes present in input_edata. This gold standard only retains the highest and lowest confidence gene interactions.Output is a data.table with columns 1 and 2 being gene ID, column 2 is posterior probability. While column 3 is defines whether gene relation is a true positive or false positive (0) based on user defined thresholds.

Examples

#Create Mock input gold standard
network_gold_standard<- data.table(
    V1 = c(3091,4763,4204,10628,4321,6359,5630,5630,100131077) 
    , V2 = c(7352,8698,6855,2475,5155,23513,100131077,751816,751816)
    , V3 =  c(1,1,1,1,1,1,0.0384244,0.00357639,0.0097727)
    , V4 = c(0.0193132,0.0299962,0.0244092,0.0437484,0.107417,0.0145827,NA
      ,NA,NA)
    , stringsAsFactors = F )
    
#Create Mock Gene IDs    
input_edata <- c('3091','4763','4204','7352','8698','6855' )

#Generate Reference Network
refNet( network_gold_standard, input_edata, 
gold_standard_path = NULL, false_positive = 0.025, true_positive = 0.5) 

NabilaRahman/batchPred documentation built on June 19, 2022, 5:35 a.m.