File: methods-scanVcfHeader.R

package info (click to toggle)
r-bioc-variantannotation 1.52.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,372 kB
  • sloc: ansic: 1,357; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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), ...)
})