Skip to main content

Build Status PyPI version PyPI - Downloads DOI

codonw-slim

CodonW 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 the other codon 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 from https://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 Installation

pip install codonw-slim

Usage

The following metrics are available:

  • codon adaptation index (CAI)
    • CodonSeq.cai
  • frequency of optimal codons (Fop)
    • CodonSeq.fop
  • codon bias index (CBI)
    • CodonSeq.cbi
  • the effective number of codons (Nc)
    • CodonSeq.enc
  • hydropathicity of protein
    • CodonSeq.hydropathy
  • aromaticity score
    • CodonSeq.aromaticity
  • Silent base composition (including GC3s)
    • CodonSeq.silent_base_usage
  • Codon & Amino acid usage (count and relative)
    • CodonSeq.codon_usage
    • CodonSeq.aa_usage
    • CodonSeq.rscu
    • CodonSeq.raau
  • Base composition by codon position
    • CodonSeq.bases
  • Base 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 acids
    • CodonSeq.bases2
  • Dinucleotide count by frame
    • CodonSeq.dinuc

As written above, each is a method of the codonw.CononSeq object, e.g.

import codonw
cseq = codonw.CodonSeq("ATGAATATGCTCATTGTCGGTAGAGTTGTTGCTAGTGTTGGGGGAAGCGGACTTCAAACG")
cseq.cai()

The return type can be a simple value, pd.Series, or pd.DataFrame.

The genetic codes can be specified by setting the CodonSeq.genetic_code property with a pd.Series whose index is a codon and value is the single letter amino acid. Instantiate an object and see CodonSeq.genetic_code for 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.

Metadata

Release files for codonw-slim 1.5.0.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codonw-slim 1.5.0.post1
File Size Uploaded Provenance Actions
codonw-slim-1.5.0.post1.tar.gz 174.4 kB Without provenance Details for codonw-slim-1.5.0.post1.tar.gz

Release files / codonw-slim-1.5.0.post1.tar.gz

Download URL codonw-slim-1.5.0.post1.tar.gz
Size 174.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1482daa7272d243d7fc9cee77ccb6a38356bdbe140dd5fc53e37879141d20681
BLAKE2b-256 checksum
How to use checksums
b0e61ca93c1c64a5412240121ebf76ae0d69bd165757a43a5488254f3aded797
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

Security for codonw-slim 1.5.0.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.5.0.post1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page