-
Notifications
You must be signed in to change notification settings - Fork 17
Possible Bug in com.knockout_taxa()
#172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, thanks for the report. I was not able to reproduce it on a smaller example. The "old" values are simply the growth rates from a cooperative tradeoff run, so they should be the same as running What solver are you using (output of |
Hi! Thank you for your response. I was running the simulations on my home institution's HPC cluster and then doing the further analysis on my PC. I decided to run everything on my PC and the consistency problem between runs was solved. Also, here is the output for
Nevertheless, now I have a new doubt. Now when I perform exactly what I mentioned in my initial issue report, the results for both methods (old = change - new, and modyfing the code for directly retrieving the old values) I get exactly the same results, which is great! |
So the output from your KO modification and the growth results you loaded look the same to me. The differences there are within the solver tolerance which is 1e-6 but in practice can be slightly larger for individual variables. So a difference between 1e-20 and 1e-14 does not mean much, those are both essentially zero. Your first cooperative tradeoff definitely looks different though. I will try to investigate a bit with the data you uploaded. Thanks for that! |
It makes perfect sense to me! Thank you so much :) |
Hi! I really like MICOM! But I am having a problem when trying to perform the Taxa Knockout Analysis
Problem description
I want to calculate the log fold change of the growth rates when performing the Taxa Knockouts. Currently, one can obtain one of three possible outputs when using
com.knockout_taxa()
.method='raw'
-> new: the new growth rates for the taxa in the community without the knocked taxon.method=
change` -> new - old: the absolute change in the growth rates for the new community without the knocked taxon with respect to the original community.method=
relative change` -> (new - old)/old: the relative change in the growth rates for the new community without the knocked taxon with respect to the original community.What I actually want for the log fold change is something like log(new) - log(old) (or log(new/old), which is the same). So I attempted two things for trying to achieve this:
com.knockout_taxa()
withmethod
equal toraw
andchange
, and then calculateold
(the growth rates for the original community) as follows old = change - new (now that I know bothnew
andold
I can easily calculate the log fold change using either of the expressions above). The problem is that, when I checked the values forold
for all my samples, I consistently found some troubling values for some of the knocked taxa (always in one of the first three taxa in my matrix).As you can see, the results for
old
should be a matrix where the values for all the rows in a column should be the same, and it it true for most of the taxa but it fails for the first 3 taxa. This happens consistently across my 15 samples and even when using different media.com.knockout_taxa()
it returns me not only the new growth rates (when usingmethod=raw
) but also the old values. The and, something that is also strange for me is that the values I am obtaining are quite different to the previous calculation (1.).Context
The text was updated successfully, but these errors were encountered: