Open Movahedilab opened 3 years ago
Hi @Movahedilab,
thanks for your report!
I wasn't able to reproduce the error using datasets.wu2020_3k()
, the indicated versions and your notebook.
Since the input numbers of your notebook are not consistent, I assume that you may have done something with adata
that is
not part of the notebook and causes the error.
Or have you modified the numpy error handling, e.g. using seterr? Because I do get a warning about zero division, but not an error.
Can you bring down the problem to a minimal reproducible example?
Apart from that, I would be curious on how you are planning to apply the clonotype_imbalance
function to your data. We still
consider this function experimental, and I am currently working on an improved/modified version and I would be interested to know if it still meets your use case.
Cheers, Gregor
Hi Gregor,
Thanks for the quick response!
I don't have much experience in python, but I have attached what I hope is a reproducible example. I haven't changed anything in the numpy settings and I didn't do any modifications to the adata.
I have also tried to run the tutorial on my dataset, using the same kernel, and surprisingly pl.clonotype_imbalance worked, though sc.pl.umap of specific clonotypes still gave the same error (see the second attached notebook).
Regarding your question on my plans for clonotype_imbalance, I won't be able to use it for the data I am working at the moment, as it doesn't have any expanded clonotypes. But for future datasets, I find this function very interesting for digging more in depth in the differences between clonotypes.
I have another question/comment. In the second attached notebook (DL017-018-example.ipynb), when I plot "clonal_expansion" and "clonotype_size", I get cells from the 1, 2 and >=3 category:
However ,in this dataset, mostly the cells in the upper cluster are B cells, and all the remaining cells do not have BCRs, so they should be in a category "0". These cells correctly have "has_ir"=False, but "clonal_expansion"=1:
Best, Daliya
From: Gregor Sturm notifications@github.com Sent: Monday, March 1, 2021 2:23 PM To: icbi-lab/scirpy scirpy@noreply.github.com Cc: Movahedilab daliya.kancheva@vib.be; Mention mention@noreply.github.com Subject: Re: [icbi-lab/scirpy] Errors when running ir.pl.clonotype_imbalance and sc.pl.umap of specific clonotypes (#244)
Hi @Movahedilabhttps://github.com/Movahedilab,
thanks for your report! I wasn't able to reproduce the error using datasets.wu2020_3k(), the indicated versions and your notebook. Since the input numbers of your notebook are not consistent, I assume that you may have done something with adata that is not part of the notebook and causes the error.
Or have you modified the numpy error handling, e.g. using seterrhttps://numpy.org/doc/stable/reference/generated/numpy.seterr.html#numpy.seterr? Because I do get a warning about zero division, but not an error.
Can you bring down the problem to a minimal reproducible examplehttps://stackoverflow.com/help/minimal-reproducible-example?
Apart from that, I would be curious on how you are planning to apply the clonotype_imbalance function to your data. We still consider this function experimental, and I am currently working on an improved/modified version and I would be interested to know if it still meets your use case.
Cheers, Gregor
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/icbi-lab/scirpy/issues/244#issuecomment-787945396, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBXVL42X37WJDFXMPDATG3TBOINBANCNFSM4YINGN2A.
Hi Daliya,
unfortunately GitHub discards attachments sent by email. Could you please upload them using the web interface so that I can look into this?
Best, Gregor
Sorry, here they are: Examples_scirpy.zip
Thanks!
For me it runs through, although still with the warnings. Could you try to run
np.seterr(all="warn")
at the beginning of your notebook? I am starting to suspect you might have different default numpy setting -- for whatever reason.
Thanks for all the effort! I ran the same notebook with np.seterr(all="warn"): Scirpy_3kT_cancer_error_example.zip
Maybe different column types are the problem? https://github.com/pandas-dev/pandas/issues/17190
Yet that doesn't explain why it works for me, but not for you with the same versions. I'll keep this open and look into it when I have a bit more time.
Thank you for the really great tool! I was trying to rerun the tutorial, but I got several errors. I would appreciate any help on what could have gone wrong. Two of them were while running ir.pl.clonotype_imbalance:
Second error:
And third error occured when trying to plot Top differential clonotypes between CD8_Teff and CD8_Trm clsuters on a UMAP:
Here are the package versions I have:
scanpy==1.7.1 anndata==0.7.3 umap==0.4.4 numpy==1.18.1 scipy==1.4.1 pandas==1.0.1 scikit-learn==0.22.1 statsmodels==0.11.0 python-igraph==0.7.1 leidenalg==0.8.0 scirpy==0.6.1
Here is the whole code I used: Scirpy_tutorial_3kT_cancer.zip
Thanks in advance!