Skip to content

Commit

Permalink
Prep for PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Lee committed Aug 16, 2017
2 parents af9a297 + 4ff618d commit 0393cbf
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<<<<<<< HEAD
# Python Codon Adaptation Index
=======
# CAI.py: Python Codon Adaptation Index
>>>>>>> 4ff618de9bd610dcc95732c2bbf92b646c696ff2
An implementation of Sharp and Li's 1987 formulation of the codon adaption index.

Expand All @@ -10,11 +14,35 @@ Sharp, P. M., & Li, W. H. (1987). The codon adaptation index--a measure of direc

## Usage
### Simple Usage
<<<<<<< HEAD
The simple
=======
The simplest way to calculate the CAI of a sequence is to call `CAI()` with the sequence as the first (required) argument and with the `sequences` argument included. The sequences argument is a list of reference sequences. Determining which sequences to use as the reference set is left to the user.
>>>>>>> 4ff618de9bd610dcc95732c2bbf92b646c696ff2
```python

from CAI import CAI

print CAI("ATGGATTAC...", sequences=["ATGTTTGCTAAA", "ATGCGATACAGC",...])

```
<<<<<<< HEAD
```
=======
```
### Advanced Usage
If you have already computed the weights or RSCU values of the reference set, you can supply `CAI()` with one or the other as arguments. They must be formatted as a dictionary and contain values for every codon.
To calculate the RSCU without calculating the CAI, you can use `RSCU()`. `RSCU()`s only required parameter a list of sequences.
Similarly, to calculate the weights of a reference set, you can use `relative_adaptiveness()`. `relative_adaptiveness()` takes either a list of sequences as the `sequences` parameter or a dictionary of RSCUs as the `RSCUs` parameter.
### Other Genetic Codes
All functions in CAI support an optional `genetic_code` parameter, which is set by default to 1 (the standard genetic code). You may set it to any genetic code within [gc.prt](/gc.prt).
## Contributing
Feel free to contribute, open issues, or let me know about bugs. Anything is welcome!
## Contact
I'm available for contact at [benjamin_lee@college.harvard.edu](mailto:benjamin_lee@college.harvard.edu).
>>>>>>> 4ff618de9bd610dcc95732c2bbf92b646c696ff2

0 comments on commit 0393cbf

Please sign in to comment.