Skip to content

error in add_tile_matrix #201

@xuzhougeng

Description

@xuzhougeng

When I create matrices of different sizes, I get an error reported, what should I do about it?

The code is as follows

# add first
snap.pp.add_tile_matrix(data, bin_size=500, inplace=True)
# try to replace with another
snap.pp.add_tile_matrix(data, bin_size=200, inplace=True)

The error is reported as follows

{
File ~/miniforge3/lib/python3.10/site-packages/snapatac2/preprocessing/_basic.py:426, in add_tile_matrix(adata, bin_size, inplace, chunk_size, exclude_chroms, min_frag_size, max_frag_size, file, backend, n_jobs)
    420         snapatac2._utils.anndata_par(
    421             adata,
    422             lambda x: internal.mk_tile_matrix(x, bin_size, chunk_size, exclude_chroms, None),
    423             n_jobs=n_jobs,
    424         )
    425     else:
--> 426         internal.mk_tile_matrix(adata, bin_size, chunk_size, exclude_chroms, min_frag_size, max_frag_size, None)
    427 else:
    428     if file is None:

RuntimeError: dimension cannot be changed from 238296 to 595735"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions