adds FDR, TPR and FDP to data.

ms_bench_add_scores(
  data,
  TP_col = "TP",
  arrangeby = "diff",
  desc = TRUE,
  subject_Id = "protein_Id"
)

Arguments

data

a dataframe with TP_col indicating if the row is a true positive hit

TP_col

column name of TP (TRUE, FALSE)

arrangeby

- by which column to sort.

desc

descending or ascending.

Value

data.frame with the following columns added FDP - false discovery proportion (Q in Benjamini Hochberg table) FPR - false positive rate TPR - true positive rate TP_hits - true positives

Examples

dd <- prolfqua_data('data_test_confusion_matrix_scores')
xd <- ms_bench_add_scores(dd, arrangeby = "estimate")
plot(xd$TPR,xd$PREC, type="l")

plot(1- xd$PREC, xd$FDP)