Skip to content

ValueError & AssertionError when calling events per event type #207

@nhansen22

Description

@nhansen22

I am running SplAdder v3.0.3 and running into an error from analyze_events(). It appears the spllice graph are built totallt fine for each sample and merged correctly. Note, I had run these same samples and annotation file with v2.3.0 and it worked fine. The AssertionError for alt3, alt5 and intron retention is as follows:

analyze_events(event_type, options.bam_fnames, options)
  File "/usr/local/lib/python3.8/site-packages/spladder/alt_splice/analyze.py", line 95, in analyze_events
    (events_all, counts, verified) = verify_all_events(events_all, np.arange(len(options.samples)), bam_fnames, event_type, options)
  File "/usr/local/lib/python3.8/site-packages/spladder/alt_splice/verify.py", line 612, in verify_all_events
    counts, verified = verify_wrapper(ev, genes, 0, gene_ids_edges, gene_ids_segs, edge_idx, sample_idx, event_type, fn_count, options, 0)[:2]
  File "/usr/local/lib/python3.8/site-packages/spladder/alt_splice/verify.py", line 516, in verify_wrapper
    ver, info = verify_intron_retention(ev[i], genes[_g_idx], segments[:, s_idx].T,  np.c_[curr_edge_idx, edges[:, s_idx]], seg_pos[:, s_idx].T, options)
  File "/usr/local/lib/python3.8/site-packages/spladder/alt_splice/verify.py", line 158, in verify_intron_retention
    assert(seg_intron.shape[0] > 0)
AssertionError

Then for the exon skip events I get a ValueError:

analyze_events(event_type, options.bam_fnames, options)
  File "/usr/local/lib/python3.8/site-packages/spladder/alt_splice/analyze.py", line 95, in analyze_events
    (events_all, counts, verified) = verify_all_events(events_all, np.arange(len(options.samples)), bam_fnames, event_type, options)
  File "/usr/local/lib/python3.8/site-packages/spladder/alt_splice/verify.py", line 612, in verify_all_events
    counts, verified = verify_wrapper(ev, genes, 0, gene_ids_edges, gene_ids_segs, edge_idx, sample_idx, event_type, fn_count, options, 0)[:2]
  File "/usr/local/lib/python3.8/site-packages/spladder/alt_splice/verify.py", line 512, in verify_wrapper
    ver, info = verify_exon_skip(ev[i], genes[_g_idx], segments[:, s_idx].T,  np.c_[curr_edge_idx, edges[:, s_idx]], options)
  File "/usr/local/lib/python3.8/site-packages/spladder/alt_splice/verify.py", line 249, in verify_exon_skip
    info[4] = counts_edges[idx, 1]
ValueError: setting an array element with a sequence.

Please advise

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