filter_scores: filter_scores

Description Usage Arguments Details Value Examples

View source: R/operations_on_scores.R

Description

Filters a table of scores based on a threshold of significance defined either by a MIC score, or by a p-value

Usage

1
filter_scores(x, on = "MIC", pval = NULL, thresh = 0.4)

Arguments

x

data.frame: the table of scores

on

variable used for the threshold (accepts only "MIC" or "pval")

pval

numeric vector of p-values corresponding to the MIC scores in x (only if on = "pval")

thresh

value of the threshold

Details

if on = "MIC", filter_scores will retain any association whose MIC >= threshold

else if on = "pval", filter_scores will retain any association whose p-value <= threshold

Value

Returns a filtered table of scores

Examples

1
2
3
4
5
6
7
## Not run: 
scores_tab <- compute_scores(my_gene_exp_matrix, n.cores = 6)
pvalues <- assign_pval(scores_tab$`MIC (strength)`, nb_cells = 96)
signif_scores_tab <- filter_scores(scores_tab, on = "pval",
                                   pval = pvalues, threshold = 0.05)

## End(Not run)

charles-bernard/mage documentation built on May 14, 2019, 2 a.m.