Skip to content
Back to formatted view

Raw Message

Message-ID: <87lhmm5uac.fsf@embl.de>
Date: 2014-12-05T09:18:35Z
From: Julian Gehring
Subject: [Bioc-devel] VariantAnnotation: Same locus, multiple samples

Hi,

Assume that we have two variants from two samples at the same locus,
stored in a 'VRanges' or 'VCF' object:

  library(VariantAnnotation)

  vr = VRanges("1", IRanges(c(10, 10), width = 1),
    ref = c("C", "C"), alt = c("A", "G"),
    sampleNames = c("S1", "S2"))
  vcf = as(vr, "VCF")

If we convert the VCF to a VRanges, we now get each variant in each
patient:

  vr2 = as(vcf, "VRanges")

  length(vr) ## 2
  length(vr2) ## 4

It seems that the VCF object does not store the information of the
'sampleNames' in the first conversion.

Best wishes
Julian