Challenge: Score Sequence Alignments
Opgave
Swipe to start coding
Write a Python function that takes two DNA sequences of equal length and returns a tuple with the number of matches, mismatches, and gaps in the alignment.
- Compare the characters of
seq1andseq2at each position. - Count a match when the characters are the same and not a gap.
- Count a mismatch when the characters are different and neither is a gap.
- Count a gap whenever either character is
'-'. - Return a tuple in the form
(matches, mismatches, gaps).
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 2
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 6.25
Challenge: Score Sequence Alignments
Stryg for at vise menuen
Opgave
Swipe to start coding
Write a Python function that takes two DNA sequences of equal length and returns a tuple with the number of matches, mismatches, and gaps in the alignment.
- Compare the characters of
seq1andseq2at each position. - Count a match when the characters are the same and not a gap.
- Count a mismatch when the characters are different and neither is a gap.
- Count a gap whenever either character is
'-'. - Return a tuple in the form
(matches, mismatches, gaps).
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 2
single