<commit_before>Python Codon Adaptation Index
=============================
|DOI| |Docs| |Travis| |CodeFactor| |PyPI|

An implementation of `Sharp and Li's 1987
formulation <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC340524/pdf/nar00247-0410.pdf>`_
of the `codon adaption index
<https://en.wikipedia.org/wiki/Codon_Adaptation_Index>`_.

Installation
------------

This module is available from PyPi and can be downloaded with the following command::

	$ pip install CAI

To install the latest development version::

	$ pip install git+https://github.com/Benjamin-Lee/CodonAdaptationIndex.git

.. _quickstart:

Quickstart
----------

Finding the CAI of a sequence is easy::

	>>> from CAI import CAI
	>>> CAI("ATG...", reference=["ATGTTT...", "ATGCGC...",...])
	0.24948128951724224

Similarly, from the command line::

	$ CAI -s sequence.fasta -r reference_sequences.fasta
	0.24948128951724224
<commit_msg>Fix PyPi to PyPI<commit_after>Python Codon Adaptation Index
=============================
|DOI| |Docs| |Travis| |CodeFactor| |PyPI|

An implementation of `Sharp and Li's 1987
formulation <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC340524/pdf/nar00247-0410.pdf>`_
of the `codon adaption index
<https://en.wikipedia.org/wiki/Codon_Adaptation_Index>`_.

Installation
------------

This module is available from PyPI and can be downloaded with the following command::

	$ pip install CAI

To install the latest development version::

	$ pip install git+https://github.com/Benjamin-Lee/CodonAdaptationIndex.git

.. _quickstart:

Quickstart
----------

Finding the CAI of a sequence is easy::

	>>> from CAI import CAI
	>>> CAI("ATG...", reference=["ATGTTT...", "ATGCGC...",...])
	0.24948128951724224

Similarly, from the command line::

	$ CAI -s sequence.fasta -r reference_sequences.fasta
	0.24948128951724224

{'fraction_non_alphanumeric': 0.17300275482093663, 'fraction_numerical': 0.06060606060606061, 'mean_word_length': 4.072625698324022, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1135197', 'n_tokens_mistral': 710, 'n_tokens_neox': 597, 'n_words': 163}