Discovered while re-running the tutorial notebooks against a freshly reconstructed real ENCODE chr8 transcriptome (not a fixture artifact -- reproduces on any gene with an exon-skipping-type alternative splicing event).
Error
TypeError: tuple indices must be integers or slices, not numpy.bool
Raised from SegmentGraph.find_splice_bubbles (splice_graph.py), at:
inB_sets[i + 1][unspliced and node_id == i].add(transcript_id)
unspliced = self[i].end == node_B.start -- when exon coordinates are numpy int64 (as they are for real alignment-derived data, not just plain Python int fixtures), this comparison yields numpy.bool_ instead of Python bool. Python only accepts bool/int as a sequence index; numpy.bool_ is not a subclass of int and is rejected.
Impact
This breaks Transcriptome.alternative_splicing_events(), Transcriptome.altsplice_test() (differential splicing), and likely Transcriptome.coordination_test(), for any real transcriptome with numpy-typed exon coordinates -- i.e. essentially all real-world usage.
Fix
Coerce to Python bool at the indexing site.
Discovered while re-running the tutorial notebooks against a freshly reconstructed real ENCODE chr8 transcriptome (not a fixture artifact -- reproduces on any gene with an exon-skipping-type alternative splicing event).
Error
Raised from
SegmentGraph.find_splice_bubbles(splice_graph.py), at:unspliced = self[i].end == node_B.start-- when exon coordinates are numpyint64(as they are for real alignment-derived data, not just plain Pythonintfixtures), this comparison yieldsnumpy.bool_instead of Pythonbool. Python only acceptsbool/intas a sequence index;numpy.bool_is not a subclass ofintand is rejected.Impact
This breaks
Transcriptome.alternative_splicing_events(),Transcriptome.altsplice_test()(differential splicing), and likelyTranscriptome.coordination_test(), for any real transcriptome with numpy-typed exon coordinates -- i.e. essentially all real-world usage.Fix
Coerce to Python
boolat the indexing site.