Question: error after DESeq function nbinomTest with only one replicate
0
gravatar for anne.leinweber
2.6 years ago by
anne.leinweber0 wrote:

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

> metadata
      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
fvarMetadata: labelDescription
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

ADD COMMENTlink modified 2.5 years ago by Chris Cole680 • written 2.6 years ago by anne.leinweber0

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

ADD REPLYlink written 2.6 years ago by WouterDeCoster37k

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.

ADD REPLYlink written 2.6 years ago by anne.leinweber0

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.

ADD REPLYlink written 2.6 years ago by WouterDeCoster37k

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.

ADD REPLYlink written 2.6 years ago by anne.leinweber0
0
gravatar for Antonio R. Franco
2.5 years ago by
Spain. Universidad de Córdoba
Antonio R. Franco4.0k wrote:

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.

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Antonio R. Franco4.0k
1

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.

ADD REPLYlink modified 2.5 years ago • written 2.5 years ago by Chris Cole680
0
gravatar for Chris Cole
2.5 years ago by
Chris Cole680
Scotland
Chris Cole680 wrote:

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")))
ADD COMMENTlink written 2.5 years ago by Chris Cole680
Please log in to add an answer.

Help
Access

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