R/utils.R

Defines functions .findInfoMetricColumns

.findInfoMetricColumns <- function(vcf, pattern){
    # Check that at least 1 <phenotype>_*_<metric> exist in info(vcf)
    infoCols <- colnames(info(vcf))
    metricCols <- grep(pattern, infoCols, value = TRUE)
    # Check that at least one INFO column is detected
    if (!length(metricCols)){
        stop("No INFO column found matching pattern ", pattern)
    }
    return(metricCols)
}

Try the TVTB package in your browser

Any scripts or data that you put into this service are public.

TVTB documentation built on Nov. 8, 2020, 6:09 p.m.