I am working on a linux system with mem 250G. Currently another program is running which takes mem less than 20GB.
If I try to load a vcf file (<16GB) with readVcf function in VariantAnnotation package, I get error message:
> germ.mut = readVcf("/home/kong/Haiying/Projects/PrimaryMelanoma/AllBatches/Lock/GermlineMutation/GermlineMutations.vcf", "hg19") Error: scanVcf: (internal) _vcftype_grow 'sz' < 0; cannot allocate memory? path: /home/kong/Haiying/Projects/PrimaryMelanoma/AllBatches/Lock/GermlineMutation/GermlineMutations.vcf
I tried gc() before running the line, and got the same error message.
I could follow the solution on: Error in reading 1000 genomes data
But since I have so much memory, is there any way to just load whole vcf at once?
> sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-pc-linux-gnu (64-bit) Running under: openSUSE 13.1 (Bottle) (x86_64) locale:  LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C  LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8  LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8  LC_PAPER=en_GB.UTF-8 LC_NAME=en_GB.UTF-8  LC_ADDRESS=en_GB.UTF-8 LC_TELEPHONE=en_GB.UTF-8  LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=en_GB.UTF-8 attached base packages:  stats4 parallel stats graphics grDevices utils datasets  methods base other attached packages:  cgdv17_0.12.0 VariantAnnotation_1.20.3  Rsamtools_1.26.2 Biostrings_2.42.1  XVector_0.14.1 SummarizedExperiment_1.4.0  Biobase_2.34.0 GenomicRanges_1.26.4  GenomeInfoDb_1.10.3 IRanges_2.8.2  S4Vectors_0.12.2 BiocGenerics_0.20.0  BiocInstaller_1.24.0 xlsx_0.5.7  xlsxjars_0.6.1 rJava_0.9-8 loaded via a namespace (and not attached):  Rcpp_0.12.10 AnnotationDbi_1.36.2 GenomicAlignments_1.10.1  zlibbioc_1.20.0 BiocParallel_1.8.2 BSgenome_1.42.0  lattice_0.20-35 tools_3.3.3 grid_3.3.3  DBI_0.6-1 digest_0.6.12 Matrix_1.2-8  rtracklayer_1.34.2 bitops_1.0-6 biomaRt_2.30.0  RCurl_1.95-4.8 memoise_1.1.0 RSQLite_1.1-2  GenomicFeatures_1.26.4 XML_3.98-1.6