Learn R Programming

wrMisc (version 1.7.0)

filterNetw: Filter nodes & edges for extracting networks This function allows extracting and filtering network-data based on fixed threshold () and add sandwich-nodes (nodes inter-connecting initial nodes) out of node-based queries.

Description

Filter nodes & edges for extracting networks

This function allows extracting and filtering network-data based on fixed threshold () and add sandwich-nodes (nodes inter-connecting initial nodes) out of node-based queries.

Usage

filterNetw(
  lst,
  limInt = 5000,
  sandwLim = 5000,
  filterAsInf = TRUE,
  outFormat = "matrix",
  remOrphans = TRUE,
  reverseCheck = TRUE,
  elemNa = "genes",
  silent = FALSE,
  callFrom = NULL,
  debug = FALSE
)

Arguments

lst

(list, composed of multiple matrix or data.frames ) main input (each list-element should have same number of columns)

limInt

(numeric, length=1) filter main edge-scores accodring to filterAsInf

sandwLim

(numeric, length=1) filter sandwich connection edge-scores accodring to filterAsInf

filterAsInf

(logical) filter as 'inferior or equal' or 'superior or equal'

outFormat

(character) may be 'matrix' for tabular output, 'all' as list with matrix and list of node-names

remOrphans

(logical) remove networks consisting only of 2 connected edges

reverseCheck

(logical)

elemNa

(character) used only for messages

silent

(logical) suppress messages

callFrom

(character) allow easier tracking of message(s) produced

debug

(logical) display additional messages for debugging

Value

matrix or data.frame

See Also

in cbind

Examples

Run this code
# NOT RUN {
lst2 <- list('121'=data.frame(ID=as.character(c(141,221,228,229,449)),11:15), 
	 '131'=data.frame(ID=as.character(c(228,331,332,333,339)),11:15), 
  '141'=data.frame(ID=as.character(c(121,151,229,339,441,442,449)),c(11:17)), 
  '151'=data.frame(ID=as.character(c(449,141,551,552)),11:14),
  '161'=data.frame(ID=as.character(171),11), '171'=data.frame(ID=as.character(161),11),
  '181'=data.frame(ID=as.character(881:882),11:12) )

(te1 <- filterNetw(lst2, limInt=90, remOrphans=FALSE))
(te2 <- filterNetw(lst2, limInt=90, remOrphans=TRUE))

(te3 <- filterNetw(lst2, limInt=13, remOrphans=FALSE))
(te4 <- filterNetw(lst2, limInt=13, remOrphans=TRUE))


# }

Run the code above in your browser using DataLab