uco {seqinr}R Documentation

Create codon usage table

Description

uco calculates some codon usage index: the codon count eff, the absolute frequencies freq or the Relative Synonymous Codon Usage rscu.

Usage

uco( seq, frame = 0, index = c("eff","freq","rscu"), as.data.frame = FALSE) 

Arguments

seq a vector of chars
frame an integer (0,1,2) giving the frame
index One of this value
as.data.frame logical. If TRUE: The eff, freq and rscu index will be returned in a data frame.

Value

If as.data.frame is TRUE uco returns a data frame with five columns:

aa a vector containing the name of amino-acid
codon a vector containing the corresponding codon
eff a numeric vector containing effectifs of codons
freq a numeric vector containing frequencies of codons
rscu a numeric vector containing the relative synonymous codon usage
eff a factor containing effectifs of codons
freq a factor containing frequencies of codons
rscu a factor containing the relative synonymous codon usage

Author(s)

D. Charif

References

  To have an overview of the seqinR's functionnality, please consult this vignette: Charif, D., Lobry, J.R. (2005) SeqinR: a contributed package to the R project for statistical computing devoted to biological sequences retrieval and analysis. Springer Verlag, Biological and Medical Physics/Biomedical Series, in preparation.

Examples

s = read.fasta(File=system.file("sequences/malM.fasta",package = "seqinr"))
uco( s[[1]], index="freq")
uco( s[[1]], index="eff")
uco( s[[1]], index="rscu")
uco( s[[1]], as.data.frame = TRUE)

[Package seqinr version 1.0-2 Index]