one group against two other groups comparison using LRT test (pseudobulk approach)
1
0
Entering edit mode
amel.zulji ▴ 20
@amelzulji-24297
Last seen 3.9 years ago

Hi folks,

I have a dataset consisted of 3 distinct tissue types (A, B, C) and different number of samples for each tissue (A, n=3; B, n=3; C, n=9), and I am interested in finding genes which are specific for one tissue type as compared to the two other tissue types (i.e. A vs B&C).

My first question is - does the unbalanced number of samples per tissue type affect calculation, and if so, is there a way to account for that?

Second question - What is the most effective way to do that using LRT test (recommended test by authors in case of pseudobulk)?

I tried this:

dds <- DESeqDataSetFromMatrix(pseudobulk, sample_table, ~Batch + Tissue_type)

dds  <- DESeq(dds, test = "LRT", reduced = ~Batch, sfType = "poscounts", useT = T, minmu = 1e-6, minReplicatesForReplace=Inf)

and followed this post to extract tissue specific results as follows:

res_A <- results(dds, contrast = c(1,-1/3,-1/3))

However, the following error was thrown

Error in checkContrast(contrast, resNames) : 
  numeric contrast vector should have one element for every element of 'resultsNames(object)'

I assume it is related to the results which looks like this:

resultsNames(dds)
[1] "Intercept"                            "Batch"                                 
[3] "Tissue_type_B_vs_A"     "Tissue_type_C_vs_A"

But I am not sure how to properly change the contrast argument to get the desired results...

Looking forward to your help, and perhaps other (better) solution how to test one group against two other groups using LRT test.

Best regards, Amel

deseq2 • 1.8k views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 2 days ago
United States

The results() argument contrast here won't let you perform LRT on that numeric contrast, if you desire to test that contrast it would be a Wald test.

For simplicity, I'd recommend doing pairwise comparisons and intersecting the results. This is straightforward, and avoids the situation that in fact all three groups have distinct mean expression, but A vs the average of B+C is not significant. E.g. imagine B is up-regulated and C down-regulated with respect to A.

ADD COMMENT
2
Entering edit mode

Michael Love, once again thank you for your help. I would just like to ask you about the way how to report the p-values?

I used following code:

dds <- DESeqDataSetFromMatrix(pseudobulk, sample_table, ~Batch + Tissue_type)
dds  <- DESeq(dds)

A_vs_B <- results(dds, contrast=c("Tissue_type","A","B"), test = "Wald")
A_vs_B_sig_genes <- as.data.frame(A_vs_B) %>% filter(padj<0.05) %>% rownames_to_column("genes")  %>% pull(genes)

A_vs_C <- results(dds, contrast=c("Tissue_type","A","C"), test = "Wald")
A_vs_C_sig_genes <- as.data.frame(A_vs_C) %>% filter(padj<0.05) %>% rownames_to_column("genes")  %>% pull(genes)

A_specific_genes <- intersect(A_vs_B_sig_genes, A_vs_C_sig_genes)

Thank you in advance for your help!

Kind regards, Amel Zulji

ADD REPLY
0
Entering edit mode

Genes with DESeq2 adjusted p-value less than 0.05 for both A vs B and A vs C pairwise comparisons.

ADD REPLY
0
Entering edit mode

Thank you very much, Michael!

ADD REPLY
0
Entering edit mode

Thank you very much for the clarification, Michael!

ADD REPLY

Login before adding your answer.

Traffic: 606 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