Back to index

python-biopython  1.60
Classes | Functions | Variables
Bio.SubsMat.FreqTable Namespace Reference

Classes

class  FreqTable
 A class to handle frequency tables Copyright Iddo Friedberg idoer.nosp@m.g@cc.nosp@m..huji.nosp@m..ac..nosp@m.il Biopython (http://biopython.org) license applies Methods to read a letter frequency or a letter count file: Example files for a DNA alphabet: More...

Functions

def read_count
def read_freq

Variables

int COUNT = 1
int FREQ = 2

Function Documentation

Definition at line 76 of file FreqTable.py.

00076 
00077 def read_count(f):
00078     count = {}
00079     for line in f:
00080         key, value = line.strip().split()
00081         count[key] = int(value)
00082     freq_table = FreqTable(count,COUNT)
00083     return freq_table

Definition at line 84 of file FreqTable.py.

00084 
00085 def read_freq(f):
00086     freq_dict = {}
00087     for line in f:
00088         key, value = line.strip().split()
00089         freq_dict[key] = float(value) 
00090     return FreqTable(freq_dict,FREQ)
00091 

Variable Documentation

Definition at line 2 of file FreqTable.py.

Definition at line 3 of file FreqTable.py.