vcfR-package: vcfR: Manipulate and Visualize VCF Data

vcfR-packageR Documentation

vcfR: Manipulate and Visualize VCF Data

Description

Facilitates easy manipulation of variant call format (VCF) data. Functions are provided to rapidly read from and write to VCF files. Once VCF data is read into R a parser function extracts matrices of data. This information can then be used for quality control or other purposes. Additional functions provide visualization of genomic data. Once processing is complete data may be written to a VCF file (*.vcf.gz). It also may be converted into other popular R objects (e.g., genlight, DNAbin). VcfR provides a link between VCF data and familiar R software.

vcfR provides a suite of tools for input and output of variant call format (VCF) files, manipulation of their content and visualization.

Details

File input and output is facilitated with the functions read.vcfR and write.vcf. Input of vcf format data results in an S4 vcfR-class object. Objects of class vcfR can be manipulated with vcfR-method and extract.gt. Contents of the vcfR object can be visualized with the plot method. More complex visualizations can be created using a series of functions. See vignette(topic="sequence_coverage") for an example. Once manipulations are complete the object may be written to a *.vcf.gz format file using write.vcf or exported to objects supported by other R packages with vcfR2genind or vcfR2loci.

More complex visualization can be accomplished by converting a vcfR object to a chromR-class object. An example exists on the create.chromR man page.

A complete list of functions can be displayed with: library(help = vcfR).

Vignettes (documentation) can be listed with: browseVignettes('vcfR').

Several example datasets are included in vcfR. vcfR_test comes from the VCF specification and provides a vcfR object with a diversity of examples in a small dataset. vcfR_example is a subset of the pinfsc50 dataset that includes VCF, GFF and FASTA data for moderate sized testing. The pinfsc50 dataset is available as a separate package and includes VCF, GFF and FASTA data for testing and benchmarking.

Author(s)

Maintainer: Brian J. Knaus briank.lists@gmail.com (ORCID)

Authors:

Other contributors:

See Also

Useful links:

More documentation for vcfR can be found at the vcfR documentation website.


knausb/vcfR documentation built on Jan. 14, 2024, 1:56 a.m.