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), ...)
})
Bioconductor/VariantAnnotation documentation built on Nov. 2, 2024, 7:22 a.m.