spladder icon indicating copy to clipboard operation
spladder copied to clipboard

Execution fails with --psi-min-reads set to specific value

Open lea-lenhardtackovic opened this issue 1 year ago • 1 comments

Hi, I was running spladder build with --psi-min-reads set to 10, which is also the default value. But when this value is specified in the command line, the execution fails with following error:

Traceback (most recent call last): File "/usr/local/bin/spladder", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/spladder/spladder.py", line 229, in main options.func(options) File "/usr/local/lib/python3.8/dist-packages/spladder/spladder_build.py", line 163, in spladder analyze_events(event_type, options.bam_fnames, options) File "/usr/local/lib/python3.8/dist-packages/spladder/alt_splice/analyze.py", line 101, in analyze_events (psi[:, i], iso2[:, i], iso1[:, i]) = compute_psi(counts[:, :, i], event_type, options) File "/usr/local/lib/python3.8/dist-packages/spladder/helpers.py", line 189, in compute_psi n_idx = np.where((a + b) < options.psi_min_reads) TypeError: '<' not supported between instances of 'numpy.ndarray' and 'str'

It seems that when the value is provided on the command line, it is further propagated as a string instead as an integer value. My guess would be that in this part of the script where this argument is defined: https://github.com/ratschlab/spladder/blob/9ad616f583c8113d14e59d06b7ed344e18f3087e/spladder/spladder.py#L99 also type for that argument should be set to integer, in the same way as for the other integer inputs. I tested if the command will work if I add the type=int to argument, and it worked and didn't return any errors. Should this be corrected in the script or is there some other way to define this as INT value on the command line?

Thanks!

Lea

lea-lenhardtackovic avatar Aug 30 '23 13:08 lea-lenhardtackovic

Thanks, Lea, for reporting this and suggesting a fix. I have updated the code now. Sorry for the late reply ...

Cheers,

Andre

akahles avatar Apr 03 '24 21:04 akahles