Skip to content
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

Query Regarding Paired Sample Analysis with trans_diff Function #379

Open
learn-lx-zhu opened this issue Jul 1, 2024 · 5 comments
Open
Labels
documentation Improvements or additions to documentation

Comments

@learn-lx-zhu
Copy link

Dear Author,

I am currently using your R package for analyzing paired microbial sample data, where each pair consists of two samples from the same patient. I noticed that the trans_diff function provides the group_choose_paired parameter, which supports the "metastat" or "metagenomeSeq" methods for selecting the required groups for paired testing. However, I could not find any examples or documentation in the help page or tutorial on what input should be provided for this parameter.

Additionally, I would like to know if other methods, such as ALDEx2_kw, lefse, and maaslin2, have parameters that support paired testing.

Could you please provide some guidance or examples on how to properly use the group_choose_paired parameter and clarify if paired testing is supported for the other methods provided in trans_diff function?

Thank you very much for your assistance.

@ChiLiubio
Copy link
Owner

Hi. Sorry for the unclear description in the help document. group_choose_paired is used to select fewer groups instead of all paired combinations across groups for those methods that only can be used when input groups are two (e.g., metastat metagenomeSeq, edgeR, ALDEx2_t). So this parameter may be not what you need. According to your info, it is better to use some methods like paired t-test. The method 'ALDEx2_t' is a good choice. The orginal function aldex in ALDEx2 package has a parameter paired.test. So you can use parameter passing like this (paired.test = TRUE is passed to the dependent aldex function):

t1 <- trans_diff$new(dataset = dataset, method = "ALDEx2_t", group = "Group", paired.test = TRUE)

As the function select the feature abundance table and sample table sequentially, so to do paired test, you just need to prepare sample infomation table to be well-organized like this.

SampleID   Group   ID
S1                T          Patient1
S2                C          Patient1
S3                T          Patient2
S4                C          Patient2
.......

Or

SampleID   Group   ID
S1                T          Patient1
S2                T          Patient2
S3                T          Patient3
S4                C          Patient1
S5                C          Patient2
S6                C          Patient3
.......

Please have a try and feel free to tell me if it is not solved.

@ChiLiubio ChiLiubio added the documentation Improvements or additions to documentation label Jul 2, 2024
@learn-lx-zhu
Copy link
Author

Hi! Thank you very much for your reply! I would like to further confirm which methods provided by the trans_diff function support differential testing for paired design samples?

@ChiLiubio
Copy link
Owner

Hi. "ALDEx2_t" and "t.test". For t.test, the by_ID parameter should be provided.

@motroy
Copy link

motroy commented Nov 12, 2024

Hi @ChiLiubio ,

Just wanted to confirm that the Wilcoxon test also allows for paired testing using the by_ID parameter?

Thanks,
Yair

@ChiLiubio
Copy link
Owner

Hi @motroy
Yes. For Wilcoxon test and t test, the trans_diff class invokes trans_alpha class to perform test. So for these options, paired test can be done like the document of trans_alpha class shows.

Chi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants