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

Valerie Obenchain vobencha at fhcrc.org
Mon Dec 9 21:20:13 CET 2013


Hi Julian,

I'm looking into this. It's likely that the chr7 file has an invalid 
header for the AD variable (which should be appropriately handled by 
readVcf()). I'll let you know when it's resolved.

Valerie




On 12/07/2013 06:51 AM, Julian Gehring wrote:
> 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


-- 
Valerie Obenchain

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B155
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: vobencha at fhcrc.org
Phone:  (206) 667-3158
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list