adelq / dnds Goto Github PK
View Code? Open in Web Editor NEWCalculate dN/dS ratio precisely (Ka/Ks) using a codon-by-codon counting method.
License: MIT License
Calculate dN/dS ratio precisely (Ka/Ks) using a codon-by-codon counting method.
License: MIT License
I'm running dnds with python 2.7 installed via cloning the github repo. When I run the below command
python ~/Dropbox/programs/dnds/dnds.py
It returns the result 0.642189586115. This is different from the result of 0.86 on https://github.com/adelq/dnds
Why is this? Thanks for the nice package!
Sorry for reporting this. I've noticed your code. And it seems that this is not a conventional way of computing dN/dS based on counting. Probably you are not using this code at the moment, but I just want to warn you and people who might use this code.
The classical and improved method of computing dN/dS based on counts are described in the 1986 paper by Nei Gojobori or here. What you are computing looks more like p_N/p_S, which is fine, as long as people are aware that it is another estimate, with different properties. Also, I am not sure that you are correcting for:
There is a reference implementation in C available in PAML (function DistanceMatNG86
), it might be a good idea to compare your implementation with it.
Again, sorry for intruding. It's just a friendly message, so you are aware.
Hi - nice to see a python implementation!
Are you able to modify this to specify the genetic code (11 for bacteria) and to take multiple sequence alignments with gaps and Ns and calculate all dnds Vs a reference sequence?
Regards,
Liam
Dear Adel,
I am interested in dn/ds caluclation. Can the result from dnds be compared with yn00 of PAML as the later is vey popular in this aspect?
Best regards,
Hongzhong
The latest version with the dN/dS vs pN/pS split has breaking changes, so it warrants a major version bump.
I have been using this helpful blog post to learn about dN/dS ratios.
http://bioinformatics.cvr.ac.uk/blog/calculating-dnds-for-ngs-datasets/
However, following through their example with your code there was a discrepancy.
According to the scheme set out in that blog post, you are reporting the pN/pS. Following onto the Nei & Gojobori, 1986 paper, which the blog post authors reference, I think the part you omitted was the conversion to per site results according to Jukes & Cantor 1967.
When I add in the below, I get the same result as the blog post authors for their sequence (0.1247)
pn = non_subs / non_sites
ps = syn_subs / syn_sites
dn = -(3 / 4) * log(1 - (4 * pn / 3))
ds = -(3 / 4) * log(1 - (4 * ps / 3))
What are your thoughts on that discrepancy?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.