View source: R/tidyMS_R6_TransitionCorrelations.R
rank_by_NA | R Documentation |
Ranks peptides/precursors of a protein by NAs (adds new column .NARank)
rank_by_NA(pdata, config)
pdata |
data.frame |
config |
AnalysisConfiguration |
data.frame
bb <- prolfqua::prolfqua_data('data_spectronautDIA250_A')
config <- bb$config_f()
analysis <- bb$analysis(bb$data, bb$config_f())
res <- remove_large_QValues(analysis, config)
res <- rank_by_NA(res,config)
colnames(res)
x <- res |>
dplyr::select(config$table$hierarchy_keys()[1], config$table$hierarchy_keys(TRUE)[1], "srm_NrNotNAs") |>
dplyr::distinct() |> dplyr::summarize(sum(srm_NrNotNAs)) |> dplyr::pull()
stopifnot(sum(!is.na(res[[config$table$get_response()[1]]])) == x)
res |> dplyr::select(c(config$table$hierarchy_keys(),"srm_NrNotNAs" ,"srm_NrNotNARank")) |>
dplyr::distinct() |>
dplyr::arrange(!!!rlang::syms(c(config$table$hierarchy_keys()[1],"srm_NrNotNARank")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.