R/parse_idStandard.R

Defines functions parse_idStandard

Documented in parse_idStandard

#' Standardised IEU MRC OpenGWAS ID
#' 
#' Support function for \link[MungeSumstats]{parse_logs}.
#' 
#' @param l Lines of text from log file.
#' 
#' @return Character
#' @keywords internal
parse_idStandard <- function(l){
  line <- grep("Parsing .*. data column",l,
               value = TRUE)[1]
  if(is.na(line)) return(NA)
  trimws(strsplit(line," ")[[1]][2], whitespace = "'|[ ]")
}
neurogenomics/MungeSumstats documentation built on Aug. 10, 2024, 5:59 a.m.