Hello everybody!! I have some questions to ask: 1.I have to generate random dna sequence, length: 20KB with equal base frequency on python. I tried to use this function:
def dna(length): DNA = "" for i in range(length): DNA += choice('atcg') return DNA
But it doesn't return equal frequency for all the bases. Is there is any way to do it? (not too complicated...)
2.I have to calculate the frequency of all the bases from a given file. But I'v got a huge file so I have to split it. How can I split the file, send it to a function that calculate frequency (I'v already written it) and return the real frequency?