0

This is my loop to check the equality of STR counts, csv list is a list storing data of the csv file and STRlist is a list storing all the STRs. It prints the wrong name, I guess it has something to do with the for loops.

for i in range(len(csvlist)):
  for j in range(len(STRlist)):
     if csvlist[i][STRlist[j]] == longest_match(seqreader, STRlist[j]):
           print(csvlist[i]['name'])
           return
print("No Match")

1 Answer 1

1

The print will occur on the first match it finds. It looks like it is not comparing the STRs as a set, but one at a time. For instance, the test on 8.txt is expected to produce Ginny. One can therefore assume that the repeat of the first STR, AGATC will be 37. This snippet will print Fred, because that row has a repeat of 37 for AGATC.

You must log in to answer this question.

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