Package Bio :: Package SeqUtils :: Module CodonUsage :: Class CodonAdaptationIndex
[hide private]
[frames] | no frames]

Class CodonAdaptationIndex

source code

This class implements the codon adaptaion index (CAI) described by Sharp and Li (Nucleic Acids Res. 1987 Feb 11;15(3):1281-95).

methods:

set_cai_index(Index):

This mehtod sets-up an index to be used when calculating CAI for a gene. Just pass a dictionary similar to the SharpEcoliIndex in CodonUsageIndices module.

generate_index(FastaFile):

This method takes a location of a FastaFile and generates an index. This index can later be used to calculate CAI of a gene.

cai_for_gene(DNAsequence):

This mehtod uses the Index (either the one you set or the one you generated) and returns the CAI for the DNA sequence.

print_index(): This method prints out the index you used.

Instance Methods [hide private]
 
__init__(self) source code
 
set_cai_index(self, Index) source code
 
generate_index(self, FastaFile) source code
 
cai_for_gene(self, DNAsequence) source code
 
_count_codons(self, FastaFile) source code
 
print_index(self) source code