Fiters a path baised on an input limit value and returns a list object. If the mean path score is above the limit the path will be returned as a kept gene list and passed score will be 1. Otherwise kept value will be NA and passed value will be 0. If the mean score is zero path used vaule is equal to zero instead of 1 and the keep and passed vaules resemble a failed path. All genes in a path regaurdless of a path's score are returned in the genes value.
path_filter(indv_path, weights, lim)
indv_path | the path of genes |
---|---|
weights | named vector of genes weights |
lim | the value to out the path |
A list object reporting all the genes for every path, the genes to keep
$Keep If the mean path score is greater than the limit score this is a vector of the path's gene names otherwise Keep sis NA
$Genes The names of the genes in the path
$Used Was the path used (ie mean path score > 0): Yes = 1, No = 0
$Passed Was the path's mean score greater than lim: Yes = 1, No = 0
example_path <- list( c('319', "49", "23", "86", "690", "238", "102") ) names(example_path[[1]]) <- c( "GeneA","GeneZ", "GeneAlpha", "GeneB", "GeneX", "GeneOmega" ) sampweights <- c(1.45, 2.45, 0.89, .003, 1.3, 2.1) names(sampweights) <- c( "GeneA","GeneZ", "GeneAlpha", "GeneB", "GeneX", "GeneOmega" ) path_filter(example_path[[1]], sampweights, 1)#> $Keep #> [1] "GeneZ" "GeneAlpha" "GeneB" "GeneX" "GeneOmega" #> #> $Genes #> [1] "GeneZ" "GeneAlpha" "GeneB" "GeneX" "GeneOmega" #> #> $Used #> [1] 1 #> #> $Passed #> [1] 1 #>path_filter(example_path[[1]], sampweights, 1.5)#> $Keep #> [1] NA #> #> $Genes #> [1] "GeneZ" "GeneAlpha" "GeneB" "GeneX" "GeneOmega" #> #> $Used #> [1] 1 #> #> $Passed #> [1] 0 #>