Dear all, The `index` option of filterVcf function in VariantAnnotation package currently does not seem to work. The following is a minimal reproducible example:
R> vcf <- VcfFile(system.file("extdata", "chr22.vcf.gz", package="VariantAnnotation")) R> filterVcf(vcf, destination = tempfile(), index = TRUE, verbose = TRUE, prefilters = FilterRules( function(x) rep(TRUE, length(x)) )) starting prefilter prefiltering 10376 records prefiltered to /var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b67ce9179 compressing and indexing ‘/var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b67ce9179’ Error: 'bgzip' error: opening 'file': No such file or directory file: /var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b67ce9179 dest: /var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b721b71d5.bgz'<pointer: 0x11ea398c0>' error: opening 'file': No such file or directory file: /var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b67ce9179 dest: /var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b721b71d5.bgz'list(name = "Rsamtools", path = "/Library/Frameworks/Rframework/Versions/3.5/Resources/library/Rsamtools/libs/Rsamtools.so", dynamicLookup = TRUE, handle = <pointer: 0x11fb45f00>, info = <pointer: 0x10286fb00>)' error: opening 'file': No such file or directory file: /var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b67ce9179 dest: /var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b721b71d5.bgz'2' error: opening 'file': No such file or directory file: /var/folders/ In contrast, by turning `index` option to FALSE, it will no longer produce any error. R> filterVcf(vcf, destination = tempfile(), index = FALSE, verbose = TRUE, prefilters = FilterRules( function(x) rep(TRUE, length(x)) )) starting prefilter prefiltering 10376 records prefiltered to /var/folders/59/1dny9n9d23jb7xmrh7c6jjc80000gn/T//RtmpoZLcSF/filefd5b3f39ec40 I am not sure whether the name of output file is supposed to have extension such as ".vcf.bgz", but I have tried both. Sorry that I haven't switched to devel brunch of Bioconductor. Please help verify the problem. Thank you! Jialin R> sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6 attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets [8] methods base other attached packages: [1] VariantAnnotation_1.26.1 Rsamtools_1.32.3 [3] Biostrings_2.48.0 XVector_0.20.0 [5] SummarizedExperiment_1.10.1 DelayedArray_0.6.6 [7] BiocParallel_1.14.2 matrixStats_0.54.0 [9] Biobase_2.40.0 GenomicRanges_1.32.7 [11] GenomeInfoDb_1.16.0 IRanges_2.14.12 [13] S4Vectors_0.18.3 BiocGenerics_0.26.0 [15] magrittr_1.5 loaded via a namespace (and not attached): [1] Rcpp_1.0.0 compiler_3.5.1 [3] prettyunits_1.0.2 GenomicFeatures_1.32.3 [5] bitops_1.0-6 tools_3.5.1 [7] zlibbioc_1.26.0 progress_1.2.0 [9] biomaRt_2.36.1 digest_0.6.18 [11] bit_1.1-14 BSgenome_1.48.0 [13] RSQLite_2.1.1 memoise_1.1.0 [15] lattice_0.20-38 pkgconfig_2.0.2 [17] rlang_0.3.0.1 Matrix_1.2-15 [19] cli_1.0.1 DBI_1.0.0 [21] rstudioapi_0.8 yaml_2.2.0 [23] GenomeInfoDbData_1.1.0 withr_2.1.2 [25] rtracklayer_1.40.6 httr_1.4.0 [27] stringr_1.3.1 hms_0.4.2 [29] bit64_0.9-7 grid_3.5.1 [31] R6_2.3.0 AnnotationDbi_1.42.1 [33] XML_3.98-1.16 sessioninfo_1.1.1 [35] blob_1.1.1 GenomicAlignments_1.16.0 [37] assertthat_0.2.0 stringi_1.2.4 [39] RCurl_1.95-4.11 crayon_1.3.4 _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel