R/readSampleNamesFromVcfHeader.R

Defines functions readSampleNamesFromVcfHeader

Documented in readSampleNamesFromVcfHeader

readSampleNamesFromVcfHeader <- function(file, ...)
{
    if (is(file, "TabixFile"))
        file <- path(file)
    else if (!is(file, "character") || length(file) != 1)
        stop("'file' must either be a single path or a 'TabixFile' object",
             call.=FALSE)

    suppressWarnings(out <- scanBcfHeader(file, ...)[[1]]$Sample)

    out
}

Try the podkat package in your browser

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

podkat documentation built on Nov. 8, 2020, 6:55 p.m.