def generate_poisson_lineage(n_states, n_cells_per_cluster, n_genes, means=<NUM_LIT>):
<EOL>M = np.random.random((n_genes, n_states))*means<EOL>center = M.mean(<NUM_LIT:1>)<EOL>W = np.zeros((n_states, n_cells_per_cluster*n_states))<EOL>index = <NUM_LIT:0><EOL>means = np.array([<NUM_LIT:1.0>/n_states]*n_states)<EOL>for c in range(n_states):<EOL><INDENT>for i in range(n_cells_per_cluster):<EOL><INDENT>w = np.copy(means)<EOL>new_value = w[c] + i*(<NUM_LIT:1.0> - <NUM_LIT:1.0>/n_states)/n_cells_per_cluster<EOL>w[:] = (<NUM_LIT:1.0> - new_value)/(n_states - <NUM_LIT:1.0>)<EOL>w[c] = new_value<EOL>W[:, index] = w<EOL>index += <NUM_LIT:1><EOL><DEDENT><DEDENT>return M, W<EOL>
Generates a lineage for each state- assumes that each state has a common
ancestor.

Returns:
    M - genes x clusters
    W - clusters x cells