Question: Problem with DESeq2 object
gravatar for aapapaiwannou
28 days ago by
aapapaiwannou0 wrote:

Hello, I usisn DESeq2 package in R for analysing Rna seq sngle end data. After running the DESeq pipeline dds <- DESeq(dds)

I am getting this warning message : In class(object) <- "environment" : Setting class(x) to "environment" sets attribute to NULL; result will no longer be an S4 object

Because it's the first time working with these kind of data and this package, could you please help me understand what is about this warning and how I can fix it (if I need to).

Thank you in advance, Anna

deseq2 biocodunctor • 69 views
ADD COMMENTlink modified 27 days ago by Michael Love26k • written 28 days ago by aapapaiwannou0
Answer: Problem with DESeq2 object
gravatar for Michael Love
27 days ago by
Michael Love26k
United States
Michael Love26k wrote:

Can you post more code? What comes earlier?

ADD COMMENTlink written 27 days ago by Michael Love26k

Import data from featureCounts

countdata <- read.table("genecounts.txt", header=TRUE, row.names=1)

Remove first five columns (chr, start, end, strand, length)

countdata <- countdata[ ,6:ncol(countdata)]

Remove .bam or .sam from filenames and the firstpart "..mapping"

colnames(countdata) <- gsub("\.sorted.bam$", "", colnames(countdata))

Convert to matrix

countdata <- as.matrix(countdata) head(countdata)

Assign condition (first 7 : 0 dpi, second 7: 1 dpi, third 7: 2dpi ,fourth 7 :3 dpi, fifth 7: 4dpi )

(condition <- factor(c(rep("0dpi", 7), rep("1dpi", 7),rep("2dpi", 7),rep("3dpi", 7),rep("4_dpi", 7))))

Analysis with DESeq2 ----------------------------------------------------


Create a coldata frame and instantiate the DESeqDataSet. See ?DESeqDataSetFromMatrix

(coldata <- data.frame(row.names=colnames(countdata), condition))

dds <- DESeqDataSetFromMatrix(countData=countdata, colData=coldata, design=~condition) dds

Run the DESeq pipeline

dds <- DESeq(dds) res <-results(dds) res

ADD REPLYlink written 27 days ago by aapapaiwannou0

I don't see any issue here, I wonder if you re-run in a fresh session if the error will resolve itself.

Some things to worry about are if there are any hidden .Rdata files in the directory or functions masking DESeq for example. Obviously, the paradigm:

dds <- DESeq(dds)
res <- results(dds)

is perfectly fine and shouldn't produce any errors unless something strange is happening.

ADD REPLYlink written 26 days ago by Michael Love26k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 349 users visited in the last hour