sc.pl.stacked_violin: IndexError, list index out of range
See original GitHub issueScanpy vs. 1.3.6 installed using pip3 OSX 10.10.5 Jupyter lab
code:
list_of_list_of_marker_genes = [mg1, mg2, mg3] for mg in list_of_list_of_marker_genes: sc.pl.stacked_violin(adata, mg, groupby = 'louvain’, rotation=90) print(mg)
This works for some mg’s but not for all; sc.pl.matrixplot works for all of them; the same for sc.pl.violin; it works also if I would combine all marker genes into one list and then run sc.pl.stacked_violin. When I say it does not work: it typically generates one stacked plot and then ‘hangs up’ with an error message for subsequent plots:
Error message:
IndexError: list index out of range
When I run sc.pl.stacked_violin for the individual mg’s, some work others don’t. It is a reproducible results.
I explicitly tested whether the genes in the respective marker gene lists are present in ’n_cells’. If not, I update the lists.
What am I missing here?
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (3 by maintainers)
Actually I solved this problem by adding more markers in the marker gene list. Alternatively The error will be gone if I
swap_axes=True
InterestingFixed by a later PR: https://github.com/theislab/scanpy/pull/525#issuecomment-767651929