Why I get error while performing DeSeq2 ?
1
0
Entering edit mode
2.1 years ago

While perfroming DEsEq2 analysis, I get the following error: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘NSBS’ for signature ‘"CompressedIntegerList"’

Also, I updated all the packages to latest ones inclusing bioconductor.

My code:

Load necessary packages

library(NOISeq)
library(edgeR)
library(DESeq2)
library(ggplot2)
library(reshape2)
library(gplots)
library(RColorBrewer)
library(limma)
library(sva)
library(biomaRt)
library(Rsamtools)

Load Phenotype and count data

rawCountTable <- as.matrix(read.delim(file.choose(), row.names=1))
Col_data = read.table(file = "tLUSC_Phenotype.txt", header = T, sep = "\t")

Run DeSeq2

dds = DESeqDataSetFromMatrix(countData = rawCountTable, colData = Col_data, design = ~ Type)
dds = DESeq(dds)
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
dds = estimateSizeFactors(dds)
sizeFactors(dds)
vsd <- vst(dds)
vsd2 <- assay(vst(dds, blind=FALSE))
DeSeq2 RNA-Seq Normalization • 1.6k views
ADD COMMENT
1
Entering edit mode

At which step does that come up?

ADD REPLY
0
Entering edit mode

I get this error at the step

vsd <- vst(dds)

Rest all works fine till

sizeFactors(dds)
ADD REPLY
1
Entering edit mode
2.1 years ago
ATpoint 85k

I cannot reproduce this. The estimateSizeFactors S4 method is able to accept and return a DESeqDataSet, so that is not the issue. You can try DESeq2::vst(), maybe there is something in your namespace that is preferred over the DESeq2 method. Also restart R and try again. Please provide a reproducible example and the sessionInfo.

ADD COMMENT
0
Entering edit mode

Thank you for your assistance and prompt reply sir.

I re-ran the code with following modifications and it works perfectly well. Please tell if my revised code is correct ?

Load necessary packages

library(DESeq2)
library(Rsamtools)
<h5>Load Phenotype and count data</h5>
rawCountTable <- as.matrix(read.delim(file.choose(), row.names=1))
Col_data = read.table(file = "LUSC_Phenotype.txt", header = T, sep = "\t")
<h5>Run DeSeq2</h5>
dds = DESeqDataSetFromMatrix(countData = rawCountTable, colData = Col_data, design = ~ Type)
dds = DESeq(dds)
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
dds = estimateSizeFactors(dds)
sizeFactors(dds)
vsd <- assay(varianceStabilizingTransformation(dds, blind=FALSE))

My original files are available at this link:

Phenotype file: https://od.lk/d/ODdfMjgyMjA5MTFf/LUSC_Phenotype.txt

Counts file: https://od.lk/d/ODdfMjgyMjA5MTBf/LUSC_COUNTS.txt

ADD REPLY
0
Entering edit mode

No one wants to follow an unknown link to download files from a stranger. You could start by showing us the summary of dds. Also, the DESeq function calls estimateSizeFunction as well as the rest of the DESeq commands (estimating dispersion, etc), so you don't have to do DESeq and estimateSizeFactors separately at that point. You should remove the low-count genes, then call DESeq, and then you don't have to do estimateSizeFactors again.

ADD REPLY

Login before adding your answer.

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