Title: | A Step-Down Procedure to Control the False Discovery Proportion |
---|---|
Description: | Provides a step-down procedure for controlling the False Discovery Proportion (FDP) in a competition-based setup, implementing Dong et al. (2020) <arXiv:2011.11939>. Such setups include target-decoy competition (TDC) in computational mass spectrometry and the knockoff construction in linear regression. |
Authors: | Arya Ebadi [aut, cre], Dong Luo [aut], Kristen Emery [aut], Yilun He [aut], William Stafford Noble [aut], Uri Keich [aut] |
Maintainer: | Arya Ebadi <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2024-10-26 03:09:08 UTC |
Source: | https://github.com/uni-arya/stepdownfdp |
fdp_sd
takes the output of mirandom
and additional
statistical parameters to return the indices and winning scores of
hypotheses that were rejected.
fdp_sd( scores_and_labels, alpha, conf, c = 0.5, lambda = 0.5, procedure = "standard" )
fdp_sd( scores_and_labels, alpha, conf, c = 0.5, lambda = 0.5, procedure = "standard" )
scores_and_labels |
An m x 2 matrix obtained via |
alpha |
An FDP threshold. |
conf |
To control the FDP with |
c |
Determines the ranks of the target score that are considered
winning. Defaults to |
lambda |
Determines the ranks of the target score that are
considered losing. Defaults to |
procedure |
Takes a value of "standard" (for non-randomised FDP-SD) or "coinflip" (for randomised FDP-SD). |
A list of 2 objects: the winning scores (discoveries
) and
indices (discoveries_ind
) of rejected hypotheses.
set.seed(123) target_scores <- rnorm(200, mean = 1.5) decoy_scores <- matrix(rnorm(600, mean = 0), ncol = 3) scores <- cbind(target_scores, decoy_scores) scores_and_labels <- mirandom(scores) fdp_sd(scores_and_labels, alpha = 0.1, conf = 0.1)
set.seed(123) target_scores <- rnorm(200, mean = 1.5) decoy_scores <- matrix(rnorm(600, mean = 0), ncol = 3) scores <- cbind(target_scores, decoy_scores) scores_and_labels <- mirandom(scores) fdp_sd(scores_and_labels, alpha = 0.1, conf = 0.1)
mirandom
takes a collection of target and decoy scores for m
hypotheses and returns a winning score and label attached to each.
The argument scores
must be organised in an m x (d + 1) matrix,
where d is the number of decoy scores. The first column of scores
must contain the target scores.
mirandom(scores, c = 0.5, lambda = 0.5)
mirandom(scores, c = 0.5, lambda = 0.5)
scores |
An m x (d + 1) matrix where m is the number of hypothesis and
d is the number of decoy scores for each hypothesis. The first column of
|
c |
Determines the ranks of the target score that are considered
winning. Defaults to |
lambda |
Determines the ranks of the target score that are
considered losing. Defaults to |
A m x 2 matrix where m is the number of hypotheses. The first column contains the winning scores and the second column contains the corresponding labels.
target_scores <- rnorm(200, mean = 1.5) decoy_scores <- matrix(rnorm(600, mean = 0), ncol = 3) scores <- cbind(target_scores, decoy_scores) mirandom(scores)
target_scores <- rnorm(200, mean = 1.5) decoy_scores <- matrix(rnorm(600, mean = 0), ncol = 3) scores <- cbind(target_scores, decoy_scores) mirandom(scores)