Fork me on GitHub"

# skbio.sequence.DNA.is_reverse_complement

DNA.is_reverse_complement(other)

  Determine if a sequence is the reverse complement of this sequence.

  State: Stable as of 0.4.0.

  Parameters:

    other (str, Sequence, or 1D np.ndarray (np.uint8 or '|S1')) – Sequence to compare to.

  Returns:

    `True` if other is the reverse complement of the nucleotide sequence.

  Return type:

    bool

  Raises:

    TypeError – If other is a `Sequence` object with a different type than the nucleotide sequence.

  See also

  `reverse_complement`

  Examples

      >>> from skbio import DNA
      >>> DNA('TTCATT').is_reverse_complement('AATGAA')
      True
      >>> DNA('TTCATT').is_reverse_complement('AATGTT')
      False
      >>> DNA('ACGT').is_reverse_complement('ACGT')
      True