R/methods-scanVcfHeader.R

setMethod(scanVcfHeader, "missing",
    function(file, ...)
{
    VCFHeader()
})

setMethod(scanVcfHeader, "character",
    function(file, ...) 
{
    if (length(file)) {
        hdr <- scanBcfHeader(file[[1]], ...)[[1]]
        VCFHeader(hdr$Reference, hdr$Sample, hdr$Header)
    } else {
        VCFHeader()
    }
})

setMethod(scanVcfHeader, "TabixFile",
    function(file, ...)
{
    scanVcfHeader(path(file), ...)
})

Try the VariantAnnotation package in your browser

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

VariantAnnotation documentation built on Nov. 8, 2020, 5:08 p.m.