def test_condense(self): self.assertEqual(SequenceRange.condense(self.range_12, self.range_24), [SequenceRange('0', 1, 4)]) self.assertEqual( SequenceRange.condense(self.range_12, self.range_24, self.range_56), [SequenceRange('0', 1, 4), self.range_56])
def test_condense(self): self.assertEqual( SequenceRange.condense( self.range_12, self.range_24), [SequenceRange('0', 1, 4)]) self.assertEqual( SequenceRange.condense( self.range_12, self.range_24, self.range_56), [SequenceRange('0', 1, 4), self.range_56])
def transcript_range(self, start, end): """Return a list of SequenceRange objects representing the genomic location(s) of the transcript from `start` to `end`. More than one SequenceRange is returned if the requested range crosses exon boundaries. The `start` and `end` variables are 1-based left-inclusive, right-exclusive. """ ranges = [self.nucleotide_index(i) for i in range(start, end)] return SequenceRange.condense(*ranges)