Hi !
Hi
I want to draw a venn diagram of the peaks shared across four Tissues in my data set, but I'm not able to correctly select the set of peaks or create a contrast that achieves this.
The idea is to get four way vennDiagram with the four Tissues.
I have tried different things
> Example.data <- dba(sampleSheet=Example.table, minOverlap=1)
> Example.data.counts <- dba.count(Example.data, minOverlap=2, score=score.value )
> Example.data.counts
8 Samples, 101978 sites in matrix:
ID Tissue Factor Condition Replicate Caller Intervals FRiP
1 Tissue1_1 Tissue1 AC EC 1 counts 101978 0.64
2 Tissue1_2 Tissue1 AC EC 2 counts 101978 0.77
3 Tissue2_1 Tissue2 not_AC EC 1 counts 101978 0.62
4 Tissue2_2 Tissue2 not_AC EC 2 counts 101978 0.73
5 Tissue3_1 Tissue3 not_AC NotEC 1 counts 101978 0.54
6 Tissue3_2 Tissue3 not_AC NotEC 2 counts 101978 0.53
7 Tissue4_1 Tissue4 not_AC NotEC 1 counts 101978 0.71
8 Tissue4_2 Tissue4 not_AC NotEC 2 counts 101978 0.62
8 Samples, 101978 sites in matrix:
ID Tissue Factor Condition Replicate Caller Intervals FRiP
1 Tissue1_1 Tissue1 AC EC 1 counts 101978 0.64
2 Tissue1_2 Tissue1 AC EC 2 counts 101978 0.77
3 Tissue2_1 Tissue2 not_AC EC 1 counts 101978 0.62
4 Tissue2_2 Tissue2 not_AC EC 2 counts 101978 0.73
5 Tissue3_1 Tissue3 not_AC NotEC 1 counts 101978 0.54
6 Tissue3_2 Tissue3 not_AC NotEC 2 counts 101978 0.53
7 Tissue4_1 Tissue4 not_AC NotEC 1 counts 101978 0.71
8 Tissue4_2 Tissue4 not_AC NotEC 2 counts 101978 0.62
> Example.data.counts.2 <- dba.contrast(Example.data.counts.2,categories=DBA_TISSUE, minMembers=2)
> Example.data.counts.2
8 Samples, 101978 sites in matrix:
ID Tissue Factor Condition Replicate Caller Intervals FRiP
1 Tissue1_1 Tissue1 AC EC 1 counts 101978 0.64
2 Tissue1_2 Tissue1 AC EC 2 counts 101978 0.77
3 Tissue2_1 Tissue2 not_AC EC 1 counts 101978 0.62
4 Tissue2_2 Tissue2 not_AC EC 2 counts 101978 0.73
5 Tissue3_1 Tissue3 not_AC NotEC 1 counts 101978 0.54
6 Tissue3_2 Tissue3 not_AC NotEC 2 counts 101978 0.53
7 Tissue4_1 Tissue4 not_AC NotEC 1 counts 101978 0.71
8 Tissue4_2 Tissue4 not_AC NotEC 2 counts 101978 0.62
10 Contrasts:
Group1 Members1 Group2 Members2
1 Tissue1 2 Tissue2 2
2 Tissue1 2 Tissue3 2
3 Tissue1 2 Tissue4 2
4 Tissue1 2 !Tissue1 6
5 Tissue2 2 Tissue3 2
6 Tissue2 2 Tissue4 2
7 Tissue2 2 !Tissue2 6
8 Tissue3 2 Tissue4 2
9 Tissue3 2 !Tissue3 6
10 Tissue4 2 !Tissue4 6
> dba.plotVenn(Example.data.counts.2, contrast=3)
Error in dba.plotVenn(Example.data.counts.2, contrast = 3) :
No peaksets meet specified criteria.
In addition: Warning message:
No valid contrasts/methods specified.
I tried several contrast number and vectors and I never get a plot.
The I tried to do what is shown in the manual example:
> Example.data.counts.2 <- dba.peakset(Example.data.counts.2, consensus = DBA_TISSUE, minOverlap=0.66)
Add consensus: Tissue1
Add consensus: Tissue2
Add consensus: Tissue3
Add consensus: Tissue4
> dba.plotVenn(Example.data.counts.2, Example.data.counts.2$masks$Consensus)
Error in dba.plotVenn(Example.data.counts.2, Example.data.counts.2$masks$Consensus) :
Too many peaksets in mask.
Which makes sense since:
> Example.data.counts.2$masks$Consensus
Tissue1_1 Tissue1_2 Tissue2_1 Tissue2_2 Tissue3_1 Tissue3_2 Tissue4_1 Tissue4_2 Tissue1 Tissue2
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
Tissue3 Tissue4
TRUE TRUE
I thoguth that the idea of asking for the tissue consensus was to only get TRUEs in the last four terms since the other are the Replicate names.
Then I tried this:
dba.plotVenn(Example.data.counts.2, Example.data.counts.2$masks$Tissue1,Example.data.counts.2$masks$Tissue2,Example.data.counts.2$masks$Tissue3, Example.data.counts.2$masks$Tissue4 )
Now I don't get an error but I don't get a graph either.
If someone could provide some clues on how to achieve this I would really appreciate it.
I have looked into this further. in the development release (1,17) and onwards,
dba,peakset()
will abort with an error if you try to added consensus peaksets to what is already a consensus object after counting.dba.overlap()
anddba.
plotVenn()
will, however, work if you want to see which of the peaks in the consensus were called in which sam