#
# Copyright John Reid 2007
#

print 'testing gapped pssms'

import numpy

try: hmm
except: import biopsy.gapped_pssms as hmm


def print_model( m ):
    print 'rho'
    print m.var_dist.rho
    print 'eta'
    print m.var_dist.eta
    print 'tau'
    print m.var_dist.tau


def create_model(
        K,
        sequences,
        psi = 0.01 * numpy.ones( 4 ),
        theta = 100.0 * numpy.ones( 4 ),
        phi = numpy.array( [ 9.5, 0.5 ] ),
        upsilon = numpy.array( [ 99.0, 1.0 ] )
):
    print 'testing state map'
    state_map = hmm.StateMap( K )
    hmm.test_state_map( state_map )
    assert K == state_map.K
    state_map.S
    state_map.b
    state_map.c
    state_map.g
    state_map.k
    state_map.m
    state_map.s

    print 'Creating sequences'
    s = hmm.ObservedSequences( sequences )
    print s.sequences
    assert s.N == len( sequences )
    assert s.I(0) == len( sequences[ 0 ] )

    print 'Creating data'
    d = hmm.ObservedData(