Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Score Sequence Alignments | Sequence Analysis
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Bioinformatics

bookChallenge: Score Sequence Alignments

Taak

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 seq1 and seq2 at 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).

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 2
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

Suggested prompts:

Can you explain this in simpler terms?

What are the main takeaways from this?

Can you give me an example?

close

bookChallenge: Score Sequence Alignments

Veeg om het menu te tonen

Taak

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 seq1 and seq2 at 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).

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 2
single

single

some-alt