codonpair
codonpair calculates codon pair score and codon pair bias. CPS
values are identical to those produced by the perl script from
Dimitris Papamichail (cps_perl directory) and, presumably,
used in the following work:
Virus attenuation by genome-scale changes in codon pair bias.
Coleman JR1, Papamichail D, Skiena S, Futcher B, Wimmer E, Mueller S.
Science. 2008 Jun 27;320(5884):1784-7. doi: 10.1126/science.1155761.
https://www.ncbi.nlm.nih.gov/pubmed/18583614
Installation
Either, clone the repo and install with pip
git clone git@github.com:smsaladi/codonpair.git
pip install ./codonpair
Or... have pip handle the details:
pip install git+git://github.com/smsaladi/codonpair@master#codonpair
All dependencies should be checked for and, if necessary, installed
automatically by pip.
Usage
Initialize a codonpair.CodonPair object by specifying a list of reference sequences
CodonPair.from_sequences, from a named reference CodonPair.from_named_reference,
a reference file CodonPair.from_reference_file,
or simply providing a pd.DataFrame with codon counts to CodonPair.
The following named references are recognized/bundled with this package.
E. coli(BL21 DE3)S. pneumoniae(TIGR4)cps_perl- the reference file provided with the perl implementation
The default constructor CodonPair() uses the E. coli.
Then calculate the codon pair score for a provided sequence with CodonPair.cpb
which returns a dictionary with the
- total codon pair score
total_cps- the sum of the values of each codon pair - the number of codons
n_pair- excluding codon pairs not found in the reference - the codon pair bias
cpb-total_cps/n_pair
For one-off calculations, codonpair.calc_cpb can be used directly
for with the sequence of interest (calling the default constructor under the hood).
import codonpair
cp = codonpair.CodonPair.from_named_reference('E. coli')
cp.cpb("ATGATCCCCTTACAACATGGACTGATCCTCGCGGCAATCTTATTCGTTCTTGGCTTAACC")
For convenience, the executable cps installed into the path by pip:
cps test.fasta > test.scores.txt
See CodonPair.write_reference to write codon pair counts for a reference set to
the filename provided to be used with future calculations.
Metadata
Release files for codonpair 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codonpair-0.1.1.tar.gz | 6.4 kB | Without provenance | Details for codonpair-0.1.1.tar.gz |
Release files / codonpair-0.1.1.tar.gz
| Download URL | codonpair-0.1.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b4b9f061fa4ebd2561f78f726c5a5fedfd379437f373f98289bb264dcf3f628
|
|
BLAKE2b-256 checksum How to use checksums |
06ac54357353ed996e126bb5a66d42221d45c35cb13edf5267a2b328622343bc
|
| 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 codonpair 0.1.1
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.