Learn R Programming

myvariant (version 1.2.0)

formatHgvs: Get all HGVS IDs from Vcf object.

Description

Read in a Vcf object created by readVcf to extract all HGVS IDs for querying MyVariant.info.

Usage

formatHgvs(vcf, variant_type = c("snp", "insertion", "deletion"))

Arguments

vcf
Vcf object created by readVcf.
variant_type
Type of variant HGVS IDs to retrieve from Vcf object. Default c("snp", "insertion", "deletion")

Value

References

https://myvariant.info http://www.hgvs.org/mutnomen/recs-DNA.html

See Also

formatSingleHgvs

Examples

Run this code
## return HGVS IDs for all snps in a Vcf
file.path <- system.file("extdata", "dbsnp_mini.vcf", package="myvariant")
vcf <- readVcf(file.path, genome="hg19")
hgvs <- formatHgvs(vcf, variant_type="snp")

Run the code above in your browser using DataLab