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 trying to do pseudobulk analysis on GEO dataset from Lake et al.. I did many similar analysis without a problem. However, has a sanity check, following the Seurat tutorial work just fine:
Expected:
Seurat tutorial on the ifnb dataset
library(Seurat)
library(SeuratData)
ifnb <- LoadData("ifnb")
# load the inferred sample IDs of each cell
ctrl <- read.table(url("https://raw.githubusercontent.com/yelabucsf/demuxlet_paper_code/master/fig3/ye1.ctrl.8.10.sm.best"), head = T, stringsAsFactors = F)
stim <- read.table(url("https://raw.githubusercontent.com/yelabucsf/demuxlet_paper_code/master/fig3/ye2.stim.8.10.sm.best"), head = T, stringsAsFactors = F)
info <- rbind(ctrl, stim)
# rename the cell IDs by substituting the '-' into '.'
info$BARCODE <- gsub(pattern = "\\-", replacement = "\\.", info$BARCODE)
# only keep the cells with high-confidence sample ID
info <- info[grep(pattern = "SNG", x = info$BEST), ]
# remove cells with duplicated IDs in both ctrl and stim groups
info <- info[!duplicated(info$BARCODE) & !duplicated(info$BARCODE, fromLast = T), ]
# now add the sample IDs to ifnb
rownames(info) <- info$BARCODE
info <- info[, c("BEST"), drop = F]
names(info) <- c("donor_id")
ifnb <- AddMetaData(ifnb, metadata = info)
# remove cells without donor IDs
ifnb$donor_id[is.na(ifnb$donor_id)] <- "unknown"
ifnb <- subset(ifnb, subset = donor_id != "unknown")
# pseudobulk the counts based on donor-condition-celltype
pseudo_ifnb <- AggregateExpression(
ifnb,
assays = "RNA",
return.seurat = T,
group.by = c("stim", "donor_id", "seurat_annotations")
)
# each 'cell' is a donor-condition-celltype pseudobulk profile
pseudo_ifnb$celltype.stim <- paste(pseudo_ifnb$seurat_annotations, pseudo_ifnb$stim, sep = "_")
Idents(pseudo_ifnb) <- "celltype.stim"
## Do DESeq2 pseudobulk DGE
bulk.mono.de <- FindMarkers(
object = pseudo_ifnb,
ident.1 = "CD14 Mono_STIM",
ident.2 = "CD14 Mono_CTRL",
test.use = "DESeq2"
)
head(bulk.mono.de, n = 15)
When running on the tutorial data, FindMarkers() does the conversation to integer automatically
However, doing the same on the Lake et al. dataset return the error Error in DESeqDataSet(se, design = design, ignoreRank) : some values in assay are not integers.
What am I missing? I did DESeq2 pseudobulk analysis in the past with other dataset from GEO with no issues...
I could always convert the counts fromt bulk object to integer manually then run DESeq2 manually but it seems like re-inventing what's already coded in FindMarkers()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to do pseudobulk analysis on GEO dataset from Lake et al.. I did many similar analysis without a problem. However, has a sanity check, following the Seurat tutorial work just fine:
Expected:
Seurat tutorial on the ifnb dataset
When running on the tutorial data,
FindMarkers()
does the conversation to integer automaticallyFindMarkers
messagesProblem:
However, doing the same on the Lake et al. dataset return the error
Error in DESeqDataSet(se, design = design, ignoreRank) : some values in assay are not integers
.What am I missing? I did DESeq2 pseudobulk analysis in the past with other dataset from GEO with no issues...
I could always convert the counts fromt
bulk
object to integer manually then run DESeq2 manually but it seems like re-inventing what's already coded inFindMarkers()
Thanks for any guidance here
Beta Was this translation helpful? Give feedback.
All reactions