Skip to content

Commit 0393cbf

Browse files
committed
Prep for PyPI
2 parents af9a297 + 4ff618d commit 0393cbf

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
<<<<<<< HEAD
12
# Python Codon Adaptation Index
3+
=======
4+
# CAI.py: Python Codon Adaptation Index
5+
>>>>>>> 4ff618de9bd610dcc95732c2bbf92b646c696ff2
26
37
An implementation of Sharp and Li's 1987 formulation of the codon adaption index.
48

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

1115
## Usage
1216
### Simple Usage
17+
<<<<<<< HEAD
1318
The simple
19+
=======
20+
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.
21+
>>>>>>> 4ff618de9bd610dcc95732c2bbf92b646c696ff2
1422
```python
1523

1624
from CAI import CAI
1725

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

20-
```
28+
<<<<<<< HEAD
29+
```
30+
=======
31+
```
32+
### Advanced Usage
33+
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.
34+
35+
To calculate the RSCU without calculating the CAI, you can use `RSCU()`. `RSCU()`s only required parameter a list of sequences.
36+
37+
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.
38+
39+
### Other Genetic Codes
40+
41+
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).
42+
43+
## Contributing
44+
Feel free to contribute, open issues, or let me know about bugs. Anything is welcome!
45+
46+
## Contact
47+
I'm available for contact at [benjamin_lee@college.harvard.edu](mailto:benjamin_lee@college.harvard.edu).
48+
>>>>>>> 4ff618de9bd610dcc95732c2bbf92b646c696ff2

0 commit comments

Comments
 (0)