Description Usage Arguments Details Value See Also Examples
Generating random synonymous mutations (in user-defined region), with optionally keeping/not keeping the original codon usage bias.
1 2 3 4 5 6 7 | codon_random(object, n = 1, keep = FALSE, ...)
## S4 method for signature 'regioned_dna'
codon_random(object, n, keep)
## S4 method for signature 'DNAStringSet'
codon_random(object, n, keep)
|
object |
A regioned_dna object. |
n |
Optional n parameter specifying what proportion of the codons to be
mutate. Default value: |
keep |
Logical parameter controling whether keeping the codon usage bias
of the original sequence. Default value: |
... |
... |
This method randomly sample synonymous codons for n
propotion
of every mutable codons in the sequences. This process will be likely to
alter the codon usage bias of the original sequences. However the
keep = TRUE
argument help to preserve the codon usage bias. It is
done via the synsequence
function in seqinr
package. The
synsequence
function essentially swaps the position of the
synonymous codons without introducing new codons into the original
sequences.
A regioned_dna object containing the mutants; Or a DNAStringSet object if the input is a DNAStringSet object.
input_seq
, dinu_to
,
codon_to
, codon_mimic
1 2 3 4 5 | filepath <- system.file("extdata", "example.fasta", package = "SynMut")
rgd.seq <- input_seq(filepath)
set.seed(2019)
get_cu(codon_random(rgd.seq, n = 0.5))
get_cu(codon_random(rgd.seq))
|
-------------------------------------------------------------------------------
For disccussion, please access to: https://github.com/Koohoko/SynMut/issues
-------------------------------------------------------------------------------
AAA AAC AAG AAT ACA ACC ACG ACT AGA AGC AGG AGT ATA ATC ATG ATT CAA CAC
[1,] 7 4 6 7 4 5 3 6 4 4 5 4 3 4 14 5 5 3
[2,] 8 4 5 5 4 1 2 11 4 2 1 2 5 2 10 4 4 2
CAG CAT CCA CCC CCG CCT CGA CGC CGG CGT CTA CTC CTG CTT GAA GAC GAG GAT
[1,] 10 2 4 1 2 1 4 2 2 0 3 6 6 7 7 2 10 4
[2,] 5 1 1 2 1 4 3 3 4 1 4 3 5 6 10 7 6 8
GCA GCC GCG GCT GGA GGC GGG GGT GTA GTC GTG GTT TAA TAC TAG TAT TCA TCC
[1,] 6 9 3 9 4 4 5 3 1 2 5 5 0 3 0 2 4 1
[2,] 5 4 1 6 7 2 4 2 1 4 4 6 0 1 0 0 3 4
TCG TCT TGA TGC TGG TGT TTA TTC TTG TTT
[1,] 0 5 1 0 1 3 2 2 2 5
[2,] 3 2 1 2 4 1 3 5 1 5
AAA AAC AAG AAT ACA ACC ACG ACT AGA AGC AGG AGT ATA ATC ATG ATT CAA CAC
[1,] 2 4 11 7 5 2 7 4 5 3 4 6 8 0 14 4 8 3
[2,] 5 2 8 7 5 0 7 6 4 6 2 1 4 6 10 1 6 2
CAG CAT CCA CCC CCG CCT CGA CGC CGG CGT CTA CTC CTG CTT GAA GAC GAG GAT
[1,] 7 2 1 3 2 2 2 3 2 1 6 3 2 6 9 4 8 2
[2,] 3 1 2 2 2 2 2 4 1 3 1 5 2 4 7 8 9 7
GCA GCC GCG GCT GGA GGC GGG GGT GTA GTC GTG GTT TAA TAC TAG TAT TCA TCC
[1,] 7 10 4 6 1 5 7 3 4 6 1 2 1 2 0 3 4 4
[2,] 3 4 3 6 2 5 5 3 2 3 6 4 0 0 0 1 2 1
TCG TCT TGA TGC TGG TGT TTA TTC TTG TTT
[1,] 0 1 0 2 1 1 6 5 3 2
[2,] 3 3 1 0 4 3 6 3 4 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.