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
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:
Thank you in advance for your help!
Kind regards, Amel Zulji
Genes with DESeq2 adjusted p-value less than 0.05 for both A vs B and A vs C pairwise comparisons.
Thank you very much, Michael!
Thank you very much for the clarification, Michael!