81d92544f48857e679b2670107bb8139b02d01d5,skbio/sequence/_sequence.py,BiologicalSequence,__getitem__,#BiologicalSequence#Any#,275

Before Change


        
        try:
            qual = self.quality[i] if self.has_quality() else None
            return self.copy(sequence=self.sequence[i], quality=qual)
        except IndexError:
            raise IndexError(
                "Position %d is out of range for %r." % (i, self))

After Change



        
        // TODO update this method when /ኘ is resolved
        if not (isinstance(i, Integral) or isinstance(i, slice) or
                isinstance(i, list)):
            raise TypeError("Unsupported type of item accessor. Only "
                            "integers, slices, and lists of integers are "
                            "currently supported.")

        try:
            qual = self.quality[i] if self.has_quality() else None

            try:
                seq = self.sequence[i]
            except TypeError:
                seq = [self.sequence[idx] for idx in i]
        except IndexError:
            raise IndexError(
                "Position %r is out of range for %r." % (i, self))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: biocore/scikit-bio
Commit Name: 81d92544f48857e679b2670107bb8139b02d01d5
Time: 2014-09-11
Author: jai.rideout@gmail.com
File Name: skbio/sequence/_sequence.py
Class Name: BiologicalSequence
Method Name: __getitem__


Project Name: scikit-image/scikit-image
Commit Name: 86b395f4185bc98a7db614df368cd44e6a6866c6
Time: 2021-02-10
Author: rfezzani@gmail.com
File Name: skimage/morphology/misc.py
Class Name:
Method Name: remove_small_holes


Project Name: PetrochukM/PyTorch-NLP
Commit Name: bb9335bbc981c0541e37a875d79d0ef419008574
Time: 2018-03-25
Author: petrochukm@gmail.com
File Name: torchnlp/text_encoders/subword_encoder.py
Class Name: SubwordEncoder
Method Name: __init__