DiffBind error: diffbind DESeq2 analysis has not been run for this contrast
1
0
Entering edit mode
kyliecode • 0
@kyliecode-14088
Last seen 5 months ago
Sweden

Hi everone,

Have you ever seen "diffbind DESeq2 analysis has not been run for this contrast" during DiffBind analysis (during: plot(K9_broad_affinity, contrast=1))

I've confirmed DiffBind is workable using the test data from the package  

Please find the history of my run as follows:

R version 3.4.1 (2017-06-30) -- "Single Candle"

Copyright (C) 2017 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.

Type 'contributors()' for more information and

'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or

'help.start()' for an HTML browser interface to help.

Type 'q()' to quit R.

> library(DiffBind)

Loading required package: GenomicRanges

Loading required package: stats4

Loading required package: BiocGenerics

Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,

    clusterExport, clusterMap, parApply, parCapply,

    parLapply, parLapplyLB, parRapply, parSapply,

    parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, cbind, colMeans,

    colnames, colSums, do.call, duplicated, eval, evalq,

    Filter, Find, get, grep, grepl, intersect, is.unsorted,

    lapply, lengths, Map, mapply, match, mget, order, paste,

    pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,

    Reduce, rowMeans, rownames, rowSums, sapply, setdiff,

    sort, table, tapply, union, unique, unsplit, which,

    which.max, which.min

Loading required package: S4Vectors

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

    expand.grid

Loading required package: IRanges

Loading required package: GenomeInfoDb

Loading required package: SummarizedExperiment

Loading required package: Biobase

Welcome to Bioconductor

    Vignettes contain introductory material; view with

    'browseVignettes()'. To cite Bioconductor, see

    'citation("Biobase")', and for packages

    'citation("pkgname")'.

Loading required package: DelayedArray

Loading required package: matrixStats

Attaching package: ‘matrixStats’

The following objects are masked from ‘package:Biobase’:

    anyMissing, rowMedians

Attaching package: ‘DelayedArray’

The following objects are masked from ‘package:matrixStats’:

    colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

The following object is masked from ‘package:base’:

    apply

> setwd(system.file("extra", package="DiffBind"))

> print(setwd)

function (dir) 

.Internal(setwd(dir))

<bytecode: 0x1253915f0>

<environment: namespace:base>

> K9_broad <- dba(sampleSheet="NgR_ChIPSeqSO_SS-170626-01a_allfields_K9_broad.csv")

T1-D0-K9 D0 K9 D0 Undifferentated 1 MACS

T4-D0-K9 D0 K9 D0 Undifferentated 2 MACS

T1-D2-K9 D2 K9 D2 2_day_differentiation 1 MACS

T4-D2-K9 D2 K9 D2 2_day_differentiation 2 MACS

T1-D6-K9 D6 K9 D6 6_day_differentiation 1 MACS

T4-D6-K9 D6 K9 D6 6_day_differentiation 2 MACS

> K9_broad

6 Samples, 193447 sites in matrix (338046 total):

        ID Tissue Factor Condition             Treatment Replicate

1 T1-D0-K9     D0     K9        D0       Undifferentated         1

2 T4-D0-K9     D0     K9        D0       Undifferentated         2

3 T1-D2-K9     D2     K9        D2 2_day_differentiation         1

4 T4-D2-K9     D2     K9        D2 2_day_differentiation         2

5 T1-D6-K9     D6     K9        D6 6_day_differentiation         1

6 T4-D6-K9     D6     K9        D6 6_day_differentiation         2

  Caller Intervals

1   MACS    191663

2   MACS    151250

3   MACS    136889

4   MACS    171996

5   MACS    196869

6   MACS    155517

> plot(K9_broad)

Error in plot.new() : figure margins too large

> data(K9_broad_counts)

> K9_broad_affinity <- K9_broad_reads

> K9_broad_affinity

6 Samples, 193447 sites in matrix:

        ID Tissue Factor Condition             Treatment Replicate Caller

1 T1-D0-K9     D0     K9        D0       Undifferentated         1 counts

2 T4-D0-K9     D0     K9        D0       Undifferentated         2 counts

3 T1-D2-K9     D2     K9        D2 2_day_differentiation         1 counts

4 T4-D2-K9     D2     K9        D2 2_day_differentiation         2 counts

5 T1-D6-K9     D6     K9        D6 6_day_differentiation         1 counts

6 T4-D6-K9     D6     K9        D6 6_day_differentiation         2 counts

  Intervals FRiP

1    193447 0.33

2    193447 0.36

3    193447 0.31

4    193447 0.33

5    193447 0.34

6    193447 0.37

> plot(K9_broad_affinity)

> K9_broad_affinity <- dba.contrast(K9_broad_affinity, categories=DBA_CONDITION, minMembers=2)

> K9_broad_affinity <- dba.analyze(K9_broad_affinity, method=DBA_DESEQ2)

> K9_broad_affinity

6 Samples, 193447 sites in matrix:

        ID Tissue Factor Condition             Treatment Replicate Caller

1 T1-D0-K9     D0     K9        D0       Undifferentated         1 counts

2 T4-D0-K9     D0     K9        D0       Undifferentated         2 counts

3 T1-D2-K9     D2     K9        D2 2_day_differentiation         1 counts

4 T4-D2-K9     D2     K9        D2 2_day_differentiation         2 counts

5 T1-D6-K9     D6     K9        D6 6_day_differentiation         1 counts

6 T4-D6-K9     D6     K9        D6 6_day_differentiation         2 counts

  Intervals FRiP

1    193447 0.33

2    193447 0.36

3    193447 0.31

4    193447 0.33

5    193447 0.34

6    193447 0.37

3 Contrasts:

  Group1 Members1 Group2 Members2

1     D0        2     D2        2

2     D0        2     D6        2

3     D2        2     D6        2

> plot(K9_broad_affinity, contrast=1)

Error in pv.DBAreport(pv, contrast = contrast, method = method, th = th,  : 

  DESeq2 analysis has not been run for this contrast

DiffBind R chipseq • 2.2k views
ADD COMMENT
1
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 5 weeks ago
Cambridge, UK

It looks like the analysis did not get run for some reason. This can be seen by the fact that when you print out the DBA object after calling dba.analyze(), there are no columns for the number of differentially bound sites for DESeq2.

Normally I would expect to see some error messages, but in some cases these get "lost" when running in the default parallel mode. The next step would be to retry the dba.analyze() step but set bParallel=FALSE to run it serially. Hopefully this will either a) work or b) output some useful message.

-Rory

ADD COMMENT
0
Entering edit mode

Hi Rory Stark, I'm running into essentially this same issue but with EdgeR. Interestingly, dba.analyze worked with DESeq2 but failed silently with EdgeR. Rerunning dba.analyze with bParallel = FALSE didn't change anything -- it completed without error but doesn't have an EdgeR component in the returned DBA object. Do you have any suggestions to figure out the root cause of this issue?

ADD REPLY
0
Entering edit mode

edgeR analysis is not run by default, did you specify that it should be run?

dba.analyze(myDBA, method=DBA_EDGER)

or

dba.analyze(myDBA, method=DBA_ALL_METHODS)
ADD REPLY

Login before adding your answer.

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