Russel88 / DAtest

Compare different differential abundance and expression methods
GNU General Public License v3.0
49 stars 9 forks source link

adx was excluded due to failure #5

Closed pwang16 closed 6 years ago

pwang16 commented 6 years ago

Hi Jakob,

Good afternoon. I have one issue for running the aldex method, could you please let me know how to figure out it? please have a look at the error information:

results <- DA.adx (TS, predictor = "Genotype") [1] "aldex.clr: generating Monte-Carlo instances and clr values" [1] "operating in serial mode" [1] "computing center with all features" Error in validObject(.Object) : invalid class “aldex.clr” object: invalid object for slot "conds" in class "aldex.clr": got class "factor", should be or extend class "character"

Best regards, Peng

Russel88 commented 6 years ago

Hi Peng,

The error is something internal in the aldex function, and I cannot reproduce it. You can try the following: sample_data(TS)$Genotype <- as.character(sample_data(TS)$Genotype) and then run it again. If this doesn't help, I need a reproducible example to figure out the problem.

pwang16 commented 6 years ago

Hi Jakob,

It works. Thank you very much for your reply. But the results look more stringent (one less significant OTU after adjustment of the p value) than I just run ALDEX2 by using the commands from https://github.com/ggloor/CoDa_microbiome_tutorial/wiki/Part-1:-Exploratory-Compositional-PCA-biplot .

I also run the DESeq2 using the differential abundance python command differential_abundance.py in the QIIME. I also found less OTUs significant using the ds2 function in Datest than I got from python command in QIIME.

My question is why the function of ALDEX2 and DESeq2 in Datest package more stringent and get less significant OTUs than either one I ran using different ways? I did not test other functions, I do not know if your setting are more stringent, right?

Best regards, Peng

From: Jakob Russel notifications@github.com<mailto:notifications@github.com> Reply-To: Russel88/DAtest reply@reply.github.com<mailto:reply@reply.github.com> Date: Tuesday, December 12, 2017 at 4:18 AM To: Russel88/DAtest DAtest@noreply.github.com<mailto:DAtest@noreply.github.com> Cc: owner pwang16@unl.edu<mailto:pwang16@unl.edu>, Author author@noreply.github.com<mailto:author@noreply.github.com> Subject: Re: [Russel88/DAtest] adx was excluded due to failure (#5)

Hi Peng,

The error is something internal in the aldex function, and I cannot reproduce it. You can try the following: sample_data(TS)$Genotype <- as.character(sample_data(TS)$Genotype) and then run it again. If this doesn't help, I need a reproducible example to figure out the problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Russel88/DAtest/issues/5#issuecomment-351007830, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AO887LamuWFzMwBY0klXtO7ywLpSHdfkks5s_lMCgaJpZM4Q-AiA.

Russel88 commented 6 years ago

Hi Peng,

Regarding ALDEx2, it might be because I adjust p-values externally, but if you run through the CoDa workshop the ALDEx2 functions give you the adjusted p-values. Everything else just comes from the aldex function. It's` hard to say what's correct. I'll look more into this.

Regarding DESeq2, I'm just running the data through the DESeq function. Again, I adjust p-values externally, but with the same method as used in DESeq2 by default, so it should be the same. Are the raw p-values also different between the QIIME and the DAtest implementation?

pwang16 commented 6 years ago

Thank you for your reply. Could you please send me your email address? I can send the results from both ways to you to have a look. The raw p value is also different between ALDEx2 , DESeq2 and DAtest.

From: Jakob Russel notifications@github.com<mailto:notifications@github.com> Reply-To: Russel88/DAtest reply@reply.github.com<mailto:reply@reply.github.com> Date: Tuesday, December 12, 2017 at 9:23 AM To: Russel88/DAtest DAtest@noreply.github.com<mailto:DAtest@noreply.github.com> Cc: owner pwang16@unl.edu<mailto:pwang16@unl.edu>, Author author@noreply.github.com<mailto:author@noreply.github.com> Subject: Re: [Russel88/DAtest] adx was excluded due to failure (#5)

Hi Peng,

Regarding ALDEx2, it might be because I adjust p-values externally, but if you run through the CoDa workshop the ALDEx2 functions give you the adjusted p-values. Everything else just comes from the aldex function. It's` hard to say what's correct. I'll look more into this.

Regarding DESeq2, I'm just running the data through the DESeq function. Again, I adjust p-values externally, but with the same method as used in DESeq2 by default, so it should be the same. Are the raw p-values also different between the QIIME and the DAtest implementation?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Russel88/DAtest/issues/5#issuecomment-351083818, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AO887Bc4xI8wbgFc3CIksFuHZRLDocOrks5s_pqDgaJpZM4Q-AiA.

Russel88 commented 6 years ago

Hi Peng

I think I have found out why you get different results.

Regarding ALDEx2, I have changed the code in the new version such that the p-value adjustment is now the one that ALDEx2 outputs. The other values (for example raw p-values) might appear different, but it is because of ALDEx2s Monte Carlo sampling which changes the output slightly every time you run it. If you want reproducible results run set.seed before running ALDEx2.

Regarding DESeq2, it is probably because I use manual geometric means in my implementation, as suggested by these posts: https://github.com/joey711/phyloseq/issues/387. In the new version of DAtest I also included the original DESeq2 (DA.ds2x). You can compare with this one, but beware, it appears to have higher false positive rates, at least for my test dataset.