I'm new to python and im trying to solve a question which I am given a few dna sequences, for example:
sequences = ["GAGGTAAACTCTG", "TCCGTAAGTTTTC", "CAGGTTGGAACTC", "ACAGTCAGTTCAC", "TAGGTCATTACAG", "TAGGTACTGATGC"]
I want to know how many times the nucleotide "A" is in each position of all of those sequences (the answer should be 'A': [1, 4, 1, 0, 0, 3, 4, 1, 1, 3, 0, 2, 0] in that case). what I tried to do is:
'A_pos = {"A":[sum(int(i[0]=="A") for i in sequences), sum(int(i[1]=="A") for i in sequences), sum(int(i[2]=="A") for i in sequences),'
and so on to each position in the index. Im trying to make it check all the positions at once instead of doing each position manually.