Using all paths from an igraph path trace this will filter all the paths in the trace by the lim argument. Implementation deploys path_filter() in parallel over the number of cores specified by the cores argument.

path_obj_filter(path_obj, vertices, lim, path_name, weights, cores = 1)

Arguments

path_obj

pathtrace object from short_paths()

vertices

the vertices vector from find_limit

lim

the filter limit value

path_name

the name of the path for message (target or sentinal)

weights

the gene OMICS scores or score metric by verex to weight paths

cores

the cores to run the path calulation over. default = 1

Value

list of vertex names from paths that path the filter limit

Examples

example_path <- list() example_path$res <- list( c('319', "49", "23", "86", "690", "238"), c('422', "899", "37", "240", "970", "28") ) names(example_path$res[[1]]) <- c( "GeneA","GeneZ", "GeneAlpha", "GeneB", "GeneX", "GeneOmega" ) names(example_path$res[[2]]) <- c( "Gene1","Gene2", "GeneUno", "Gene12", "Gene13", "GeneOcho" ) sampweights <- c(1.45, 2.45, 0.89, .003, 1.3, 2.1, 0.02, 0, 0, 0.2, 0.6, .70) names(sampweights) <- c( "GeneA","GeneZ", "GeneAlpha", "GeneB", "GeneX", "GeneOmega", "Gene1","Gene2", "GeneUno", "Gene12", "Gene13", "GeneOcho" ) path_obj_filter( path_obj = example_path, path_name = "test", vertices = c(0,0,0), weights = sampweights, lim = 1, cores = 2 )
#> 1 test paths out of 2 ( 50% ) kept
#> 4 of 8 test genes ( 50% ) filtered out
#> [1] "GeneZ" "GeneAlpha" "GeneB" "GeneX"