Last data update: 2014.03.03

R: VCFHeader instances
VCFHeader-classR Documentation

VCFHeader instances

Description

The VCFHeader class holds Variant Call Format (VCF) file header information and is produced from a call to scanVcfHeader.

Details

The VCFHeader class is holds header information from a from VCF file.

Slots :

reference

character() vector

sample

character() vector

header

DataFrameList-class

Constructor

VCFHeader(reference = character(), samples = character(), header = DataFrameList(), ...)

Accessors

In the following code snippets x is a VCFHeader object.

samples(x): Returns a character() vector of names of samples.

header(x): Returns all information in the header slot which includes meta, info and geno if present.

meta(x), meta(x)<- value: The getter returns a DataFrameList with possible names of META, SAMPLE and PEDIGREE. The META DataFrame is a catch-all for non-standard header fields. This includes any information represented as simple key-value pairs. The replacement value can be a DataFrame or DataFrameList.

fixed(x), fixed(x)<- value: Returns a DataFrameList of information pertaining to any of ‘REF’, ‘ALT’, ‘FILTER’ and ‘QUAL’. Replacement value must be a DataFrameList with one or more of the following names, ‘QUAL’, ‘FILTER’, ‘REF’ and ‘ALT’.

info(x), info(x)<- value: Gets or sets a DataFrame of ‘INFO’ information. Replacement value must be a DataFrame with 3 columns named ‘Number’, ‘Type’ and ‘Description’.

geno(x), geno(x)<- value: Returns a DataFrame of ‘FORMAT’ information. Replacement value must be a DataFrame with 3 columns named ‘Number’, ‘Type’ and ‘Description’.

reference(x): Returns a character() vector with names of reference sequences. Not relevant for scanVcfHeader.

Arguments

reference

A character() vector of sequences.

sample

A character() vector of sample names.

header

A DataFrameList of parsed header lines (preceeded by “##”) present in the VCF file.

...

Additional arguments passed to methods.

Author(s)

Valerie Obenchain

See Also

scanVcfHeader, DataFrameList

Examples

  fl <- system.file("extdata", "structural.vcf", package="VariantAnnotation")
  hdr <- scanVcfHeader(fl)

  fixed(hdr)
  info(hdr)
  geno(hdr)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(VariantAnnotation)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: GenomeInfoDb
Loading required package: stats4
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: Rsamtools
Loading required package: Biostrings
Loading required package: XVector

Attaching package: 'VariantAnnotation'

The following object is masked from 'package:base':

    tabulate

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/VariantAnnotation/VCFHeader-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: VCFHeader-class
> ### Title: VCFHeader instances
> ### Aliases: VCFHeader-class VCFHeader reference reference,VCFHeader-method
> ###   samples samples,VCFHeader-method header header,VCFHeader-method
> ###   contig contig,VCFHeader-method meta meta,VCFHeader-method meta<-
> ###   meta<-,VCFHeader,DataFrame-method
> ###   meta<-,VCFHeader,DataFrameList-method fixed,VCFHeader-method
> ###   fixed<-,VCFHeader,DataFrameList-method info,VCFHeader-method
> ###   info<-,VCFHeader,DataFrame-method geno,VCFHeader-method
> ###   geno<-,VCFHeader,missing,DataFrame-method seqinfo,VCFHeader-method
> ###   show,VCFHeader-method
> 
> ### ** Examples
> 
>   fl <- system.file("extdata", "structural.vcf", package="VariantAnnotation")
>   hdr <- scanVcfHeader(fl)
> 
>   fixed(hdr)
DataFrameList of length 1
names(1): ALT
>   info(hdr)
DataFrame with 10 rows and 3 columns
               Number        Type
          <character> <character>
BKPTID              .      String
CIEND               2     Integer
CIPOS               2     Integer
END                 1     Integer
HOMLEN              .     Integer
HOMSEQ              .      String
IMPRECISE           0        Flag
MEINFO              4      String
SVLEN               .     Integer
SVTYPE              1      String
                                                                  Description
                                                                  <character>
BKPTID              ID of the assembled alternate allele in the assembly file
CIEND                   Confidence interval around END for imprecise variants
CIPOS                   Confidence interval around POS for imprecise variants
END                      End position of the variant described in this record
HOMLEN      Length of base pair identical micro-homology at event breakpoints
HOMSEQ    Sequence of base pair identical micro-homology at event breakpoints
IMPRECISE                                      Imprecise structural variation
MEINFO                Mobile element info of the form NAME,START,END,POLARITY
SVLEN                        Difference in length between REF and ALT alleles
SVTYPE                                             Type of structural variant
>   geno(hdr)
DataFrame with 4 rows and 3 columns
         Number        Type                                       Description
    <character> <character>                                       <character>
GT            1      String                                          Genotype
GQ            1       Float                                  Genotype quality
CN            1     Integer         Copy number genotype for imprecise events
CNQ           1       Float Copy number genotype quality for imprecise events
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>