Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format error #65

Open
Ray569743422 opened this issue Jan 29, 2024 · 1 comment
Open

Format error #65

Ray569743422 opened this issue Jan 29, 2024 · 1 comment

Comments

@Ray569743422
Copy link

Ray569743422 commented Jan 29, 2024

When I use this code :

mc.pl.related_genes.relate_to_lateral_genes(data, random_seed=0)

I meet this error:

/dellfsqd2/ST_OCEAN/USER/wangrui21/03.software/anaconda3/envs/stana/lib/python3.11/site-packages/metacells/utilities/computation.py:357: UserWarning: sum of rows of a matrix with column_major layout warn(operating_on_matrix_of_wrong_layout) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/dellfsqd2/ST_OCEAN/USER/wangrui21/03.software/anaconda3/envs/stana/lib/python3.11/site-packages/metacells/utilities/logging.py", line 384, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/dellfsqd2/ST_OCEAN/USER/wangrui21/03.software/anaconda3/envs/stana/lib/python3.11/site-packages/metacells/pipeline/related_genes.py", line 96, in relate_to_lateral_genes fraction_per_gene_per_cell = ut.fraction_by(umis_per_cell_per_gene, by="row") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/dellfsqd2/ST_OCEAN/USER/wangrui21/03.software/anaconda3/envs/stana/lib/python3.11/site-packages/metacells/utilities/computation.py", line 1495, in fraction_by return scale_by(proper, scale, by=by) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/dellfsqd2/ST_OCEAN/USER/wangrui21/03.software/anaconda3/envs/stana/lib/python3.11/site-packages/metacells/utilities/computation.py", line 1464, in scale_by assert utt.matrix_layout(result) == utt.matrix_layout(compressed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

The data of input is standard anndata format,could you help me?

@orenbenkiki
Copy link
Collaborator

I'm assuming you are using the latest published version (0.9.4)?

This is probably due to scipy changing subtle implementation details and my assert has detected the change. Again. Sigh.

Workaround... Hmmm...

In the file /dellfsqd2/ST_OCEAN/USER/wangrui21/03.software/anaconda3/envs/stana/lib/python3.11/site-packages/metacells/utilities/computation.py
In line number 1464
Replace the line with result = to_layout(result, utt.matrix_layout(compressed))
That is, force the result layout instead of asserting it is as expected.

I'll push this into the next version (0.9.5) when it is published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants