R/get_pgen_list.R

Defines functions get_pgen_list

Documented in get_pgen_list

#' A tools4ukbb function
#' Function output: a list of pgen objects from the chromosomes you specify in chr_list
#'
#' @param chr_list a list of chromosomes you are selecting and how they are labeled (eg: chr_list <- c("c2", "c3") OR chr_list <- c("chr2", "chr3"))
#' @param directory the directory with your pvar, pgen, and psam files
#' @keywords get_pgen_list
#' @export
#' @examples
#' get_pgen_list()

get_pgen_list <- function(chr_list, directory){
  pgen_list <- map(chr_list, make_pgen, directory)
  names(pgen_list) <- chr_list
  pgen_list
}
Lab-Jaiswal/tools4ukbb documentation built on May 12, 2022, 9:11 a.m.