CaDrA | R Documentation |
Perform permutation-based testings on a sample of permuted input scores
using candidate_search
as the main iterative function for each run.
CaDrA(
FS,
input_score,
method = c("ks_pval", "ks_score", "wilcox_pval", "wilcox_score", "revealer", "custom"),
custom_function = NULL,
custom_parameters = NULL,
alternative = c("less", "greater", "two.sided"),
weight = NULL,
top_N = 1,
search_start = NULL,
search_method = c("both", "forward"),
max_size = 7,
n_perm = 1000,
obs_best_score = NULL,
smooth = TRUE,
plot = TRUE,
ncores = 1,
cache_path = NULL,
verbose = FALSE
)
FS |
a SummarizedExperiment object containing binary features where rows represent features of interest (e.g. genes, transcripts, exons, etc...) and columns represent the samples. |
input_score |
a vector of continuous scores representing a phenotypic readout of interest such as protein expression, pathway activity, etc. NOTE: |
method |
a character string specifies a scoring method that is
used in the search. There are 6 options: ( |
custom_function |
if method is NOTE: custom_function() must take |
custom_parameters |
if method is |
alternative |
a character string specifies an alternative hypothesis
testing ( |
weight |
if method is |
top_N |
an integer specifies the number of features to start the
search over. By default, it starts from the top best feature (top_N = 1).
NOTE: If |
search_start |
a list of character strings (separated by commas)
which specifies feature names within the FS object to start
the search with. If |
search_method |
a character string specifies an algorithm to filter out
the best candidates ( |
max_size |
an integer specifies a maximum size that a meta-feature can
extend to do for a given search. Default is |
n_perm |
an integer specifies the number of permutations to perform.
Default is |
obs_best_score |
a numeric value corresponding to the best observed
score. This value is used to compare against the permuted best scores.
Default is |
smooth |
a logical value indicates whether or not to smooth the p-value
calculation to avoid p-value of 0. Default is |
plot |
a logical value indicates whether or not to plot the empirical
null distribution of the permuted best scores. Default is |
ncores |
an integer specifies the number of cores to perform
parallelization for permutation-based testing. Default is |
cache_path |
a full path uses to cache the permuted best scores.
We recycle these scores instead of re-computing them to save time.
Default is |
verbose |
a logical value indicates whether or not to print the
diagnostic messages. Default is |
a list of key parameters that are used to cache the result of
permutation-based testing, a vector of permuted best scores for a given
n_perm
, an observed best score, and a permutation p-value.
Reina Chau
# Load pre-computed feature set
data(sim_FS)
# Load pre-computed input-score
data(sim_Scores)
# Define additional parameters and start the function
cadra_result <- CaDrA(
FS = sim_FS, input_score = sim_Scores, method = "ks_pval",
weight = NULL, alternative = "less", top_N = 1,
search_start = NULL, search_method = "both", max_size = 7,
n_perm = 10, plot = FALSE, smooth = TRUE, obs_best_score = NULL,
ncores = 1, cache_path = NULL
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.