permutation | R Documentation |
Generates a random permutation of a given sequence, according to a
given model. Available models are : base
, position
,
codon
, syncodon
.
permutation(sequence,modele='base',frame=0,
replace=FALSE,prot=FALSE,numcode=1,ucoweight = NULL)
sequence |
A nucleic acids sequence |
modele |
A string of characters describing the model chosen for the random generation |
frame |
Only active for the |
replace |
This option is not active for the |
prot |
Only available for the |
numcode |
Only available for the |
ucoweight |
A list of weights containing the desired codon usage
bias as generated by |
The base
model allows for random sequence generation by
shuffling (with/without replacement) of all bases in the sequence.
The position
model allows for random sequence generation
by shuffling (with/without replacement) of bases within their
position in the codon (bases in position I, II or III stay in
position I, II or III in the new sequence.
The codon
model allows for random sequence generation by
shuffling (with/without replacement) of codons.
The syncodon
model allows for random sequence generation
by shuffling (with/without replacement) of synonymous codons.
a sequence generated from the original one by a given model
L. Palmeira
citation("seqinr")
synsequence
data(ec999)
sequence=ec999[1][[1]]
new=permutation(sequence,modele='base')
identical(all.equal(count(new,1),count(sequence,1)),TRUE)
new=permutation(sequence,modele='position')
identical(all.equal(GC(new),GC(sequence)),TRUE)
identical(all.equal(GC2(new),GC2(sequence)),TRUE)
identical(all.equal(GC3(new),GC3(sequence)),TRUE)
new=permutation(sequence,modele='codon')
identical(all.equal(uco(new),uco(sequence)),TRUE)
new=permutation(sequence,modele='syncodon',numcode=1)
identical(all.equal(translate(new),translate(sequence)),TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.