Dear Dr. Stark,
The following question has been asked before regarding error in dba.analyze step of diffBind when the contrast is set up for samples with no replicates. Obviously I should be comparing samples with multiple replicates but while I wait for more data from the sequencer it will be great if I could implement DiffBind for no replicates.
When I run dba.analyze step, I get the following error:
> dba.analyze(tf.chip)
Error in d$span : $ operator is invalid for atomic vectors
In addition: Warning messages:
1: Some groups have no replicates. Results may be unreliable.
2: In estimateCommonDisp(res) :
There is no replication, setting dispersion to NA.
3: In estimateGLMCommonDisp.default(y = y$counts, design = design, :
No residual df: setting dispersion to NA
4: In estimateGLMTagwiseDisp.default(y = y$counts, design = design, :
No residual df: setting dispersion to NA
The warnings make complete sense but I am unable to figure out why it throws this error. I know you hate to deal with errors on data with no replicates but it will be great if you already know the solution for this one. See below for output of SessionInfo() command. Please let me know if more information is needed. Apologies for the trouble.
Cheers,
Danish.
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] DiffBind_1.12.3 GenomicAlignments_1.2.2 Rsamtools_1.18.3
[4] Biostrings_2.34.1 XVector_0.6.0 limma_3.22.7
[7] GenomicRanges_1.18.4 GenomeInfoDb_1.2.4 IRanges_2.0.1
[10] S4Vectors_0.4.0 BiocGenerics_0.12.1 BiocInstaller_1.16.2
loaded via a namespace (and not attached):
[1] amap_0.8-14 base64enc_0.1-2 BatchJobs_1.6 BBmisc_1.9
[5] BiocParallel_1.0.3 bitops_1.0-6 brew_1.0-6 caTools_1.17.1
[9] checkmate_1.5.2 codetools_0.2-11 DBI_0.3.1 digest_0.6.8
[13] edgeR_3.8.6 fail_1.2 foreach_1.4.2 gdata_2.13.3
[17] gplots_2.16.0 grid_3.1.0 gtools_3.4.1 iterators_1.0.7
[21] KernSmooth_2.23-14 lattice_0.20-30 RColorBrewer_1.1-2 RSQLite_1.0.0
[25] sendmailR_1.2-1 stringr_0.6.2 tools_3.1.0 zlibbioc_1.12.0
Get it. Thanks a lot for the solution!
I have two replicates for each sample. but still get this error of "Error: $ operator is invalid for atomic vectors" with command
dba.analyze(dbObj, method=DBA_ALL_METHODS)
. Actually, two replicates are acceptable to edgeR or DESEQ2. The version of DiffBind 3.8.4 is used in this analysis.I'm unable to reproduce this on
DiffBind_3.8.4
. I created a two replicate per sample example was can rundba.analyze()
withmethod=DBA_ALL_METHODS
. Can you supply more information regarding your script up to thedba.analyze()
call?One thing to try as a workaround is to make two calls in succession:
and see it that works.
Thanks for your reply. This error disappears when I exit R and rerun. But a new error occurred with
failed to open the port 11446, trying a new port...
indba.count(dbObj, minOverlap=1, score=DBA_SCORE_RPKM, bUseSummarizeOverlaps=TRUE, bParallel = TRUE)
.