getShortestPathSif: Get the shortest between two IDs (HGNC or CHEBI)

Description Usage Arguments Value Examples

View source: R/getShortestPathSif.R

Description

Get the shortest between two IDs (HGNC or CHEBI)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
getShortestPathSif(
  sif,
  idA,
  idB,
  mode = c("all", "out", "in"),
  weights = NULL,
  verbose = FALSE,
  filterFun,
  ...
)

Arguments

sif

a SIF network

idA

HGNC or CHEBI (CHEBI:XXXXX) ID

idB

HGNC or CHEBI (CHEBI:XXXXX) ID

mode

see shortest_paths() in igraph

weights

see shortest_paths() in igraph

verbose

a boolean whether to show debugging information

filterFun

a function to filter multiple paths of the same length

...

additional arguments passed on to filterFun

Value

a data.frame representing a SIF network

Examples

1
2
3
4
5
idA <- "DAP3"
idB <- "RPS16"
sif <- readSif(system.file("extdata", "test_sif_shortestPath.txt", package="paxtoolsr"))
filterFun <- function(vpaths) { idx <- sample(1:length(vpaths), 1); return(vpaths[[idx]]) }
m1 <- getShortestPathSif(sif, idA, idB, mode="all", weights=NULL, filterFun=filterFun, verbose=TRUE)

paxtoolsr documentation built on Nov. 8, 2020, 8:29 p.m.