This function creates SNVs and indels.
Arguments
- chr
The name of the chromosome in which the indel occurs.
- chr_pos
The position in the chromosome where the indel occurs.
- ref
The reference sequence.
- alt
The mutation altered sequence.
- allele
The allele in which the mutation must occur (optional).
- cause
The cause of the mutation (optional).
Details
It generalizes the function SNV()
by building SNVs and
indels. However, it requires the reference sequence specification
whereas SNV()
can deduce it from the reference sequence itself.
Another difference with respect to SNV()
is the ref
-alt
parameter order: the alt
parameter comes before the optional
ref
parameter in SNV()
; Mutation()
adopts the reverse order.
See also
SNV()
for SNV creation.
Examples
# create a deletion without specifying the cause
mutation <- Mutation("X", 20002, "TAC", "T")
mutation
#> indel(chr: X, chr_pos: 20002, allele: random, ref: TAC, alt: T)
# create an insertion and do not specify the cause
mutation <- Mutation("X", 20002, "A", "AT")
mutation
#> indel(chr: X, chr_pos: 20002, allele: random, ref: A, alt: AT)
# create an insertion that must be place in allele 1
mutation <- Mutation("X", 20002, "A", "AT", allele = 1)
mutation
#> indel(chr: X, chr_pos: 20002, allele: 1, ref: A, alt: AT)
# create an insertion with a cause
mutation <- Mutation("X", 20002, "A", "AT", cause = "SBS1")
mutation
#> indel(chr: X, chr_pos: 20002, allele: random, ref: A, alt: AT, cause: "SBS1")