Package 'alabaster.vcf'

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.5.0
Built: 2024-06-30 06:29:30 UTC
Source: https://github.com/bioc/alabaster.vcf

Help Index


Read a VCF object from disk

Description

Read a VCF object from its on-disk representation.

Usage

readVCF(path, metadata, ...)

Arguments

path

String containing a path to a directory, usually generated by the saveObject method for VCF object.s

metadata

Named list of metadata for this object, see readObjectFile for details.

...

Further arguments passed to internal altReadObject calls.

Value

A VCF object.

Author(s)

Aaron Lun

See Also

saveObject,VCF-method, to save VCF objects to disk.

Examples

fl <- system.file("extdata", "structural.vcf", package="VariantAnnotation")
vcf <- readVcf(fl)

tmp <- tempfile()
saveObject(vcf, tmp)
readObject(tmp)

Save a VCF object to disk

Description

Save a VCF object to its on-disk representation, namely a VCF file with the same contents.

Usage

## S4 method for signature 'VCF'
saveObject(x, path, ...)

Arguments

x

Any instance of a VCF class or one of its subclasses.

path

String containing the path to a directory in which to save x.

...

Further arguments to pass to specific methods.

Value

x is saved to file inside path, and NULL is returned.

Author(s)

Aaron Lun

See Also

readVCF, to read a VCF object back to the R session.

Examples

fl <- system.file("extdata", "structural.vcf", package="VariantAnnotation")
vcf <- readVcf(fl)

tmp <- tempfile()
saveObject(vcf, tmp)