[Bioc-devel] VariantAnnotation: writeVcf fails if sample names not ordered
Julian Gehring
julian.gehring at embl.de
Thu Feb 6 10:47:04 CET 2014
Great, thanks for fixing this.
On 02/05/2014 08:38 PM, Michael Lawrence wrote:
> Thanks, fixed in 1.9.35/1.8.11.
>
>
>
>
> On Wed, Feb 5, 2014 at 1:21 AM, Julian Gehring <julian.gehring at embl.de>wrote:
>
>> Hi,
>>
>> I'm not sure whether this is related to the other bug. Anyway, 'writeVcf'
>> fails if the sample names of a 'VRanges' object are not sorted in ascending
>> order (in the latest bioc-devel):
>>
>> #+BEGIN_SRC R
>> library(VariantAnnotation)
>>
>> vr = VRanges(1:2, IRanges(100:101, 200:201),
>> ref = c("G", "G"), alt = c("A", "T"))
>>
>> sampleNames(vr) = factor(c("1", "2"))
>> writeVcf(vr, tempfile()) ## works, also for "A"/"B", etc
>>
>> sampleNames(vr) = factor(c("2", "1"))
>> writeVcf(vr, tempfile()) ## fails, also for "B"/"A", etc.
>> ## convertion to VCF itself works
>> vcf = as(vr, "VCF")
>> writeVcf(vcf, tempfile()) ## fails
>> #+END_SRC
>>
>> with the error:
>>
>> Error in relist(genoMatFlat, PartitioningByEnd(genoMat)) :
>> shape of 'skeleton' is not compatible with 'NROW(flesh)'
>>
>> In bioc-release (VariantAnnotation_1.8.10), it fails irrespective of the
>> sample name order:
>>
>> #+BEGIN_SRC R
>> library(VariantAnnotation)
>>
>> vr = VRanges(1:2, IRanges(100:101, 200:201),
>> ref = c("G", "G"), alt = c("A", "T"))
>>
>> sampleNames(vr) = factor(c("1", "2"))
>> writeVcf(vr, tempfile()) ## fails
>> #+END_SRC
>>
>> with
>>
>> Error in writeVcf(as(obj, "VCF"), filename, ...) :
>> error in evaluating the argument 'obj' in selecting a method for
>> function 'writeVcf': Error in listClassName("Compressed", class(x)) :
>> Could not find a 'CompressedList' subclass for values of type '
>> CompressedRleListRleListCompressedAtomicListAtomicListCompre
>> ssedListListVectorAnnotated'
>>
>>
>> Please let me know if I can help.
>>
>> Best wishes
>> Julian
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>
More information about the Bioc-devel
mailing list