PPplot: Creates PP plot of two empirical distributions.

Description Usage Arguments Value Examples

Description

Creates PP plot of two empirical distributions.

Usage

1
2
3
PPplot(score, label, pi0 = 0, score_higher = TRUE,
  title = "PP plot of target PSMs", xlab = "Decoy percentile",
  ylab = "Target\npercentile")

Arguments

score

vector of quantiles of distribution 1 and 2

label

vector of logical values. TRUE if score belongs to distribution 1

pi0

mixture coefficient of distribution 1 in distribution 2

score_higher

TRUE if a higher score means a better PSM.

title

main title.

xlab

label on x-axis.

ylab

label on y-axis.

Value

ggplot object

Examples

1
2
3
4
5
6
7
8
## Simulate a dataset with 140 correct target subset PSMs, 60 incorrect target subset PSMS,
## 60 decoy subset PSMs and 2000 additional decoy PSMs.
set.seed(10)
d = sample_dataset(H1_n = 140,H0_n = 60, decoy_n = 60 ,decoy_large_n = 2000)

##pi_0 can be estimated with the target-decoy approach
pi0 = sum(d$decoy & d$subset)/sum(!d$decoy & d$subset)
PPplot(d$score, d$decoy, pi0)

compomics/search-all-assess-subset documentation built on May 13, 2019, 9:55 p.m.