Table of Contents

Module: __init__ Bio/SubsMat/__init__.py
Imported modules   
from Bio import Alphabet
from Bio.SubsMat import FreqTable
import UserDict
import copy
import math
import re
import string
import sys
Functions   
_build_exp_freq_mat
_build_log_odds_mat
_build_obs_freq_mat
_build_subs_mat
_exp_freq_table_from_obs_freq
make_log_odds_matrix
observed_frequency_to_substitution_matrix
read_text_matrix
two_mat_DJS
two_mat_relative_entropy
  _build_exp_freq_mat 
_build_exp_freq_mat ( exp_freq_table )

Build an expected frequency matrix exp_freq_table: should be a FreqTable instance

  _build_log_odds_mat 
_build_log_odds_mat (
        subs_mat,
        logbase=2,
        factor=10.0,
        round_digit=0,
        keep_nd=0,
        )

_build_log_odds_mat(subs_mat,logbase=10,factor=10.0,round_digit=1): Build a log-odds matrix logbase=2: base of logarithm used to build (default 2) factor=10.: a factor by which each matrix entry is multiplied round_digit: roundoff place after decimal point keep_nd: if true, keeps the -999 value for non-determined values (for which there are no substitutions in the frequency substitutions matrix). If false, plants the minimum log-odds value of the matrix in entries containing -999

Build a log-odds matrix

  _build_obs_freq_mat 
_build_obs_freq_mat ( acc_rep_mat )

build_obs_freq_mat(acc_rep_mat): Build the observed frequency matrix, from an accepted replacements matrix The accRep matrix should be generated by the user.

  _build_subs_mat 
_build_subs_mat ( obs_freq_mat,  exp_freq_mat )

Build the substitution matrix

Build the substitution matrix

Exceptions   
ValueError, "Alphabet mismatch in passed matrices"
  _exp_freq_table_from_obs_freq 
_exp_freq_table_from_obs_freq ( obs_freq_mat )

  make_log_odds_matrix 
make_log_odds_matrix (
        acc_rep_mat,
        exp_freq_table=None,
        logbase=2,
        factor=1.,
        round_digit=9,
        keep_nd=0,
        )

External function. User provides an accepted replacement matrix, and, optionally the following: expected frequency table, log base, mult. factor, and rounding factor. Generates a log-odds matrix, calling internal SubsMat functions.

  observed_frequency_to_substitution_matrix 
observed_frequency_to_substitution_matrix ( obs_freq_mat )

  read_text_matrix 
read_text_matrix ( data_file,  mat_type=NOTYPE )

  two_mat_DJS 
two_mat_DJS (
        mat_1,
        mat_2,
        pi_1=0.5,
        pi_2=0.5,
        )

Jensen-Shannon Distance Need to input observed frequency matrices

  two_mat_relative_entropy 
two_mat_relative_entropy (
        mat_1,
        mat_2,
        logbase=2,
        diag=diagALL,
        )

Classes   
BadMatrix

Exception raised when verifying a matrix

SeqMat

A Generic sequence matrix class


Table of Contents

This document was automatically generated on Mon Jul 1 12:02:57 2002 by HappyDoc version 2.0.1