Add sequence context to a data frame with ID (insertion/deletion) mutation records, and confirm that they match the given reference genome.
AddAndCheckSequenceID(df, ref.genome, flag.mismatches = 0)
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).
A ref.genome
argument as described in
ICAMS
.
If > 0, if there are mismatches to references, print
out the mismatched rows and continue. Otherwise stop
.
A data frame with 2 new columns added to the input data frame:
seq.context
The sequence embedding the variant.
seq.context.width
The width of seq.context
to the left