View source: R/candidate_search.R
candidate_search | R Documentation |
Performs heuristic search on a set of binary features to determine whether
there are features whose union is more skewed (enriched at the extremes)
than either features alone. This is the main functionality of the CaDrA
package.
candidate_search(
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,
search_start = NULL,
top_N = 1,
search_method = c("both", "forward"),
max_size = 7,
best_score_only = FALSE,
do_plot = FALSE,
do_check = TRUE,
verbose = FALSE
)
FS |
a SummarizedExperiment class object from SummarizedExperiment package where rows represent features of interest (e.g. genes, transcripts, exons, etc.) and columns represent the samples. The assay of FS contains binary (1/0) values indicating the presence/absence of omics features. |
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 FS_mat (or FS) and input_score as its input arguments, and its final result must return a vector of row-wise scores ordered from most significant to least significant where its labels or names matched the row names of FS_mat (or FS) object. |
custom_parameters |
if method is |
alternative |
a character string specifies an alternative hypothesis
testing ( NOTE: This argument is applied to KS and Wilcoxon method |
weight |
if method is |
search_start |
a list of character strings (separated by commas)
which specifies feature names within the FS object to start
the search with. If |
top_N |
an integer specifies the number of features to start the
search over, starting from the top 'N' features in each case. If |
search_method |
a character string specifies an algorithm to filter
out the best features ( |
max_size |
an integer specifies a maximum size that a meta-feature
can extend to do for a given search. Default is |
best_score_only |
a logical value indicates whether or not to return
the best score corresponding to each top N searches ONLY.
Default is |
do_plot |
a logical value indicates whether or not to plot the overlapping features of the resulting meta-feature matrix. NOTE: plot can only be produced if the resulting meta-feature matrix contains
more than 1 feature (e.g. length(search_start) > 1 or top_N > 1).
Default is |
do_check |
a logical value indicates whether or not to validate if the
given parameters (FS and input_score) are valid inputs.
Default is |
verbose |
a logical value indicates whether or not to print the
diagnostic messages. Default is |
NOTE: The legacy function topn_eval()
is equivalent to the recommended
candidate_search()
function
If best_score_only
is set to TRUE
, the function will
return a list of objects containing ONLY the best score of the union
meta-feature matrix for each top N searches. If best_score_only
is set
to FALSE
, a list of objects containing the returned meta-feature matrix,
as well as its corresponding best score and observed input scores are returned.
# Load pre-computed feature set
data(sim_FS)
# Load pre-computed input scores
data(sim_Scores)
# Define additional parameters and run the function
candidate_search_result <- candidate_search(
FS = sim_FS, input_score = sim_Scores,
method = "ks_pval", alternative = "less", weight = NULL,
search_start = NULL, top_N = 3, search_method = "both",
max_size = 7, best_score_only = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.