-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Hello,
I ran cellbender on a sample and I am getting this error.
cellbender:remove-background: Unable to save all plots.
cellbender:remove-background: Traceback (most recent call last):
File "..../anaconda/envs/cellbender/lib/python3.7/site-packages/cellb>
fig = plot_summary(loss=inferred_model.loss, umi_counts=counts, p=p, z=z)
File "..../anaconda/envs/cellbender/lib/python3.7/site-packages/cellb>
plt.plot(p[count_order], '.:', color='red', alpha=0.3, rasterized=True)
IndexError: index 1938 is out of bounds for axis 0 with size 1937
I input with an h5ad format, that I generated loading the starsolo outpout into R, and transforming into an anndata with the anndataR library. Suprisingly, when by mistake I loaded the filtered matrix it worked (with warnings regarding having used the wrong matrix, but still worked).
I struggle to see what 1938 refers to, it is a very low number and does not match any other number from the log.
cellbender command I've run
cellbender remove-background
--cuda
--input ./data/processed/$i{d}.h5ad
--output ./out/cellbender/${id}/cellbender_feature_bc_matrix.h5
Full Log
cellbender:remove-background: Command:
cellbender remove-background --cuda --input ./data/processed/JJ53.h5ad --output /exports/eddie/scratch/nbestar>
cellbender:remove-background: CellBender 0.3.0
cellbender:remove-background: (Workflow hash d438e330b7)
cellbender:remove-background: 2026-02-13 12:43:00
cellbender:remove-background: Running remove-background
cellbender:remove-background: Loading data from ./data/processed/JJ53.h5ad
cellbender:remove-background: AnnData format
cellbender:remove-background: Found .layers['counts']. Using for count data.
cellbender:remove-background: Features in dataset: 57061 NA
cellbender:remove-background: Trimming features for inference.
cellbender:remove-background: 43606 features have nonzero counts.
cellbender:remove-background: Prior on counts for cells is 687
cellbender:remove-background: Prior on counts for empty droplets is 108
cellbender:remove-background: Excluding 14418 features that are estimated to have <= 0.1 background counts in >
cellbender:remove-background: Including 29188 features in the analysis.
cellbender:remove-background: Trimming barcodes for inference.
cellbender:remove-background: Excluding barcodes with counts below 54
cellbender:remove-background: Using 12208 probable cell barcodes, plus an additional 34835 barcodes, and 11265>
cellbender:remove-background: Largest surely-empty droplet has 124 UMI counts.
cellbender:remove-background: Attempting to unpack tarball "ckpt.tar.gz" to /local/54234048.1.gpu/tmpochhth4u
cellbender:remove-background: Successfully unpacked tarball to /local/54234048.1.gpu/tmpochhth4u
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_args.npy
/local/54234048.1.gpu/tmpochhth4u/posterior.h5
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_optim.torch
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_random.cuda
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_train.loaderstate
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_random.pyro
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_params.pyro
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_optim.pyro
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_test.loaderstate
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_model.torch
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_optim.pyro
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_test.loaderstate
/local/54234048.1.gpu/tmpochhth4u/d438e330b7_model.torch
cellbender:remove-background: Loaded partially-trained checkpoint from ckpt.tar.gz
cellbender:remove-background: Checkpoint loaded successfully.
cellbender:remove-background: Running inference...
cellbender:remove-background: 2026-02-13 12:43:33
cellbender:remove-background: Inference procedure complete.
cellbender:remove-background: Attempting to unpack tarball "ckpt.tar.gz" to /local/54234048.1.gpu/tmp6ddhqp74
cellbender:remove-background: Successfully unpacked tarball to /local/54234048.1.gpu/tmp6ddhqp74
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_args.npy
/local/54234048.1.gpu/tmp6ddhqp74/posterior.h5
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_optim.torch
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_random.cuda
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_train.loaderstate
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_random.pyro
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_params.pyro
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_optim.pyro
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_test.loaderstate
/local/54234048.1.gpu/tmp6ddhqp74/d438e330b7_model.torch
cellbender:remove-background: Loaded pre-computed posterior from posterior.h5
cellbender:remove-background: 2026-02-13 12:43:49
cellbender:remove-background: Unable to save all plots.
cellbender:remove-background: Traceback (most recent call last):
File "/exports/cmvm/eddie/scs/groups/Williamsdata/anaconda/envs/cellbender/lib/python3.7/site-packages/cellb>
fig = plot_summary(loss=inferred_model.loss, umi_counts=counts, p=p, z=z)
File "/exports/cmvm/eddie/scs/groups/Williamsdata/anaconda/envs/cellbender/lib/python3.7/site-packages/cellb>
plt.plot(p[count_order], '.:', color='red', alpha=0.3, rasterized=True)
IndexError: index 1938 is out of bounds for axis 0 with size 1937