R/read_query_rds.R

Defines functions read_query_rds

Documented in read_query_rds

#' Read Query for RDS Object
#' 
#' @param project_info table of project information
#' @param filename name of RDS file
#' 
#' @return data frame read from RDS object.
#' 
#' @importFrom qtl2pattern create_probs_query_func
read_query_rds <- function(project_info, filename) {
  if(is.null(project_info))
    return(NULL)
  datapath <- project_info$directory
  projectfile <- file.path(datapath,
                           project_info$taxa,
                           project_info$project,
                           filename)
  if(!file.exists(projectfile))
    projectfile <- file.path(datapath,
                             project_info$taxa,
                             filename)
  assertthat::assert_that(file.exists(projectfile))
  readRDS(projectfile)
}
byandell/qtl2shiny documentation built on Nov. 9, 2023, 7:58 p.m.