You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm doing DEG using the pseudoBulkDGE() function. I would like to test the interaction effect of sex * condition. Specifically the contrast of these three:
pseudoBulkDGE() is just a thin wrapper around edgeR (or voom, depending on which option you picked). If you supply a contrast matrix to either of these frameworks, the null hypothesis is that all of the individual contrasts in the columns are true. In your case, the null would be that there is no disease effect in males AND there is no disease effect in females AND there is no interaction effect... though the last one is implied by the first two anyway.
It is likely that you just want to test one of them at a time, so just call pseudoBulkDGE() separately. With sorted=FALSE, you can easily just assemble a DataFrame with the columns you want from the output of all the calls.
Hello,
I'm doing DEG using the pseudoBulkDGE() function. I would like to test the interaction effect of sex * condition. Specifically the contrast of these three:
Disease.Female - Healthy.Female
Disease.Male - Healthy.Male
(Disease.Female-Healthy.Female)-(Disease.Male-Healthy.Male)
The output is like this:
I wonder the pvalue is for which comparison? And how to get the pvalues for each comparison? Thanks a lot for any help!
My code:
library(scran)
library(limma)
library(edgeR)
sce<- SingleCellExperiment(assays=list(counts=rawcount), colData=metadata)
groups<- colData(sce)[, c('cell_type_me', 'individualID')]
summed<- aggregateAcrossCells(sce, groups)
colData(summed)$TS<- paste(colData(summed)$condition, colData(summed)$msex, sep='.')
colData(summed)$TS<- factor(colData(summed)$TS, levels=c('Healthy.Male', 'Healthy.Female', 'Disease.Male', 'Disease.Female'))
design<- model.matrix(~0+TS+genotype+ncells+educ)
contr.matrix<- makeContrasts(
DiseasevsHealthyinF=(TSDisease.Female-TSHealthy.Female),
DiseasevsHealthyinM=(TSDisease.Male-TSHealthy.Male),
Diff=(TSDisease.Female-TSHealthy.Female)-(TSDisease.Male-TSHealthy.Male),
levels = colnames(design))
de.results<- pseudoBulkDGE(summed, label=summed$cell_type_me,
design=~0+TS+genotype+ncells+educ,
condition=summed$TS,
contrast=contr.matrix)
results<- de.results[['celltypeA']]
results<- as.data.frame(results)
results<- results %>% arrange(PValue)
The text was updated successfully, but these errors were encountered: