Batch correction where one of the batches only has a single sample
1
0
Entering edit mode
Tom ▴ 10
@6d3c5339
Last seen 4 months ago
United Kingdom

I'm just asking here whether doing batch correction in a design with 3 batches where one of the batches only contains one sample is possible. From this post Batch Correction with only one sample in a batch#:~:text=The%20bottom%20line%20is%20that,that%20sample%20is%20completely%20uninformative it seems like that sample would just be removed from the analysis, however there isn't any messages of that while running Deseq so I'm just asking for clarity whether the sample is removed or kept in the analysis.

This is the experiment design

BATCH   SEX RESPONSE
1   F   A
1   F   A
2   F   A
2   F   A
2   F   A
2   M   A
1   F   B
1   M   B
3   M   B
2   F   B
2   M   B
2   M   B
2   F   C
2   M   C
2   M   C
2   M   C
2   M   C

And this is the deseq design

dds <- DESeqDataSetFromMatrix(countData = count_matrix,
                              colData = coldata,
                              design = formula(paste("~", " batch", "+", " sex", "+", comparison_variable)))

dds <- DESeq(dds)
DE_output <- lfcShrink(dds, coef=paste0(Condition,"_",A_vs_B), type="apeglm")
DESeq2 • 384 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 11 hours ago
United States

That one sample won't be useful at all. As Ryan Thompson explained way back in the day, the coefficient for that sample will be the difference between that sample and the baseline sample type. Since there is only one such sample, that is equivalent to subtracting the sample out. In addition, your response 'C' is nested in batch 2, which means that batch and response are not orthogonal. You would probably do better by using the limma-voom pipeline to fit a mixed linear model instead.

0
Entering edit mode

Yeah, I thought that'd be the case.

Thanks for the suggestion, I'll look into using limma-voom.

ADD REPLY

Login before adding your answer.

Traffic: 729 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6