Package: vcfR 1.15.0

Brian J. Knaus

vcfR: Manipulate and Visualize VCF Data

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.

Authors:Brian J. Knaus [cre, aut], Niklaus J. Grunwald [aut], Eric C. Anderson [ctb], David J. Winter [ctb], Zhian N. Kamvar [ctb], Javier F. Tabima [ctb]

vcfR_1.15.0.tar.gz
vcfR_1.15.0.tar.gz(r-4.5-noble)vcfR_1.15.0.tar.gz(r-4.4-noble)
vcfR_1.15.0.tgz(r-4.4-emscripten)vcfR_1.15.0.tgz(r-4.3-emscripten)
vcfR.pdf |vcfR.html
vcfR/json (API)

# Install 'vcfR' in R:
install.packages('vcfR', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/knausb/vcfr/issues

Uses libs:
  • zlib– Compression library
  • c++– GNU Standard C++ Library v3
Datasets:
  • chrom - Example chromR object.
  • dna - Example data for vcfR.
  • gff - Example data for vcfR.
  • vcf - Example data for vcfR.
  • vcfR_test - Test data for vcfR.
  • vep - Example data from the Variant Effect Predictor (VEP).

9.57 score 2 stars 19 packages 2.7k scripts 5.9k downloads 62 mentions 79 exports 32 dependencies

Last updated 11 months agofrom:3a30e2c886. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 03 2024
R-4.5-linux-x86_64OKOct 03 2024

Exports:%>%AD_frequencyaddIDalleles2consensusann2chromRcheck_keyschromochromoqcchromR2vcfRcreate.chromRdr.plotextract_gt_tidyextract_info_tidyextract.gtextract.hapsextract.indelsextract.infofreq_peakfreq_peak_plotgenetic_diffget.allelesgetALTgetCHROMgetFILTERgetFIXgetIDgetINFOgetPOSgetQUALgetREFgt.to.popsumgt2popsumheadheatmap.bpINFO2dfis_hetis.biallelicis.hetis.indelis.polymorphicmafmaskermasplitmetaINFO2dfNM2winNMnrownull.plotordisamplepairwise_genetic_diffpeak_to_ploidplotprintproc.chromRqueryMETArank.variants.chromRrbind2read.vcfRregex.winrePOSseq2chromRseq2rectsvar.winvariant.tablevcf_field_namesvcfR2chromRvcfR2DNAbinvcfR2genindvcfR2genlightvcfR2hapmapvcfR2locivcfR2migratevcfR2tidywin.tablewindowize.NMwrite.fastawrite.var.infowrite.vcfwrite.win.infoz.score

Dependencies:apecliclusterdigestdplyrfansigenericsgluelatticelifecyclemagrittrMASSMatrixmemusemgcvnlmepermutepillarpinfsc50pkgconfigR6Rcpprlangstringistringrtibbletidyselectutf8vctrsveganviridisLitewithr

Converting vcfR objects to other forms

Rendered fromconverting_data.Rmdusingknitr::rmarkdownon Oct 03 2024.

Last update: 2020-01-10
Started: 2016-02-22

Introduction to vcfR

Rendered fromintro_to_vcfR.Rmdusingknitr::rmarkdownon Oct 03 2024.

Last update: 2020-09-01
Started: 2016-02-22

VCF data

Rendered fromvcf_data.Rmdusingknitr::rmarkdownon Oct 03 2024.

Last update: 2023-02-10
Started: 2016-02-22

vcfR workflow

Rendered fromworkflow.Rmdusingknitr::rmarkdownon Oct 03 2024.

Last update: 2020-01-10
Started: 2017-01-07

Readme and manuals

Help Manual

Help pageTopics
AD_frequencyAD_frequency
Populate the ID column of VCF dataaddID
Check that INFO and FORMAT keys are uniquecheck_keys
Plot chromR objectchromo chromoqc chromo_plot
chromR_functionschromR functions masker variant.table win.table
Example chromR object.chrom chromR_example
chromR classchromR-class
Convert chrom objects to vcfR objectschromR2vcfR
Convert vcfR objects to tidy data framesConvert to tidy data frames extract_gt_tidy extract_info_tidy vcfR2tidy vcf_field_names
Create chromR objectann2chromR create.chromR seq2chromR vcf2chromR vcfR2chromR
dr.plot elementsdr.plot dr.plot elements null.plot
Extract elements from vcfR objectsextract.gt extract.haps extract.indels extract.info is.indel
Convert vcfR objects to other formatsFormat conversion vcfR2genind vcfR2genlight vcfR2loci
freq_peakfreq_peak
Plot freq_peak objectfreq_peak_plot
Genetic differentiationgenetic_diff
Genotype matrix functionsalleles2consensus Genotype matrix functions get.alleles
Get elements from the fixed region of a VCF filegetALT getALT,chromR-method getALT,vcfR-method getCHROM getCHROM,chromR-method getCHROM,vcfR-method getFILTER getFILTER,chromR-method getFILTER,vcfR-method getFIX getFIX,chromR-method getFIX,vcfR-method getID getID,chromR-method getID,vcfR-method getINFO getINFO,chromR-method getINFO,vcfR-method getPOS getPOS,chromR-method getPOS,vcfR-method getQUAL getQUAL,chromR-method getQUAL,vcfR-method getREF getREF,chromR-method getREF,vcfR-method
Population genetics summariesgt.to.popsum gt2popsum Population genetics summaries
Heatmap with barplotsheatmap.bp
Reformat INFO data as a data.frameINFO2df metaINFO2df
Query genotypes for heterozygotesis.het is_het
Minor allele frequencymaf
masplitmasplit
Ordinate a sample's dataordisample
Pairwise genetic differentiation across populationspairwise_genetic_diff
Convert allele balance peaks to ploidypeak_to_ploid
Process chromR objectproc.chromR Process chromR objects regex.win seq2rects var.win
Query the gt slotis.biallelic is.polymorphic is_biallelic query.gt
Query the META section of VCF dataqueryMETA
Ranking variants within windowsrank.variants.chromR Ranking
Create non-overlapping positions (POS) for VCF datarePOS
chromR-methodchromR,chromR-method head,chromR-method length,chromR-method names<-,chromR,character-method plot,chromR-method print,chromR-method show,chromR-method
showdim,vcfR-method dim.vcfR head head,vcfR-method nrow,vcfR-method nrow.vcfR plot,vcfR-method rbind2,vcfR,ANY-method rbind2,vcfR,missing-method rbind2,vcfR,vcfR-method rbind2.vcfR show,vcfR-method [,vcfR,ANY,ANY,ANY-method [,vcfR-method
Read and write vcf format filesread.vcfR VCF input and output write.vcf
Example data for vcfR.dna gff vcf vcfR_example
Test data for vcfR.vcfR_test vcf_test
vcfR classvcfR-class
Convert vcfR to DNAbinvcfR2DNAbin
Convert a vcfR object to hapmapvcfR2hapmap
Convert a vcfR object to MigrateN input filevcfR2migrate
Example data from the Variant Effect Predictor (VEP).vep
Create window summaries of dataNM2winNM Windowing windowize.NM z.score
Create fasta format outputwrite.fasta
Write summary tables from chromR objectswrite.var.info write.win.info