Skip to content

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

@lea-lenhardtackovic

Description

@lea-lenhardtackovic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions