dinu_to-methods: Maximize or minimize the usage of certain dinucleotide.

dinu_toR Documentation

Maximize or minimize the usage of certain dinucleotide.

Description

Input string of a dinucleotide to either the "max.dinu = " or "min.codon = " parameter to maximize or minimize the usage of certain codon in the sequence. Using a greedy algorithm with priority given to dinucleotide12 or dinucleotide23.

Usage

dinu_to(object, max.dinu = NA, min.dinu = NA, keep = FALSE, numcode = 1, ...)

## S4 method for signature 'regioned_dna'
dinu_to(object, max.dinu, min.dinu, keep, numcode)

Arguments

object

A regioned_dna object.

max.dinu

A string of a dinucleotide.

min.dinu

A string of a dinucleotide.

keep

A logical varibale stating if the codon usage of the original sequences should be keep. Default: False.

numcode

The ncbi genetic code number for translation. Default value: 1. Details please refer to ?seqinr::translate ("https://rdrr.io/cran/seqinr/man/translate.html").

...

...

Details

The detail strategy for this function please refer to: https://koohoko.github.io/SynMut/algorithm.html

Value

regioned_dna

See Also

input_seq, codon_to, codon_random, codon_mimic

Examples

filepath <- system.file("extdata", "example.fasta", package = "SynMut")
rgd.seq <- input_seq(filepath)
get_du(dinu_to(rgd.seq, max.dinu = "cg")) - get_du(rgd.seq)
get_du(dinu_to(rgd.seq, min.dinu = "AA")) - get_du(rgd.seq)
get_du(dinu_to(rgd.seq, max.dinu = "cg", keep = TRUE)) - get_du(rgd.seq)
get_cu(dinu_to(rgd.seq, max.dinu = "CG", keep = TRUE)) - get_cu(rgd.seq)

Koohoko/SynMut documentation built on Jan. 9, 2023, 12:11 p.m.