codon_mimic-methods: Mimic a target codon usage bias

Description Usage Arguments Details Value See Also Examples

Description

Mutating the current DNA sequences in the regioned_dna object to mimic a target codon usage pattern.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
codon_mimic(object, alt, ...)

## S4 method for signature 'regioned_dna,vector'
codon_mimic(object, alt)

## S4 method for signature 'regioned_dna,DNAStringSet'
codon_mimic(object, alt)

## S4 method for signature 'DNAStringSet,DNAStringSet'
codon_mimic(object, alt)

Arguments

object

regioned_dna object

alt

target codon usage vector or DNAStringSet object representing target codon usage

...

...

Details

The ideas for codon_mimic is similar to codon_to: first extract the mutable regions and then do the mutation. However the codons in the fixed (not mutable) regions will also alter the final codon usage, thus we have to adjust for the fixed codons when introducing sysnonymous codons. The ideal deisgn for codon_mimic is not unique as the swap between positions of the synonymous codons will not change the codon usage bias.

Details pleas refer to: https://koohoko.github.io/SynMut/algorithm.html

Value

regioned_dna

See Also

input_seq, codon_to, codon_random, dinu_to

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
filepath <- system.file("extdata", "example.fasta", package = "SynMut")
rgd.seq <- input_seq(filepath)
target <- get_cu(rgd.seq)[2,]
new <- codon_mimic(rgd.seq, alt = target)
get_cu(new) - get_cu(rgd.seq)

target <- Biostrings::DNAStringSet("TTGAAAA-CTC-N--AAG")
new <- codon_mimic(rgd.seq, alt = target)
get_cu(new) - get_cu(rgd.seq)
get_freq(new) - get_freq(rgd.seq)
get_rscu(new) - get_rscu(rgd.seq)

SynMut documentation built on Nov. 8, 2020, 8:01 p.m.