tessl install tessl/pypi-python-levenshtein@0.27.0Python compatibility wrapper for computing string edit distances and similarities using fast Levenshtein algorithms.
Agent Success
Agent success rate when using this tile
88%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.38x
Baseline
Agent success rate without this tile
64%
A system that analyzes DNA sequences to detect point mutations between two genetic samples.
You need to implement a mutation detection system that compares two DNA sequences of equal length and identifies how many positions have different nucleotide bases. This is useful in genomics research for tracking genetic variations and mutations.
DNA sequences are represented as strings containing the nucleotide bases: 'A' (Adenine), 'T' (Thymine), 'G' (Guanine), and 'C' (Cytosine).
Implement a function count_mutations(sequence1, sequence2) that:
The function must validate inputs:
ValueError if the sequences have different lengthsValueError if either sequence is empty@generates
def count_mutations(sequence1: str, sequence2: str) -> int:
"""
Count the number of point mutations between two DNA sequences.
Args:
sequence1: First DNA sequence string
sequence2: Second DNA sequence string
Returns:
Integer count of positions where nucleotides differ
Raises:
ValueError: If sequences have different lengths or are empty
"""
passProvides fast string comparison algorithms for computing differences between sequences.
@satisfied-by