seqinr (version 1.0-1)

uco: 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:
  • aaa vector containing the name of amino-acid
  • codona vector containing the corresponding codon
  • effa numeric vector containing effectifs of codons
  • freqa numeric vector containing frequencies of codons
  • rscua numeric vector containing the relative synonymous codon usage
  • If as.data.frame is FALSE, uco returns one of this index:
  • effa factor containing effectifs of codons
  • freqa factor containing frequencies of codons
  • rscua factor containing the relative synonymous codon usage

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

Run this code
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)

Run the code above in your browser using DataLab