Package: codonw-slim
codonw-slimCodonW is a package for codon usage analysis written by John Peden in
Paul Sharp's group (University of Nottingham).
It was originally designed to simplify multivariate analysis of codon usage
with other metrics related to codon usage calculated.codonw-slim refactors the original codebase to add Python bindings to the
underlying methods written in C and to focus on theothercodon usage
metrics. See below for a list of metrics and their usage.A detailed description of each metric, with references, can be found in
in the docstrings of Python methods (codonw/codonwlib/codonw.pyx).
All of the multivariate analysis code has been removed since this sort of
analysis is more easily done in a higher level language
(e.g.FactoMineR).
The interative interface has also been removed.No error checking of nucleotide sequences is done, e.g. for start,
stop codons, internal stops codons, non-translatable, and partial codons.
Users should do this themself to inputs provided. For more information about
how amino acids and codons have are represented internally (Recoding.md).The source code and releases for codonw-slim can be obtained fromhttps://www.github.com/smsaladi/codonw-slim. Please report bugs and improvements
via pull requests at this repository. All modifications must pass regression
testing.Build and Installationpipinstallcodonw-slimUsageThe following metrics are available:codon adaptation index (CAI)CodonSeq.caifrequency of optimal codons (Fop)CodonSeq.fopcodon bias index (CBI)CodonSeq.cbithe effective number of codons (Nc)CodonSeq.enchydropathicity of proteinCodonSeq.hydropathyaromaticity scoreCodonSeq.aromaticitySilent base composition (including GC3s)CodonSeq.silent_base_usageCodon & Amino acid usage (count and relative)CodonSeq.codon_usageCodonSeq.aa_usageCodonSeq.rscuCodonSeq.raauBase composition by codon positionCodonSeq.basesBase composition in all frames,
Length of gene,
Number of synonymous codons,
G+C content (overall and by codon position),
G+C content of synonymous codons at the 3rd position,
G+C content of non-synonymous codons at the 3rd position,
Number of synonymous codons,
Number of amino acidsCodonSeq.bases2Dinucleotide count by frameCodonSeq.dinucAs written above, each is a method of thecodonw.CononSeqobject, e.g.importcodonwcseq=codonw.CodonSeq("ATGAATATGCTCATTGTCGGTAGAGTTGTTGCTAGTGTTGGGGGAAGCGGACTTCAAACG")cseq.cai()The return type can be a simple value,pd.Series, orpd.DataFrame.The genetic codes can be specified by setting theCodonSeq.genetic_codeproperty with apd.Serieswhose index is a codon and value is the single
letter amino acid. Instantiate an object and seeCodonSeq.genetic_codefor more details.Some indicies have an option of reference values to choose from (e.g.CodonSeq.fop).
Several references values can be chosen by specifying the corresponding integer.
If you'd like to have user-provided reference values, please implement this
functionality and make a pull-request.Why the name codonW?Excerpted directly from John Peden's CodonW README...Well first you must realise that "clustal" (a very popular multiple
alignment program by Des Higgins) was originally written in Paul's lab in
Trinity College Dublin. Clustal has since been rewritten from FORTRAN into
C and undergone several name changes clustal-> clustalv-> clustalw ->
clustalx. There was also a program called "codons" written in FORTRAN by
Andrew Lloyd (a post-doc in Paul's lab), this was the original inspiration
for codonW. An early version of codonW, written in C, was called codonv.
When the code was enhanced to include multivariate analysis, what better
name than codonW.