0

I am working on pset6 DNA and I'm not sure I understand the terms of the problem.

The objective is to write a program that matches a DNA sequence to a person in a DNA database based on the largest number of consecutive occurrences of an STR in the sequence.

According to the examples made available for testing, 1.txt is meant to match Bob.

AAGGTAAGTTTAGAATATAAAAGGTGAGTTAAATAGAATAGGTTAAAATTAAAGGAGATCAGATCAGATCAGATCTATCTATCTATCTATCTATCAGAAAAGAGTAAATAGTTAAAGAGTAAGATATTGAATTAATGGAAAATATTGTTGGGGAAAGGAGGGATAGAAGG

name,AGAT,AATG,TATC
Alice,2,8,3
Bob,4,1,5
Charlie,3,2,5

However, AGAT does not recur 4 times consecutively in 1.txt. It never appears consecutively so its longest "run" is 1. It occurs 5 times in total non-consecutively:

"AAGGTAAGTTTAGAATATAAAAGGTGAGTTAAATAGAATAGGTTAAAATTAAAGGAGATCAGATCAGATCAGATCTATCTATCTATCTATCTATCAGAAAAGAGTAAATAGTTAAAGAGTAAGATATTGAATTAATGGAAAATATTGTTGGGGAAAGGAGGGATAGAAGG"

I realise that there are 4 occurrences of AGAT separated by only 1 character, which seems like it must be relevant. But even instances of an STR separated by just one character are not "consecutive", in my understanding of the word.

Can anyone point me to a clearer definition of what is required in this exercise?

1

The databases/small.csv file from the distro code looks like this:

name,AGATC,AATG,TATC
Alice,2,8,3
Bob,4,1,5
Charlie,3,2,5

The file is 57 bytes and dated 21-Oct-2019. Perhaps redownload the distro code. (Or correct the file in your favorite editor).

1
  • Thanks. Indeed it does. Not sure how that happened but that would explain the issue :-) Jul 18 at 19:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .