Jessime / Excision

Python 201. Applied Bioinformatics and Computational Biology
MIT License
2 stars 1 forks source link

Difference in mutation rate #4

Open deanRHCP opened 7 years ago

deanRHCP commented 7 years ago

I'm getting the wrong p-value for the comparison of mutation rates between control and theraptrix sequences. I have a feeling I'm not calculating the mutation rate correctly. could I get some feedback?

OregonMutations.txt

lafosse commented 7 years ago

The returned value in your function 'muteRate' should be: muteCount / len(sample) in order to define it as a rate.

For example, if the control sequence is 'CACG' and the reference sequence is 'ATCG', then the mutation count would be 2, and the mutation rate would be 2/4 = 0.5.

lafosse commented 7 years ago

The output file should just contain the p-value, no other text. I believe that is where things are going wrong, and from my tests with your script I was able to get the answer correct. To guide you, this is the line that needs to be edited:

fileOpen.write("The p-value is %0.4f" % p)