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 example sometimes breaks #85

Open
KevinMenden opened this issue Mar 25, 2021 · 2 comments
Open

Scaden example sometimes breaks #85

KevinMenden opened this issue Mar 25, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@KevinMenden
Copy link
Owner

No description provided.

@KevinMenden KevinMenden added the bug Something isn't working label Mar 25, 2021
@KevinMenden KevinMenden self-assigned this Mar 25, 2021
@shengqh
Copy link

shengqh commented May 20, 2021

I tried to generate example but failed.

scaden example

Traceback (most recent call last):
  File "/home/shengq2/.local/bin/scaden", line 8, in <module>
    sys.exit(main())
  File "/home/shengq2/.local/lib/python3.8/site-packages/scaden/__main__.py", line 47, in main
    cli()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/shengq2/.local/lib/python3.8/site-packages/scaden/__main__.py", line 247, in example
    exampleData(n_cells=cells, n_genes=genes, n_samples=samples, out_dir=out, n_types=types)
  File "/home/shengq2/.local/lib/python3.8/site-packages/scaden/example.py", line 37, in exampleData
    celltype_list = random.choices(celltypes, k=n_cells)
  File "/usr/lib/python3.8/random.py", line 399, in choices
    return [population[_int(random() * n)] for i in _repeat(None, k)]
  File "/usr/lib/python3.8/random.py", line 399, in <listcomp>
    return [population[_int(random() * n)] for i in _repeat(None, k)]
IndexError: list index out of range

@KevinMenden
Copy link
Owner Author

Hi @shengqh , thanks for reporting.
This is a known bug that I want to fix with the next release, which is probably coming around soon. You should be able to run again and usually it should not fail.

I'll fix this as soon as I find the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants