ICAMS (version 2.0.7)

AddAndCheckSequenceID: Add sequence context to a data frame with ID (insertion/deletion) mutation records, and confirm that they match the given reference genome.

Description

Add sequence context to a data frame with ID (insertion/deletion) mutation records, and confirm that they match the given reference genome.

Usage

AddAndCheckSequenceID(df, ref.genome, flag.mismatches = 0)

Arguments

df

A data frame storing mutation records of a VCF file containing only insertions and deletions. 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, if there are mismatches to references, print out the mismatched rows and continue. Otherwise stop.

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