Entering edit mode
aapapaiwannou
•
0
@aapapaiwannou-22167
Last seen 5.1 years ago
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
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 ----------------------------------------------------
library(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
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 maskingDESeq
for example. Obviously, the paradigm:is perfectly fine and shouldn't produce any errors unless something strange is happening.