Description Usage Arguments Value Author(s) Examples
View source: R/permutationPval.R
calculate permutation pval for association between X and Z if both are connected to Y
1 2 3 4 5 6 7 8 | permutationPval(interactions2permute = nodeX ~ nodeY,
associations2test = nodeX ~ nodeZ, node_attr = NULL, data,
statistic = nodeX + nodeZ ~ .N, select_nodes = NULL, N = 1000,
cores = NULL, cluster_type = "PSOCK", seed = NULL,
also_permuteYZ = F, clustermq = F, clustermq_mem = 4000,
clustermq_jobs = 100, clustermq_template = list(),
split_comp_inner_N = NULL, clustermq_fail_on_error = TRUE,
clustermq_log_worker = FALSE)
|
interactions2permute |
formula specifying columns that contain X-Y interactions that will be permuted |
associations2test |
formula specifying columns that contain X-Z correspondence: empirical p-values for the association of X with Z will be tested, NOTE: Y-Z interactions are assumed |
node_attr |
formula or list of formulas specifying columns that contain attributes of |
data |
data.table containing interaction data and attributes |
statistic |
formula that specifies how to calculate statistic using attibutes from |
select_nodes |
formula or list of formulas specifying which nodes of specific node type to select before permutation based on condition ( |
N |
number of times to run permutation of PPI network |
cores |
specify how many cores to use for parallel processing, default (NULL) is to detect all cores on the machine and use all minus one. When using LSF cluster you must specify the number of cores to use because |
cluster_type |
Type of the cluster to create when using R parrallel ( |
seed |
seed for RNG for reproducible sampling |
also_permuteYZ |
logical, permute Y-Z interactions in addition to X-Y (specified in interactions2permute) ? |
clustermq |
if TRUE uses clustermq job scheduling ( |
clustermq_mem |
memory in MB to allocate for each job (ignored unless clustermq == TRUE) |
clustermq_jobs |
maximal number of computing cluster jobs to use (ignored unless clustermq == TRUE) |
clustermq_template |
Add specific arguments to computing cluster job submission call. Not needed in most cases. Details: |
split_comp_inner_N |
parallel evaluation of permutations is split into the outer and inner replicate calls helps to save memory by decreasing the total size of the result. This argument let's you manually specify the number of inner replicate calls. This has to be optimised for data size when using clustermq (ignored unless clustermq == TRUE) |
clustermq_fail_on_error |
If TRUE clustermq will fail if one of the jobs returns an error. Details: |
clustermq_log_worker |
If TRUE clustermq will save log of worker jobs. Where in is save is determined by clustermq.template |
formula |
argument for |
x |
argument for |
... |
argument for |
object of S3 class "XYZinteration_XZEmpiricalPval" (list), containing permutationPval
function call, standardised node names, and data.table containing the original data but appended with empirical p-value (p.value), observed_statistic, YmissingZ_perX, and higher_counts, not_missing used to calculate p-value
Vitalii Kleshchevnikov
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
res = permutationPval(interactions2permute = nodeX ~ nodeY,
associations2test = nodeX ~ nodeZ, node_attr = NULL,
data, statistic = nodeX + nodeZ ~ .N, select_nodes = NULL, N = 1000,
cores = NULL, seed = NULL, also_permuteYZ = F, clustermq = F)
# print
res
# plot p-value distribution (hist)
plot(res)
# plot the number of Y without Z per X (hist),
# formula is used to subset the table before plotting
# to avoid plotting single number multiple times
plot(res, nodeX ~ YmissingZ_perX)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.