addSnpsToGenome: Add SNPs and indels to a reference sequence

View source: R/dna.R

addSnpsToGenomeR Documentation

Add SNPs and indels to a reference sequence

Description

Add SNPs and indels to a reference sequence

Usage

addSnpsToGenome(ref, snps = NULL, insertions = NULL, deletions = NULL)

Arguments

ref

a string giving a reference sequence to be edited

snps

a character vector giving SNPs in the format reference nucleotide, 1-based position and mutant nucleotide with no spaces .e.g. A3T would mean that the reference CCACC changed to CCTCC

insertions

a character vector giving insertions in the format 1-based position of the nucleotide prior to the insertion and the inserted nucleotides with no space e.g. 3TT would mean that the reference CCACC changed to CCATTCC

deletions

a character vector giving insertions in the format 1-based position of the first nucleotide of the deletions, dash and position of the last nucleotide of the insertion with no space e.g. 2-4 would mean that the reference CCACC changed to C—C

Value

a single character string containing the reference modified to contain the specified SNPs and indels

See Also

degap

Examples

addSnpsToGenome('ABCDEFGHIJKL',c('B2Z','D4Y'))
addSnpsToGenome('ABCDEFGHIJKL',deletions=c('1-4','6'))
addSnpsToGenome('ABCDEFGHIJKL',insertions=c('4XYZ','6VW'))

sherrillmix/dnar documentation built on July 18, 2022, 10:07 p.m.