R/read_uka.R

Defines functions read_uka

Documented in read_uka

#' Reads and Rank UKA table
#'
#' reads UKA table and checks for correct format
#'
#' This function takes in UKA table and rank and quartile kinases based on the absolute Score values
#'
#' @param df dataframe, UKA table output (requires at least Kinase and Z columns)
#' @param ..., arguments passed to rank_kinases function
#'
#' @return dataframe, Ranked and quartiled UKA table
#'
#' @export
#'

read_uka <- function(df, ...) {


  if(!is.data.frame(df)) {stop("Make sure your input is a dataframe")}
  if(!all(colnames(df) %in% c("Kinase", "Score"))) {
    stop("check columns names, they should be: Kinase, Score")
  }

  if(!is.character(df$Kinase)) {stop("check that Kinase column is as character column")}
  if(!is.numeric(df$Score)) {stop("check that Score column is as numeric column")}

  rank_kinases(df,  tool = "UKA", ...)



}
kalganem/creedenzymatic documentation built on March 31, 2024, 11:58 a.m.