vcfR provides a suite of tools for input and output of variant call format (VCF) files, manipulation of their content and visualization.
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.
More documentation for vcfR can be found at the vcfR documentation website.