| Title: | Save and Load Variant Data to/from File |
|---|---|
| Description: | Save variant calling SummarizedExperiment to file and load them back as VCF objects. This is a more portable alternative to serialization of such objects into RDS files. Each artifact is associated with metadata for further interpretation; downstream applications can enrich this metadata with context-specific properties. |
| Authors: | Aaron Lun [aut, cre] |
| Maintainer: | Aaron Lun <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.13.0 |
| Built: | 2026-05-30 09:37:59 UTC |
| Source: | https://github.com/bioc/alabaster.vcf |
Read a VCF object from its on-disk representation.
readVCF(path, metadata, ...)readVCF(path, metadata, ...)
path |
String containing a path to a directory, usually generated by the |
metadata |
Named list of metadata for this object, see |
... |
Further arguments passed to internal |
A VCF object.
Aaron Lun
saveObject,VCF-method, to save VCF objects to disk.
fl <- system.file("extdata", "structural.vcf", package="VariantAnnotation") vcf <- readVcf(fl) tmp <- tempfile() saveObject(vcf, tmp) readObject(tmp)fl <- system.file("extdata", "structural.vcf", package="VariantAnnotation") vcf <- readVcf(fl) tmp <- tempfile() saveObject(vcf, tmp) readObject(tmp)
Save a VCF object to its on-disk representation, namely a VCF file with the same contents.
## S4 method for signature 'VCF' saveObject(x, path, ...)## S4 method for signature 'VCF' saveObject(x, path, ...)
x |
Any instance of a VCF class or one of its subclasses. |
path |
String containing the path to a directory in which to save |
... |
Further arguments to pass to specific methods. |
x is saved to file inside path, and NULL is returned.
Aaron Lun
readVCF, to read a VCF object back to the R session.
fl <- system.file("extdata", "structural.vcf", package="VariantAnnotation") vcf <- readVcf(fl) tmp <- tempfile() saveObject(vcf, tmp)fl <- system.file("extdata", "structural.vcf", package="VariantAnnotation") vcf <- readVcf(fl) tmp <- tempfile() saveObject(vcf, tmp)