ratschlab/spladder

test run mode - TypeError: Indexing elements must be in increasing order

sergiosenci opened this issue · 4 comments

  • spladder version: 3.03
  • Python version: 3.10.9
  • Operating System: MATE 1.26.0

Description

Test RunMode terminates suddenly after Capping outlier expression counts
I tried both the option to specify conditions as a comma separated list and as .txt files

Build mode was launched against 16 samples with the following specifications
spladder build -o path/SplAdder_OUT --set-mm-tag nM --bams path1/Aligned.sortedByCoord.out.bam,path2/Aligned.sortedByCoord.out.bam(...path3,path4...) -a /path/Homo_sapiens_GRCh38_104.gtf

build mode ends with no apparent problem after some 24+hours but then launching test in the following manner:
spladder test --conditionA path1/Aligned.sortedByCoord.out.bam,path2/Aligned.sortedByCoord.out.bam --conditionB path3/Aligned.sortedByCoord.out.bam,path4/Aligned.sortedByCoord.out.bam ---outdir path/SplAdder_OUT

terminates with the following Error message
##########
Traceback (most recent call last):
File "/localRaid/anaconda3/envs/spladder_env/bin/spladder", line 8, in
sys.exit(main())
File "/localRaid/anaconda3/envs/spladder_env/lib/python3.10/site-packages/spladder/spladder.py", line 229, in main
options.func(options)
File "/localRaid/anaconda3/envs/spladder_env/lib/python3.10/site-packages/spladder/spladder_test.py", line 597, in spladder_test
(cov, psi, gene_idx, event_idx, event_ids, event_samples) = quantify.quantify_from_counted_events(options.fname_event_counts, idx1, idx2, event_type, options, gen_event_ids=False, high_mem=options.high_memory)
File "/localRaid/anaconda3/envs/spladder_env/lib/python3.10/site-packages/spladder/alt_splice/quantify.py", line 365, in quantify_from_counted_events
cnt2.append(IN['event_counts'][sample_idx2, f[0], :][:, conf_idx].T)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/localRaid/anaconda3/envs/spladder_env/lib/python3.10/site-packages/h5py/_hl/dataset.py", line 814, in getitem
selection = sel.select(self.shape, args, dataset=self)
File "/localRaid/anaconda3/envs/spladder_env/lib/python3.10/site-packages/h5py/_hl/selections.py", line 82, in select
return selector.make_selection(args)
File "h5py/_selector.pyx", line 276, in h5py._selector.Selector.make_selection
File "h5py/_selector.pyx", line 205, in h5py._selector.Selector.apply_args
TypeError: Indexing elements must be in increasing order

Let me know if I can provide any other useful information
May it depend on bam files called in the same way even if within different paths?

Best Regards
Sergio

Dear Sergio,

Thanks for reporting this. Indeed SplAdder uses the bam file names (without paths) to name the individual sample files. So if you have multiple samples with the same name, this will confuse the sample matching logic. What we do in practice is to simply generate a sample directory containing symlinks to the original files, making sure that all bam files are named differently.

Could you please confirm, whether this resolves your issue? I will put on my TODO list to check the input for this and provide a meaningful error to the user.

Best,

Andre

Dear Andre, thank you so much for your quick response, I am launching the analysis right now and as soon as it finishes I will run test mode and let you know if that worked

Best Regards
Sergio

Dear Andre, just for being sure I waited test mode. It worked!
All the best
Sergio

Thank you @sergiosenci for the feedback!