R/krsa_extractEndPointMaxExp.R

Defines functions krsa_extractEndPointMaxExp

Documented in krsa_extractEndPointMaxExp

#' Extracts end point data at max exposure (last cycle)
#'
#' This function takes in raw data and chip type and returns end point data at max exposure (last cycle)
#'
#' @param df krsa raw tidy data
#' @param type chip type
#'
#' @return end point data at max exposure df
#'
#' @family helper functions
#'
#'
#' @export
#'
#' @examples
#' TRUE

krsa_extractEndPointMaxExp <- function(df, type = c("STK", "PTK")) {

  df %>% dplyr::filter(
    if (type == "STK") {Cycle == 124} else {Cycle == 94},
                ExposureTime == max(ExposureTime)) %>%
    dplyr::select(SampleName, Peptide ,Signal, Group)


}
kalganem/KRSA documentation built on April 16, 2022, 5:20 a.m.