[Bioc-devel] VariantAnnotation: verbose output of readVcf

Julian Gehring julian.gehring at embl.de
Thu Jul 16 11:35:19 CEST 2015


Hi,

In recent versions of 'VariantAnnotation', the 'readVcf' function prints
information about the header lines:

  fl <- system.file("extdata", "ex2.vcf", package="VariantAnnotation") 
  vcf <- readVcf(fl, "hg19")

shows

  found header lines for 3 ‘fixed’ fields: ALT, QUAL, FILTER 
  found header lines for 6 ‘info’ fields: NS, DP, AF, AA, DB, H2 
  found header lines for 4 ‘geno’ fields: GT, GQ, DP, HQ

When one reads a VCF in chunks, this gets displayed once per chunk:

  fl <- system.file("extdata", "chr22.vcf.gz", package="VariantAnnotation")
  param <- ScanVcfParam(fixed="ALT", geno=c("GT", "GL"), info=c("LDAF"))
  tab <- TabixFile(fl, yieldSize=4000)
  open(tab)
  while (nrow(vcf_yield <- readVcf(tab, "hg19", param=param)))
    cat("vcf dim:", dim(vcf), "\n")

  found header lines for 1 ‘fixed’ fields: ALT 
  found header lines for 1 ‘info’ fields: LDAF 
  found header lines for 2 ‘geno’ fields: GT, GL 
  vcf dim: 5 3 
  found header lines for 1 ‘fixed’ fields: ALT 
  found header lines for 1 ‘info’ fields: LDAF 
  found header lines for 2 ‘geno’ fields: GT, GL 
  vcf dim: 5 3 
  found header lines for 1 ‘fixed’ fields: ALT 
  found header lines for 1 ‘info’ fields: LDAF 
  found header lines for 2 ‘geno’ fields: GT, GL 
  vcf dim: 5 3 
  found header lines for 1 ‘fixed’ fields: ALT 
  found header lines for 1 ‘info’ fields: LDAF 
  found header lines for 2 ‘geno’ fields: GT, GL

For larger files, this get a bit cumbersome. It looks to me like debug
information. Is this behavior intentional?

Best wishes
Julian



More information about the Bioc-devel mailing list