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

Handling Technical and Biological Replicates #27

Open
agave82 opened this issue Feb 21, 2022 · 2 comments
Open

Handling Technical and Biological Replicates #27

agave82 opened this issue Feb 21, 2022 · 2 comments

Comments

@agave82
Copy link

agave82 commented Feb 21, 2022

Hi, I have an experimental design as follows:

WT_1 WT_2 WT3 WT_4 KO_1 KO_2 KO_3 KO_4

*_1 and *_2 are biological replicates while *_3 and *_4 are technical replicates.

Please, can you explain how to handle technical and biological replicates in DEP?
I understand that I can utilise the option type="all" to make pairwise comparisons:
data_diff_all_contrasts <- test_diff(data_imp, type = "all")
I hav e done that but would that be enough to take into account the replicates or do I need add the design_formula option in the code?
If design_formula needs to be include please, can you explain how to do in my case of experimental design?
Thank you very much

@ojziff
Copy link

ojziff commented Aug 31, 2022

I have this same query: How do we compare groups of biological replicates?

In the vignette, there is only an example of how to compare groups of technical replicates (Ubi4_vs_Ubi6, Ubi4_vs_Ctrl, Ubi4_vs_Ubi1, Ubi6_vs_Ctrl, Ubi6_vs_Ubi1, Ctrl_vs_Ubi1) but how do you compare all Ubi samples with Ctrl? We could treat biological replicates (Ubi1, Ubi4, Ubi6) in the same way as technical replicates by giving them a replicate number 1 to 9 and the same condition name, but this is not ideal as limma is unaware that each biological replicate is in triplicate.

label condition replicate technical_replicate
Ubi4_1 Ubi 1 1
Ubi4_2 Ubi 2 2
Ubi4_3 Ubi 3 3
Ubi6_1 Ubi 4 1
Ubi6_2 Ubi 5 2
Ubi6_3 Ubi 6 3
Ubi1_1 Ubi 7 1
Ubi1_2 Ubi 8 2
Ubi1_3 Ubi 9 3
Ctrl_1 Ctrl 1 1
Ctrl_2 Ctrl 2 2
Ctrl_3 Ctrl 3 3

I saw in a related issue #11 (comment) that you could treat the technical replicate as a batch effect and adjust for the technical replicate in the design with ~0 + technical_replicate + condition.

Is there any better solutions @arnesmits @adomingues @agave82 ?

Many thanks,
Oliver

@adomingues
Copy link

To my knowledge I think you covered most of it @ojziff.

The only other solution I can think of, and I have seen done / suggested, is to average the technical replicates before doing the differential analysis with DEP. It's a rough approach, but it the replicates are well correlated it should be fine.

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

No branches or pull requests

3 participants