codon_to-methods: Maximize or minimize the usage of certain codon.

Description Usage Arguments Details Value See Also Examples

Description

Input string of a codon to either the "max.codon = " or "min.codon = " parameter to maximize or minimize the usage of certain codon in the sequence.

Usage

1
2
3
4
codon_to(object, max.codon = NA, min.codon = NA, ...)

## S4 method for signature 'regioned_dna'
codon_to(object, max.codon, min.codon)

Arguments

object

A regioned_dna object.

max.codon

A string of a codon.

min.codon

A string of a codon.

...

...

Details

The ideas for this function is simple. We first extract the mutable regions for every sequences, then mutated the synonymous codons of the input to the desired. There will be only one ideal design for the maximization problem, however there may be numerous comparable designs having the same minimal usage of certain codon, as we randomly sample synonymous codon for substitution when solving the minimization problem.

Value

A regioned_dna object.

See Also

input_seq, dinu_to, codon_random, codon_mimic

Examples

1
2
3
4
filepath <- system.file("extdata", "example.fasta", package = "SynMut")
rgd.seq <- input_seq(filepath)
get_cu(codon_to(rgd.seq, max.codon = "AAC")) - get_cu(rgd.seq)
get_cu(codon_to(rgd.seq, min.codon = "AAC")) - get_cu(rgd.seq)

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