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

Error with normalize_total() #109

Open
sjbegg opened this issue Nov 8, 2021 · 2 comments
Open

Error with normalize_total() #109

sjbegg opened this issue Nov 8, 2021 · 2 comments

Comments

@sjbegg
Copy link

sjbegg commented Nov 8, 2021

I'm running through the Buenrostro tutorial to test out using Episcanpy, but am hitting the following error when trying to normalize. I'd appreciate any pointers in what to do, please.

epi.pp.normalize_total(adata)

returns the following error:

FutureWarning:../lib/python3.9/site-packages/scanpy/preprocessing/_normalization.py:141: The `layer_norm` argument is deprecated. Specify the target size factor directly with `target_sum`.
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/tmp/ipykernel_378952/1227047011.py in <module>
----> 1 epi.pp.normalize_total(adata)

~/lib/python3.9/site-packages/episcanpy/preprocessing/_scanpy_fct.py in normalize_total(adata, target_sum, exclude_highly_expressed, max_fraction, key_added, layers, layer_norm, inplace)
    426     """
    427 
--> 428     sc.pp.normalize_total(adata, target_sum, exclude_highly_expressed, 
    429         max_fraction, key_added, layers, layer_norm, inplace)
    430 

~/lib/python3.9/site-packages/scanpy/preprocessing/_normalization.py in normalize_total(adata, target_sum, exclude_highly_expressed, max_fraction, key_added, layer, layers, layer_norm, inplace, copy)
    203         after = None
    204     else:
--> 205         raise ValueError('layer_norm should be "after", "X" or None')
    206 
    207     for layer_to_norm in layers if layers is not None else ():

ValueError: layer_norm should be "after", "X" or None
@DaneseAnna
Copy link
Collaborator

Hi, thank you for the feedback.

It looks like a new compatibility issue with scanpy. I will produce a fix on the main branch and will let you know when it's available.
In the mean time, you can try downgrading scanpy to 1.7.2

@sjbegg
Copy link
Author

sjbegg commented Nov 8, 2021

Thanks for replying so quickly - the scanpy downgrade has worked, and I'll update once you add the fix.

Thanks again!

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