This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to convert SummarizedExperiment files to DESeqDataSet??

I already read DESeq2 tutorial when analyzing single cell data. but it didn't work

> aggregate_Wat

$AllCells
class: SummarizedExperiment 
dim: 16176 4 
metadata(0):
assays(1): counts
rownames(16176): Raet1e LOC102547056 ... Svop Gtpbp6.1
rowData names(0):
colnames(4): WAT_M_Y WAT_F_Y WAT_M_O WAT_F_O
colData names(2): orig.ident type

> dds_WAT <- DESeqDataSet(aggregate_Wat)

Error in DESeqDataSet(aggregate_Wat) : 
  'se' must be a RangedSummarizedExperiment object

Thank you so much!!enter image description here

scrna-seq deg deseq2

I believe you need to do DESeqDataSet(aggregate_Wat$AllCells).

Thank you for your kind help. But it didn't work too..LOL

> WAT_dds <- DESeqDataSet(aggregate_Wat$AllCells)
Error in order(...) : unimplemented type 'list' in 'orderVector1'

Can you share the ouput of the following two commands?

class(aggregate_Wat)
class(aggregate_Wat$AllCells)

And how do you construct your aggregate_Wat object?

> class(aggregate_Wat)
[1] "list"
> class(aggregate_Wat$AllCells)
[1] "SummarizedExperiment"
attr(,"package")
[1] "SummarizedExperiment"

and this is how I get aggregate_Wat

 Wat_integration<- readRDS('~/Desktop/GSE137869/2ndtry/integration_2nd/harmonized_WAT_0.4.rds')
    Wat_sce <- as.SingleCellExperiment(Wat_integration)
    Wat_sce

    aggregate_Wat <-
      aggregateBioVar(
        scExp = Wat_sce,
        subjectVar = "orig.ident", cellVar = "clusters")

Thankyou so much!!

Looks like this is single cell study. Anyhow, per the documentation here section DGE with DESeq2, you will need to adapt the following towards your needs (changing Secretory cell to AllCells can be a good start):

subj_dds_dataset <-
    DESeqDataSetFromMatrix(
        countData = assay(aggregate_counts$`Secretory cell`, "counts"),
        colData = colData(aggregate_counts$`Secretory cell`),
        design = ~ Genotype
    )
#> converting counts to integer mode
#> Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
#> design formula are characters, converting to factors

subj_dds <- DESeq(subj_dds_dataset)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing

subj_dds_results <-
    results(subj_dds, contrast = c("Genotype", "WT", "CFTRKO"))

0 answers

No answers yet.

Log in to answer this question.