Challenge: Score Sequence Alignments
Uppgift
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 allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 2
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Suggested prompts:
Can you explain this in simpler terms?
What are the main takeaways from this?
Can you give me an example?
Fantastiskt!
Completion betyg förbättrat till 6.25
Challenge: Score Sequence Alignments
Svep för att visa menyn
Uppgift
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 allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 2
single