Fork me on GitHub"

# skbio.sequence.GrammaredSequence.__contains__

GrammaredSequence.__contains__(subsequence)

  Determine if a subsequence is contained in this sequence.

  State: Stable as of 0.4.0.

  Parameters

    subsequence (str, Sequence, or 1D np.ndarray (np.uint8 or '|S1')) – The putative subsequence.

  Returns

    Indicates whether subsequence is contained in this sequence.

  Return type

    bool

  Raises

    TypeError – If subsequence is a `Sequence` object with a different type than this sequence.

  Examples

      >>> from skbio import Sequence
      >>> s = Sequence('GGUCGUGAAGGA')
      >>> 'GGU' in s
      True
      >>> 'CCC' in s
      False