zellerlab / siamcat

R package for Statistical Inference of Associations between Microbial Communities And host phenoType
https://siamcat.embl.de/
51 stars 16 forks source link

check.associations paired test #23

Open alex-d13 opened 3 years ago

alex-d13 commented 3 years ago

Hi,

I really enjoy using your tool! Would it be possible to add the option to also use the paired wilcoxon test for the associations testing? It should be quite easy to add, right?

Best, Alex

jakob-wirbel commented 3 years ago

Hi @alex-d13

Thanks for the feedback! :)

I added some functionality for paired testing in the check.association function and it worked for me with a test dataset that i had.

You can install the development version through devtools:

devtools::install_github(repo = 'zellerlab/siamcat')

and then you can try out the paired testing. You will need a column in your meta-data that indicates the groups for the paired testing, for example Individual_ID or sth. It will check that for each pairing, you have exactly two samples, one in the positive and one in the negative group (others are discarded for testing). Then the function will perform a paired Wilcoxon test:

check.associations(sc.obj, paired='Individual_ID')

Let me know if it works :)

alex-d13 commented 2 years ago

Sorry for the very late answer, but yes, it worked :)