Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::HMM::MarkovModel::MarkovModelBuilder::allow_all_transitions (   self  ) 

A convenience function to create transitions between all states.

By default all transitions within the alphabet are disallowed; this
is a way to change this to allow all possible transitions.

Definition at line 141 of file MarkovModel.py.

00141                                    :
        """A convenience function to create transitions between all states.

        By default all transitions within the alphabet are disallowed; this
        is a way to change this to allow all possible transitions.
        """
        # first get all probabilities and pseudo counts set
        # to the default values
        all_probs = self._all_blank(self._state_alphabet,
                                    self._state_alphabet)

        all_pseudo = self._all_pseudo(self._state_alphabet,
                                      self._state_alphabet)

        # now set any probabilities and pseudo counts that
        # were previously set
        for set_key in self.transition_prob.keys():
            all_probs[set_key] = self.transition_prob[set_key]

        for set_key in self.transition_pseudo.keys():
            all_pseudo[set_key] = self.transition_pseudo[set_key]

        # finally reinitialize the transition probs and pseudo counts
        self.transition_prob = all_probs
        self.transition_pseudo = all_pseudo

    def allow_transition(self, from_state, to_state, probability = None,


Generated by  Doxygen 1.6.0   Back to index