Random generation of number of decoy, correct target and incorrect target PSMs after a competitive target-decoy search.

simulate_subset(n, pi0, sims = 1)

Arguments

n

number of total PSMs.

pi0

theoretical \(\pi_0\).

sims

number of observations.

Value

A data frame with ``sims'' rows and 6 rows:

n

number of PSMs.

pi0

theoretical \(\pi_0\).

decoy_n

number of decoy PSMs.

target_n

number of target PSMs.

H0_n

number of incorrect target PSMs.

H1_n

number of correct target PSMs.

Examples

## Simulate the number of decoys, correct targets and incorrect targets in 10 datasets that ## consist of 100 PSMs and that have on average 20% incorrect target PSMs. simulate_subset(100, .2, 10)
#> # A tibble: 10 x 6 #> n pi0 decoy_n target_n H0_n H1_n #> <dbl> <dbl> <int> <dbl> <int> <dbl> #> 1 100 0.2 17 83 15 68 #> 2 100 0.2 23 77 16 61 #> 3 100 0.2 17 83 10 73 #> 4 100 0.2 16 84 15 69 #> 5 100 0.2 17 83 18 65 #> 6 100 0.2 14 86 15 71 #> 7 100 0.2 14 86 13 73 #> 8 100 0.2 21 79 19 60 #> 9 100 0.2 16 84 20 64 #> 10 100 0.2 14 86 15 71