Skip to content

2022-2: Attack of the Mutations!

This problem is inspired by the Counting Point Mutations problem found on the excellent Bioinformatics education website rosalind.info.

Write a function that:

  • takes right and left arguments that are character vectors or scalars of equal length – these represent DNA strings.
  • returns an integer representing the Hamming distance (the number of differences in corresponding positions) between the arguments.

Hint: The plus function X+Y could be helpful.

Examples:

      'GAGCCTACTAACGGGAT' (your_function) 'CATCGTAATGACGGCCT' 
7

      'A' (your_function) 'T'
1

      '' (your_function) ''
0

      (your_function) ⍨ 'CATCGTAATGACGGCCT'
0
your_function ←

Solutions

Video Thumbnail YouTube

Chat transcript Code on GitHub