how to convert SummarizedExperiment files to DESeqDataSet??
0
0
Entering edit mode
6 weeks ago
kayah • 0

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 • 308 views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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'
ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode
> 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!!

ADD REPLY
1
Entering edit mode

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"))
ADD REPLY

Login before adding your answer.

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