Search
Question: ChIPpeakAnno makeVennDiagram problems
0
gravatar for Vince Schulz
4.5 years ago by
Vince Schulz60
United States
Vince Schulz60 wrote:
Hi, I am having problems with ChIPpeakAnno makeVennDiagram problems when the regions of interest do not overlap. This is coming up for me in comparing 4 datasets where two of the datasets don't overlap. It would be great if the function could properly output 0 in the non-overlapping segments. Thanks, Vince #toy example to show the issues library(ChIPpeakAnno) #this is OK peaks1 = RangedData(IRanges(start = c(1, 100, 200), end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), space = c("1", "1", "1"), strand=as.integer(1),feature=c("a","b","f")) peaks2 = RangedData(IRanges(start = c(1, 100, 200), end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), space = c("1", "1", "1"), strand=as.integer(1),feature=c("a","b","f")) makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", "TF2"), totalTest=100,scaled=F, euler.d=F) #below gives error peaks1 = RangedData(IRanges(start = c(1, 100, 200), end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), space = c("1", "1", "1"), strand=as.integer(1),feature=c("a","b","f")) peaks2 = RangedData(IRanges(start = c(1, 100, 200), end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), space = c("2", "2", "2"), strand=as.integer(1),feature=c("a","b","f")) makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", "TF2"), totalTest=100,scaled=F, euler.d=F) #Error in `colnames<-`(`*tmp*`, value = c("TF1", "chr", "TF2")) : # attempt to set 'colnames' on an object with less than two dimensions #below gives error (but it works in R2.15!) peaks1 = RangedData(IRanges(start = c(1, 100, 200), end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), space = c("1", "1", "1"), strand=as.integer(1),feature=c("a","b","f")) peaks2 = RangedData(IRanges(start = c(5, 105, 205), end = c(6, 106, 206), names = c("Site1", "Site2", "Site3")), space = c("1", "1", "1"), strand=as.integer(1),feature=c("a","b","f")) makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", "TF2"), totalTest=100,scaled=F, euler.d=F) #Error in seq.default(cnt, length.out = counts[i]) : # length must be non-negative number #In addition: Warning messages: #1: In min(p1.inBoth, p2.inBoth) : # no non-missing arguments to min; returning Inf #2: In findVennCounts(Peaks = Peaks, NameOfPeaks = NameOfPeaks, maxgap = maxgap, : # negative counts generated when multiple peaks overlap with one peak! # sessionInfo() R version 3.0.1 (2013-05-16) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel grid stats graphics grDevices utils datasets [8] methods base other attached packages: [1] RSvgDevice_0.6.4.2 Cairo_1.5-2 [3] ChIPpeakAnno_2.8.0 GenomicFeatures_1.12.1 [5] limma_3.16.4 org.Hs.eg.db_2.9.0 [7] GO.db_2.9.0 RSQLite_0.11.3 [9] DBI_0.2-7 AnnotationDbi_1.22.5 [11] BSgenome.Ecoli.NCBI.20080805_1.3.17 BSgenome_1.28.0 [13] GenomicRanges_1.12.4 Biostrings_2.28.0 [15] IRanges_1.18.1 multtest_2.16.0 [17] Biobase_2.20.0 biomaRt_2.16.0 [19] BiocGenerics_0.6.0 VennDiagram_1.6.0 [21] BiocInstaller_1.10.1 loaded via a namespace (and not attached): [1] bitops_1.0-5 MASS_7.3-26 RCurl_1.95-4.1 Rsamtools_1.12.3 [5] rtracklayer_1.20.2 splines_3.0.1 stats4_3.0.1 survival_2.37-4 [9] tcltk_3.0.1 tools_3.0.1 XML_3.96-1.1 zlibbioc_1.6.0
ADD COMMENTlink modified 4.5 years ago by Julie Zhu3.8k • written 4.5 years ago by Vince Schulz60
0
gravatar for Julie Zhu
4.5 years ago by
Julie Zhu3.8k
United States
Julie Zhu3.8k wrote:
Vincent, It has been fixed in the dev version 2.9.1. Many thanks for the the feedback and the detailed examples! Best regards, Julie On 5/22/13 1:47 PM, "Vincent Schulz" <vincent.schulz at="" yale.edu=""> wrote: > Hi, > > I am having problems with ChIPpeakAnno makeVennDiagram problems when the > regions of interest do not > overlap. This is coming up for me in comparing 4 datasets where two of the > datasets don't overlap. > It would be great if the function could properly output 0 in the > non-overlapping segments. > > Thanks, > > Vince > > > #toy example to show the issues > library(ChIPpeakAnno) > > > #this is OK > peaks1 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "1", "1"), > strand=as.integer(1),feature=c("a","b","f")) > peaks2 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "1", "1"), > strand=as.integer(1),feature=c("a","b","f")) > makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", > "TF2"), > totalTest=100,scaled=F, euler.d=F) > #below gives error > peaks1 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "1", "1"), > strand=as.integer(1),feature=c("a","b","f")) > peaks2 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("2", "2", "2"), > strand=as.integer(1),feature=c("a","b","f")) > makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", > "TF2"), > totalTest=100,scaled=F, euler.d=F) > #Error in `colnames<-`(`*tmp*`, value = c("TF1", "chr", "TF2")) : > # attempt to set 'colnames' on an object with less than two dimensions > #below gives error (but it works in R2.15!) > peaks1 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "1", "1"), > strand=as.integer(1),feature=c("a","b","f")) > peaks2 = RangedData(IRanges(start = c(5, 105, 205), > end = c(6, 106, 206), names = c("Site1", "Site2", "Site3")), > space = c("1", "1", "1"), > strand=as.integer(1),feature=c("a","b","f")) > makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", > "TF2"), > totalTest=100,scaled=F, euler.d=F) > #Error in seq.default(cnt, length.out = counts[i]) : > # length must be non-negative number > #In addition: Warning messages: > #1: In min(p1.inBoth, p2.inBoth) : > # no non-missing arguments to min; returning Inf > #2: In findVennCounts(Peaks = Peaks, NameOfPeaks = NameOfPeaks, maxgap = > maxgap, : > # negative counts generated when multiple peaks overlap with one peak! > # > sessionInfo() > R version 3.0.1 (2013-05-16) > Platform: x86_64-pc-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] parallel grid stats graphics grDevices utils datasets > [8] methods base > > other attached packages: > [1] RSvgDevice_0.6.4.2 Cairo_1.5-2 > [3] ChIPpeakAnno_2.8.0 GenomicFeatures_1.12.1 > [5] limma_3.16.4 org.Hs.eg.db_2.9.0 > [7] GO.db_2.9.0 RSQLite_0.11.3 > [9] DBI_0.2-7 AnnotationDbi_1.22.5 > [11] BSgenome.Ecoli.NCBI.20080805_1.3.17 BSgenome_1.28.0 > [13] GenomicRanges_1.12.4 Biostrings_2.28.0 > [15] IRanges_1.18.1 multtest_2.16.0 > [17] Biobase_2.20.0 biomaRt_2.16.0 > [19] BiocGenerics_0.6.0 VennDiagram_1.6.0 > [21] BiocInstaller_1.10.1 > > loaded via a namespace (and not attached): > [1] bitops_1.0-5 MASS_7.3-26 RCurl_1.95-4.1 > Rsamtools_1.12.3 > [5] rtracklayer_1.20.2 splines_3.0.1 stats4_3.0.1 survival_2.37-4 > [9] tcltk_3.0.1 tools_3.0.1 XML_3.96-1.1 zlibbioc_1.6.0 > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENTlink written 4.5 years ago by Julie Zhu3.8k
0
gravatar for Julie Zhu
4.5 years ago by
Julie Zhu3.8k
United States
Julie Zhu3.8k wrote:
Vince, Many thanks for the feedback and the great test examples! Jianhong has resolved the issue. Please download the newest dev version (revision 76936) and let us know if it works for you. Best regards, Julie On 5/24/13 12:10 PM, "Vincent Schulz" <vincent.schulz at="" yale.edu=""> wrote: > Hi Julie, > > The new version is better, but not quite there. I am still having troubles > with a 4 way venn, > possibly because of not all of the datasets having peaks on all chromosomes > (eg Y), but this is just > a guess. I get the same error > Error in seq.default(cnt, length.out = counts[i]) : > length must be non-negative number > > I could send you the data--it isn't tiny but isn't huge either. There is > another problems that > perhaps could be addressed first since it is more defined, see below. > > Thanks, > > Vince > > > > peaks1 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "1", "1"), > strand=as.integer(1),feature=c("a","b","f")) > peaks2 = RangedData(IRanges(start = c(1, 100, 200), > end = c(1, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("2", "2", "2"), > strand=as.integer(1),feature=c("a","b","f")) > peaks3 = RangedData(IRanges(start = c(1, 100, 200), > end = c(3, 103, 203), names = c("Site1", "Site2", "Site3")), > space = c("1", "2", "2"), > strand=as.integer(1),feature=c("a","b","f")) > peaks4 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "2", "2"), > strand=as.integer(1),feature=c("a","b","f")) > makeVennDiagram(RangedDataList(peaks1,peaks2,peaks3), > NameOfPeaks=c("TF1", "TF2","TF3"), > totalTest=100,scaled=F, euler.d=F) > #Error in findOverlappingPeaks(findOverlappingPeaks(Peaks[[1]], Peaks[[2]], : > # No valid Peaks1 passed in. It needs to be RangedData object > > #data same as above except first chrom of first range in peaks2 > peaks1 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "1", "1"), > strand=as.integer(1),feature=c("a","b","f")) > peaks2 = RangedData(IRanges(start = c(1, 100, 200), > end = c(1, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "2", "2"), > strand=as.integer(1),feature=c("a","b","f")) #note first > #chrom diff from above! > peaks3 = RangedData(IRanges(start = c(1, 100, 200), > end = c(3, 103, 203), names = c("Site1", "Site2", "Site3")), > space = c("1", "2", "2"), > strand=as.integer(1),feature=c("a","b","f")) > peaks4 = RangedData(IRanges(start = c(1, 100, 200), > end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), > space = c("1", "2", "2"), > strand=as.integer(1),feature=c("a","b","f")) > makeVennDiagram(RangedDataList(peaks1,peaks2,peaks3), > NameOfPeaks=c("TF1", "TF2","TF3"), > totalTest=100,scaled=F, euler.d=F) > #is fine, as is below > makeVennDiagram(RangedDataList(peaks1,peaks2,peaks3,peaks4), > NameOfPeaks=c("TF1", "TF2","TF3", > "TF4"), > totalTest=100,scaled=F, euler.d=F) > > sessionInfo() > R version 3.0.1 (2013-05-16) > Platform: x86_64-pc-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] parallel grid stats graphics grDevices utils datasets > [8] methods base > > other attached packages: > [1] RSvgDevice_0.6.4.2 ChIPpeakAnno_2.9.1 > [3] GenomicFeatures_1.13.8 limma_3.17.12 > [5] org.Hs.eg.db_2.9.0 GO.db_2.9.0 > [7] RSQLite_0.11.3 DBI_0.2-7 > [9] AnnotationDbi_1.23.11 BSgenome.Ecoli.NCBI.20080805_1.3.17 > [11] BSgenome_1.29.0 GenomicRanges_1.13.14 > [13] Biostrings_2.29.3 XVector_0.1.0 > [15] IRanges_1.19.8 multtest_2.17.0 > [17] Biobase_2.21.2 biomaRt_2.17.0 > [19] BiocGenerics_0.7.2 VennDiagram_1.6.0 > [21] Cairo_1.5-2 > > loaded via a namespace (and not attached): > [1] bitops_1.0-5 MASS_7.3-26 RCurl_1.95-4.1 > Rsamtools_1.13.15 > [5] rtracklayer_1.21.5 splines_3.0.1 stats4_3.0.1 survival_2.37-4 > [9] tcltk_3.0.1 tools_3.0.1 XML_3.96-1.1 zlibbioc_1.7.0 > > > > > > On 5/22/2013 4:51 PM, Zhu, Lihua (Julie) wrote: >> Vincent, >> >> It has been fixed in the dev version 2.9.1. >> >> Many thanks for the the feedback and the detailed examples! >> >> Best regards, >> >> Julie >> >> >> On 5/22/13 1:47 PM, "Vincent Schulz" <vincent.schulz at="" yale.edu=""> wrote: >> >>> Hi, >>> >>> I am having problems with ChIPpeakAnno makeVennDiagram problems when the >>> regions of interest do not >>> overlap. This is coming up for me in comparing 4 datasets where two of the >>> datasets don't overlap. >>> It would be great if the function could properly output 0 in the >>> non-overlapping segments. >>> >>> Thanks, >>> >>> Vince >>> >>> >>> #toy example to show the issues >>> library(ChIPpeakAnno) >>> >>> >>> #this is OK >>> peaks1 = RangedData(IRanges(start = c(1, 100, 200), >>> end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), >>> space = c("1", "1", "1"), >>> strand=as.integer(1),feature=c("a","b","f")) >>> peaks2 = RangedData(IRanges(start = c(1, 100, 200), >>> end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), >>> space = c("1", "1", "1"), >>> strand=as.integer(1),feature=c("a","b","f")) >>> makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", >>> "TF2"), >>> totalTest=100,scaled=F, euler.d=F) >>> #below gives error >>> peaks1 = RangedData(IRanges(start = c(1, 100, 200), >>> end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), >>> space = c("1", "1", "1"), >>> strand=as.integer(1),feature=c("a","b","f")) >>> peaks2 = RangedData(IRanges(start = c(1, 100, 200), >>> end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), >>> space = c("2", "2", "2"), >>> strand=as.integer(1),feature=c("a","b","f")) >>> makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", >>> "TF2"), >>> totalTest=100,scaled=F, euler.d=F) >>> #Error in `colnames<-`(`*tmp*`, value = c("TF1", "chr", "TF2")) : >>> # attempt to set 'colnames' on an object with less than two dimensions >>> #below gives error (but it works in R2.15!) >>> peaks1 = RangedData(IRanges(start = c(1, 100, 200), >>> end = c(2, 101, 201), names = c("Site1", "Site2", "Site3")), >>> space = c("1", "1", "1"), >>> strand=as.integer(1),feature=c("a","b","f")) >>> peaks2 = RangedData(IRanges(start = c(5, 105, 205), >>> end = c(6, 106, 206), names = c("Site1", "Site2", "Site3")), >>> space = c("1", "1", "1"), >>> strand=as.integer(1),feature=c("a","b","f")) >>> makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", >>> "TF2"), >>> totalTest=100,scaled=F, euler.d=F) >>> #Error in seq.default(cnt, length.out = counts[i]) : >>> # length must be non-negative number >>> #In addition: Warning messages: >>> #1: In min(p1.inBoth, p2.inBoth) : >>> # no non-missing arguments to min; returning Inf >>> #2: In findVennCounts(Peaks = Peaks, NameOfPeaks = NameOfPeaks, maxgap = >>> maxgap, : >>> # negative counts generated when multiple peaks overlap with one peak! >>> # >>> sessionInfo() >>> R version 3.0.1 (2013-05-16) >>> Platform: x86_64-pc-linux-gnu (64-bit) >>> >>> locale: >>> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >>> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 >>> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 >>> [7] LC_PAPER=C LC_NAME=C >>> [9] LC_ADDRESS=C LC_TELEPHONE=C >>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C >>> >>> attached base packages: >>> [1] parallel grid stats graphics grDevices utils datasets >>> [8] methods base >>> >>> other attached packages: >>> [1] RSvgDevice_0.6.4.2 Cairo_1.5-2 >>> [3] ChIPpeakAnno_2.8.0 GenomicFeatures_1.12.1 >>> [5] limma_3.16.4 org.Hs.eg.db_2.9.0 >>> [7] GO.db_2.9.0 RSQLite_0.11.3 >>> [9] DBI_0.2-7 AnnotationDbi_1.22.5 >>> [11] BSgenome.Ecoli.NCBI.20080805_1.3.17 BSgenome_1.28.0 >>> [13] GenomicRanges_1.12.4 Biostrings_2.28.0 >>> [15] IRanges_1.18.1 multtest_2.16.0 >>> [17] Biobase_2.20.0 biomaRt_2.16.0 >>> [19] BiocGenerics_0.6.0 VennDiagram_1.6.0 >>> [21] BiocInstaller_1.10.1 >>> >>> loaded via a namespace (and not attached): >>> [1] bitops_1.0-5 MASS_7.3-26 RCurl_1.95-4.1 >>> Rsamtools_1.12.3 >>> [5] rtracklayer_1.20.2 splines_3.0.1 stats4_3.0.1 >>> survival_2.37-4 >>> [9] tcltk_3.0.1 tools_3.0.1 XML_3.96-1.1 >>> zlibbioc_1.6.0 >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>
ADD COMMENTlink written 4.5 years ago by Julie Zhu3.8k
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.2.0
Traffic: 173 users visited in the last hour