Beispiel #1
0
def test_save_npz(matrix, tmpdir):
    output_file = tmpdir.join('expression.npz').strpath
    matrix.save_npz(output_file)

    recovered_matrix = ExpMatrix.load_npz(output_file)

    assert recovered_matrix.equals(matrix)
Beispiel #2
0
def denoised_matrix():
    expression_file = resource_filename(
        'monet', 'data/test/pbmc_100_denoised_expression.npz')
    return ExpMatrix.load_npz(expression_file)
Beispiel #3
0
def test_load_npz(expression_npz_file):

    matrix = ExpMatrix.load_npz(expression_npz_file)
    assert matrix.values.dtype == np.uint32
    assert matrix.num_genes == 14384
    assert matrix.num_cells == 100
Beispiel #4
0
def matrix(expression_npz_file):
    matrix = ExpMatrix.load_npz(expression_npz_file)
    return matrix