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

Scaden simulate ValueError: low >= high #109

Closed
mHagiw opened this issue Aug 20, 2021 · 3 comments
Closed

Scaden simulate ValueError: low >= high #109

mHagiw opened this issue Aug 20, 2021 · 3 comments

Comments

@mHagiw
Copy link

mHagiw commented Aug 20, 2021

Hi,

Thanks for your great work on scaden.

I've been recently trying to use scaden to recognize cell fractions.
With the newly released Scaden v1.1.2, I tried to run the 'scaden simulate' command but resulted in the same error showing

File "/home/mhagiwara/Programs/anaconda3/envs/scaden/lib/python3.9/site-packages/scaden/simulation/bulk_simulator.py", line 305, in create_subsample
cells_fraction = np.random.randint(0, cells_sub.shape[0], samp_fracs[i])
File "mtrand.pyx", line 747, in numpy.random.mtrand.RandomState.randint
File "_bounded_integers.pyx", line 1254, in numpy.random._bounded_integers._rand_int64
ValueError: low >= high

My command for 'scaden simuate' is:
scaden simulate -n 100 --data ./scanpy --pattern "_counts.txt"

The count data file '_counts.txt' has been generated following the normalization steps of your example in jupyter script, containing 19770 genes (column) and 83085 cells (row). Formatted as follows.

count
スクリーンショット 2021-08-20 17 38 18

celltype
スクリーンショット 2021-08-20 17 39 10

I checked row number & column number in both data.

I suppose something is wrong with the format, but have tried several times and couldn't figure out the reason.
May I have your suggestion on this issue? Thanks a lot!

Masaki

@KevinMenden
Copy link
Owner

Hi @mHagiw ,

thanks for reporting this issue!
I will try to have a look at it as soon as possible - hopefully this weekend :)

Best,
Kevin

@mHagiw
Copy link
Author

mHagiw commented Aug 20, 2021

Thanks for quite quick response!

I am waiting expectantly.

I tried to minimize my data.
In result, df.head(4000) was passed but df.head(5000) not passed.

So, I suspect 4001~5000 row have any error.

Best regard,
Masaki

@mHagiw
Copy link
Author

mHagiw commented Aug 23, 2021

Hi,

Sorry, I found my problem of my df.

Celltypes df have some NaN.

I solve problem. I'm able to try the next steps with Scaden now!

Thanks.
Masaki

@mHagiw mHagiw closed this as completed Aug 23, 2021
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