R/make_pvar.R

Defines functions make_pvar

Documented in make_pvar

#' A tools4ukbb function
#' Function output: a pvar object from the chromosome of your choosing
#' 
#' @param chromosome which chromosome you are selecting and how it is labeled (eg: for chromosome 2 of sample3_chr2.pvar, chromsome = "chr2" OR for s1_c2.pvar, chromosome = "c2")
#' @param directory the directory with your pvar files 
#' @keywords pvar
#' @export
#' @examples
#' make_pvar()

make_pvar <- function(chromosome, directory){
  directory_list <- list.files(directory, pattern = ".pvar", full.names = TRUE) 
  pvar_file_name <- str_subset(directory_list, chromosome)
  pvar <- NewPvar(pvar_file_name)
}
Lab-Jaiswal/tools4ukbb documentation built on May 12, 2022, 9:11 a.m.