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

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

Open
lea-lenhardtackovic opened this issue Aug 30, 2023 · 1 comment
Open

Comments

@lea-lenhardtackovic
Copy link

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:

splice.add_argument('--psi-min-reads', dest='psi_min_reads', metavar='INT', help='minimum number of spliced reads covering either isoform to compute PSI [10]', default=10)

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

@akahles
Copy link
Member

akahles commented Apr 3, 2024

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

Cheers,

Andre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants