30 Jan 15:51 2013
Re: DiffBind error
<jluis.lavin@...>
2013-01-30 14:51:54 GMT
2013-01-30 14:51:54 GMT
Hello again, Thank you very much to Rory and Gordon for your kind and accurate help. Changing the minMembers parameter everything seemed to work fine and I've been able to perform the next steps of the whole analysis. Now I'm struggling with the retrieval of the analysis data; when I try to write the results into a .csv table with a simple command I get the following error: > write.csv( chippy, file="ChIPseq_diffbind.csv" ) Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class '"DBA"' into a data.frame I read DiffBind's vignette and manual and I found the "save" command, but it doesn't allow me to retrieve the data either. Is there a way to coerce a DBA class object into a dataframe implemented in DiffBind? The person I'll be analyzing ChIPseq experiments for will need tables with differentially bound sites from his data comparisons so I need to learn how to get data out of DiffBind... Thanks in advance JL > stats graphics grDevices utils datasets methods [8] base other attached packages: [1] DESeq_1.10.1 lattice_0.20-10 locfit_1.5-8 [4] DiffBind_1.4.1 Biobase_2.18.0 GenomicRanges_1.10.5 [7] IRanges_1.16.4 BiocGenerics_0.4.0 BiocInstaller_1.8.3 loaded via a namespace (and not attached): [1] amap_0.8-7 annotate_1.36.0 AnnotationDbi_1.20.3 [4] DBI_0.2-5 edgeR_3.0.8 gdata_2.12.0 [7] genefilter_1.40.0 geneplotter_1.36.0 gplots_2.11.0 [10] grid_2.15.1 gtools_2.7.0 KernSmooth_2.23-8 [13] limma_3.14.4 RColorBrewer_1.0-5 RSQLite_0.11.2 [16] splines_2.15.1 stats4_2.15.1 survival_2.36-14 [19] tools_2.15.1 XML_3.95-0.1 xtable_1.7-0 [22] zlibbioc_1.4.0 El Mie, 30 de Enero de 2013, 13:28, Rory Stark escribió: > > Hello- > > It looks like your sample sheet is fine. > > By default, if no contrasts are set up using dba.contrast, when you call > dba.analyze it attempts to add all the two-way contrasts between groups > where there are at least three samples in each group. In your case, > nothing meets these conditions, as there are only two "Resistant" samples. > > If you add a call to dba.contrast before the call to dba.analyze, you will > get the contrast you desire: > >> chippy = dba.contrast(chippy, minMembers=2) > > or, slightly more explicitly: > >> chippy = dba.contrast(chippy, categories=DBA_CONDITION, minMembers=2) > > or, even more explicitly: > >> chippy = dba.contrast(chippy, group1=chippy$masks$Resistant, group2 = >>chippy$masksResponsive, name1="Resistant", name2="Responsive") > > then: > >> chippy = dba.analyze(chippy) > > Cheers- > Rory > Hi, By default, dba.contrast won't create contrasts with less than 3 members in each group. The easiest solution is to set minMembers=2 when calling dba.contrast: > chippy = dba.contrast(chippy, categories=DBA_CONDITION, minMembers=2) Or you can create the contrast explicitly: > chippy = dba.contrast(chippy, group1=chippy$masks$Resistant, >group2=chippy$masks$Responsive, name1="a name", name2="another name") Hope this helps... Cheers, - Gord > > On Tue, 29 Jan 2013 15:21:23 +0100, jluis.lavin@... wrote: > > >> >_peak >>s(sampleSheet="Peaksets_sample_sheet.csv") >> >>plot them >> >>>plot(chippy) >> >>and count the reads, >> >>>chippy = dba.count(chippy, minOverlap=3) >> >>but when I try to establish a contrast based on the condition metadata, I >>get the following warning message: >> >>> chippy = dba.contrast(chippy, categories=DBA_CONDITION) >> >>Warning message: >>No contrasts added. Perhaps try more categories, or lower value for >>minMembers. >> >>So when I try to perform the analysis, it doesn't work: >> >>> chippy = dba.analyze(chippy) >> >>Error in pv.DBA(DBA, method, bSubControl, bFullLibrarySize, bTagwise = >>bTagwise, : >> Unable to perform analysis: no contrasts specified. >>In addition: Warning message: >>No contrasts added. Perhaps try more categories, or lower value for >>minMembers. >> >>->My questions are: >>-What is the contrast for DiffBind (I added the input for each set of >>samples, and 2 biological replicates as control)? >>-Is there something wrong with the sample sheet? >>-Shouldn't the files to analyze be in bed format? >> >>Thanks in advance >> >>JL >> >>We may monitor all incoming and outgoing emails in line with current >>legislation. We have taken steps to ensure that this email and >>attachments are free from any virus, but it remains your responsibility >>to ensure that viruses do not adversely affect you. >>Cancer Research UKRegisteredoconductor mailing list Bioconductor@... Search the archives: