Bioconductor / VariantAnnotation

Annotation of Genetic Variants
https://bioconductor.org/packages/VariantAnnotation
23 stars 20 forks source link

Subset Fails if Info and Geno Excluded #40

Open DarioS opened 4 years ago

DarioS commented 4 years ago

Minimal example:

library(VariantAnnotation)
fl <- system.file("extdata", "ex2.vcf", package="VariantAnnotation")
vcf <- readVcf(fl, "hg19", param = ScanVcfParam(info = NA, geno = NA))
subset(vcf, FILTER == "PASS") # Works well without param setting above.
# Error: subscript is a logical vector with out-of-bounds TRUE values
vcf[rowRanges(vcf)$FILTER == "PASS", ] # Workaround

The environment:

> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

other attached packages:
 [1] VariantAnnotation_1.34.0    Rsamtools_2.4.0             Biostrings_2.56.0           XVector_0.28.0             
 [5] SummarizedExperiment_1.18.1 DelayedArray_0.14.0         matrixStats_0.56.0          Biobase_2.48.0             
 [9] GenomicRanges_1.40.0        GenomeInfoDb_1.24.0         IRanges_2.22.1              S4Vectors_0.26.0           
[13] BiocGenerics_0.34.0