[Bioc-devel] VariantAnnotation: Convertion from VCF to VRanges for CG example VCF

Julian Gehring julian.gehring at embl.de
Sat Dec 7 15:51:45 CET 2013


Hi,

I tried to import example VCFs from 'VariantAnnotation' and convert it 
to a 'VRanges' object.  While this works fine for the 'chr22.vcf.gz', it 
fails for the 'chr7-sub.vcf.gz' VCF:

#+BEGIN_SRC R

library(VariantAnnotation)
f = system.file("extdata", "chr7-sub.vcf.gz", package = 
"VariantAnnotation", mustWork = TRUE)
vcf = readVcf(f, "hg19")
vr = as(vcf, "VRanges")

#+END_SRC

results in:

#+BEGIN_EXAMPLE

Error in validObject(.Object) :
   invalid class “SummarizedExperiment” object: 'rowData' length differs 
from 'assays' nrow

#+END_EXAMPLE

The traceback returns:

#+BEGIN_EXAMPLE
16: stop(msg, ": ", errors, domain = NA)
15: validObject(.Object)
14: initialize(value, ...)
13: initialize(value, ...)
12: new("SummarizedExperiment", exptData = exptData, rowData = rowData,
         colData = colData, assays = assays, ...)
11: .local(assays, ...)
10: SummarizedExperiment(assays = geno, rowData = rowData, colData = 
colData,
         exptData = exptData)
9: SummarizedExperiment(assays = geno, rowData = rowData, colData = 
colData,
        exptData = exptData)
8: initialize(value, ...)
7: initialize(value, ...)
6: new(class, SummarizedExperiment(assays = geno, rowData = rowData,
        colData = colData, exptData = exptData), fixed = fixed, info = 
info,
        ...)
5: VCF(rowData = rdexp, colData = colData(x), exptData = exptData(x),
        fixed = fexp, info = iexp, geno = gexp, ..., collapsed = FALSE)
4: expand(from)
3: expand(from)
2: asMethod(object)
1: as(vcf, "VRanges")
#+END_EXAMPLE

This occurs both with bioc-release and bioc-devel (all packages up to 
date 2013-12-07).

Best wishes
Julian



More information about the Bioc-devel mailing list