Calculates average expression changes of all nodes except trigger and finds the perturbed node count for a given node.

calc_perturbation(input_graph, node_name, how = 1, cycle = 1, limit = 0)

Arguments

input_graph

the graph object that was processed with priming graph in previous step.

node_name

The node that is trigger for simulation.

how

The change of count of the given node in terms of fold change.

cycle

The iteration of simulation.

limit

The minimum fold change which can be taken into account for perturbation calculation on all nodes in terms of percentage.

Value

a tibble with two columns, the perturbation efficiency and number of perturbed nodes.

Details

calc_perturbation calculates mean expression changes of elements except trigger after the change in the network in terms of percentage. It also calculates the number of nodes that have expression changes after the change occur in the network. The function determines the perturbation efficiency and number of perturbed nodes after given change with how, cycle and limit parameter.

Examples

data('minsamp') minsamp%>% priming_graph(competing_count = Competing_expression, miRNA_count = miRNA_expression)%>% calc_perturbation('Gene6', how= 3, cycle = 4)
#> Warning: `funs()` is deprecated as of dplyr 0.8.0. #> Please use a list of either functions or lambdas: #> #> # Simple named list: #> list(mean = mean, median = median) #> #> # Auto named with `tibble::lst()`: #> tibble::lst(mean, median) #> #> # Using lambdas #> list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_warnings()` to see where this warning was generated.
#> Warning: The `add` argument of `group_by()` is deprecated as of dplyr 1.0.0. #> Please use the `.add` argument instead. #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_warnings()` to see where this warning was generated.
#> Warning: First column is processed as competing and the second as miRNA.
#> # A tibble: 1 x 2 #> perturbation_efficiency perturbed_count #> <dbl> <dbl> #> 1 0.975 5
minsamp%>% priming_graph(competing_count = Competing_expression, miRNA_count = miRNA_expression, aff_factor = c(energy,seed_type), deg_factor = region)%>% calc_perturbation('Gene6',3, cycle = 4)
#> Warning: First column is processed as competing and the second as miRNA.
#> # A tibble: 1 x 2 #> perturbation_efficiency perturbed_count #> <dbl> <dbl> #> 1 0.249 5