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

bookChallenge: Score Sequence Alignments

Tâche

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).

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 2
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: Score Sequence Alignments

Glissez pour afficher le menu

Tâche

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).

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 2
single

single

some-alt