def F81(mu=<NUM_LIT:1.0>, pi=None, alphabet="<STR_LIT>", **kwargs):
if pi is None:<EOL><INDENT>pi=<NUM_LIT>*np.ones(<NUM_LIT:4>, dtype=float)<EOL><DEDENT>num_chars = len(alphabets[alphabet])<EOL>pi = np.array(pi, dtype=float)<EOL>if num_chars != len(pi) :<EOL><INDENT>pi = np.ones((num_chars, ), dtype=float)<EOL>print ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>W = np.ones((num_chars,num_chars))<EOL>pi /= (<NUM_LIT:1.0> * np.sum(pi))<EOL>gtr = GTR(alphabet=alphabets[alphabet])<EOL>gtr.assign_rates(mu=mu, pi=pi, W=W)<EOL>return gtr<EOL>
Felsenstein 1981 model. Assumes non-equal concentrations across nucleotides,
but the transition rate between all states is assumed to be equal. See
Felsenstein (1981), J. Mol. Evol. 17  (6): 368–376. doi:10.1007/BF01734359
for details.

Current implementation of the model does not account for the gaps (treatment of
gaps as characters is possible if specify alphabet='nuc_gap').

Parameters
-----------


 mu : float
    Substitution rate

 pi : numpy.array
    Nucleotide concentrations

 alphabet : str
    Alphabet to use. POsiible values are: ['nuc', 'nuc_gap'] Default 'nuc', which discounts al gaps.
    'nuc_gap' alphabet enables treatmen of gaps as characters.