Learn R Programming

ICAMS (version 2.0.10)

AnnotateIDVCF: Add sequence context to an in-memory ID (insertion/deletion) VCF, and confirm that they match the given reference genome.

Description

Add sequence context to an in-memory ID (insertion/deletion) VCF, and confirm that they match the given reference genome.

Usage

AnnotateIDVCF(ID.vcf, ref.genome, flag.mismatches = 0)

Arguments

ID.vcf

An in-memory ID (insertion/deletion) VCF as a data.frame. This function expects that there is a "context base" to the left, for example REF = ACG, ALT = A (deletion of CG) or REF = A, ALT = ACC (insertion of CC).

ref.genome

A ref.genome argument as described in ICAMS.

flag.mismatches

If > 0, then if there are mismatches to references, generate messages showing the mismatched rows and continue. Otherwise stop if there are mismatched rows.

Value

A data frame with 2 new columns added to the input data frame:

  1. seq.context The sequence embedding the variant.

  2. seq.context.width The width of seq.context to the left

Examples

Run this code
# NOT RUN {
file <- c(system.file("extdata",
                      "Strelka.ID.GRCh37.vcf",
                      package = "ICAMS"))
ID.vcf <- ReadStrelkaIDVCFs(file)[[1]]
if (requireNamespace("BSgenome.Hsapiens.1000genomes.hs37d5", quietly = TRUE)) {
  annotated.ID.vcf <- AnnotateIDVCF(ID.vcf, ref.genome = "hg19")}
# }

Run the code above in your browser using DataLab