b731f833810afd674f42d38ceb657a7a03608832,src/biotite/sequence/annotation.py,AnnotatedSequence,__getitem__,#AnnotatedSequence#Any#,176
Before Change
slice_start = loc.first - self._seqstart
// +1 due to exclusive stop
slice_stop = loc.last - self._seqstart +1
slice_index = slice(slice_start, slice_stop)
add_seq = self._sequence.__getitem__(slice_index)
if loc.strand == Location.Strand.REVERSE:
add_seq = add_seq.reverse().complement()
sub_seq += add_seq
After Change
add_seq = add_seq.reverse().complement()
sub_seq += add_seq
return sub_seq
elif isinstance(index, slice):
seq_start = index.start - self._seqstart
seq_stop = index.stop - self._seqstart
return AnnotatedSequence(self._annotation[index],
self._sequence[seq_start:seq_stop],
self._seqstart)
elif isinstance(index, int):
return self._sequence[index - self._seqstart]
else:
raise TypeError("{:} instances are invalid indices"
.format(type(index).__name__))
def __setitem__(self, index, item):
if isinstance(index, Feature):
// Item must be sequence
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: biotite-dev/biotite
Commit Name: b731f833810afd674f42d38ceb657a7a03608832
Time: 2017-12-12
Author: patrick.kunzm@gmail.com
File Name: src/biotite/sequence/annotation.py
Class Name: AnnotatedSequence
Method Name: __getitem__
Project Name: jnothman/UpSetPlot
Commit Name: a498f3fe9373f1837ba9e003166056181448b1f7
Time: 2019-02-24
Author: joel.nothman@gmail.com
File Name: upsetplot/plotting.py
Class Name:
Method Name: _process_data
Project Name: scipy/scipy
Commit Name: f43c64c4fd913751764d324a1b85c895a051bced
Time: 2018-11-08
Author: perimosocordiae@gmail.com
File Name: scipy/sparse/csr.py
Class Name: csr_matrix
Method Name: getcol