error after DESeq function nbinomTest with only one replicate
2
0
Entering edit mode
4.7 years ago

Hello! I'm quite new to DESeq. I want to compare two treatments with only one replicate each. I heard the DESeq package can handle this sort of data. My data looks like this:

data <- read.csv("C:/data.csv", header=T, sep=";", row.names=1)
str(data)

'data.frame':   5538 obs. of  2 variables:
$BC_SN: int 2595 5794 1013 6715 368 74 185 2006 545 16 ...$ PA_SN: int  2994 7947 1135 7728 362 55 157 1553 429 23 ...

metadata <- data.frame(row.names = colnames(data), condition = c("treated", "untreated"))

condition
BC_SN   treated
PA_SN untreated


I then generate a countdataset by using:

cds <- newCountDataSet( countData = data, conditions = metadata )


which gives:

CountDataSet (storageMode: environment)
assayData: 5538 features, 2 samples
element names: counts
protocolData: none
phenoData
sampleNames: BC_SN PA_SN
varLabels: sizeFactor condition
enter code here
featureData
featureNames: PA0001 PA0002 ... PA5570 (5538 total)
fvarLabels: disp_blind
experimentData: use 'experimentData(object)'
Annotation:


My further script is:

cds <- estimateSizeFactors(cds)
cds <-estimateDispersions(cds,method="blind",sharingMode="fit-only",fitType="local")
res <- nbinomTest(cds,"treated","untreated")


The nbinomTest function gives me this error:

Error in if (dispTable(cds)[condA] == "blind" || dispTable(cds)[condB] == : missing value where TRUE/FALSE needed

I don't understand this error or what I can do to make the nbinomTest function work.

my dispTable looks like this:

> dispTable(cds)
_all
"blind"


Can somebody help me please?

BTW, I know only one replicate doesn't tell me much about the biological effects. I'm working on two more already but in the meantime I would like to look into some of my data already.

Cheers, Anne

DESeq nbinomTest error no replicates • 2.9k views
0
Entering edit mode

This is DESeq right, and not DESeq2? Any good reason for that?

0
Entering edit mode

Yes DESeq1. DESeq2 cannot calculate p-values for only one replicate, but DESeq1 can. I know, this is no good experimental design but still I would like to do it. As I wrote above, i am already working on other replicates. For now, i would like to get DESeq1 to run. But i just don't know what to do with this error.

0
Entering edit mode

I've never worked with DESeq1 or without replicates, but I find these posts: https://support.bioconductor.org/p/56475/ and https://support.bioconductor.org/p/75990/

It seems to me running DESeq2 without replicates is possible as well. But maybe it doesn't give you p-values, which I think makes sense because it's quite meaningless to calculate p-values without replicates.

0
Entering edit mode

You are right about the p-values. I just wanted to try the DESeq1 package, because it is well established for analyzing 1 replicate datasets. Some people in our lab use it as well to pre-analyze their data. But they never came across that error. And as usual with R we cannot say why my dataset or script should be different from theirs.

But thank you for the links. Also on the Bioconductor page you can find very nice manuals about DESeq 1 and 2.

2
Entering edit mode
4.6 years ago
Chris Cole ▴ 760

Your problem is where you define your conditions. newCountDataset() expects a factor with your conditions, but you give it a data.frame with rownames and entries.

Your cds summary has the sample names as "BC_SN PA_SN", but when you run nbinomTest(cds,"treated","untreated") you're giving it names that aren't in the cds object.

Define your cds like so, which should fix it:

  cds <- newCountDataSet( countData = data, conditions = as.factor(c("treated","untreated")))

0
Entering edit mode
4.6 years ago

Take a look to NOISeq, which I believe is far more robust in analyzing RNA-Seq data without replicates than other methods

Take it from the vignette The NOISeq package computes differential expression between two experimental conditions given the expression level of the considered features. The package includes two non-parametric approaches for differential expression analysis: NOISeq [1] for technical replicates or no replication at all, and NOISeqBIO [2], which is optimized for the use of biological replicates.

1
Entering edit mode

Sorry, but there's no such thing as robust unreplicated RNA-seq analysis. It's simply a qualitative assessment of a system, very little can be drawn from such an experiment. I'd argue it's a waste of money.

Also in our hands NOISeq is not as good as other methods as it doesn't control FPR very well at all.

Traffic: 2134 users visited in the last hour
FAQ
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.