How to get the table which used to plot heatmap in DiffBind
1
0
Entering edit mode
@maofengbiao-11935
Last seen 7.4 years ago

Hi Dr. Rory Stark,

 

      I used your "DiffBind" to analysis Chip-seq data by following codes. However, I could not get the table which used to plot heatmap (different binding sites? What is the threshold?). Could you give me some advice? Thanks very much.

 

Codes:

------------------------------------------------------------

setwd("/data/fmao/rajesh/hMeDIP/DiffBind")

pdf("draw.DiffBind.final.pdf")

hmedip <- dba(sampleSheet="config.csv")

 

 

plot(hmedip,main="using occupancy (peak caller score) data")

hmedip <- dba.count(hmedip)

 

 

hmedip1 <- dba.contrast(hmedip, categories=DBA_CONDITION,minMembers=2)

hmedip2 <- dba.analyze(hmedip1)

dba.plotHeatmap(hmedip2, contrast=1, correlations=FALSE,main="Contrast Heatmap")

------------------------------------------------------------

annotation • 730 views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 14 days ago
Cambridge, UK

dba.plotHeatmap() returns the underlying matrix it plotted "invisibly", so if you assign it to a variable, you can see it. For a read score heatmap (correlations=FALSE), this is returned as a GRanges object with all the selected sites and their read scores, in the order they appear as rows in the plot.

For example:

> data(tamoxifen_analysis)
> DBsites <- dba.plotHeatmap(tamoxifen,contrast=1,correlations=FALSE)
> granges(DBsites)
GRanges object with 677 ranges and 0 metadata columns:
       seqnames               ranges strand
          <Rle>            <IRanges>  <Rle>
   106    chr18 [ 2534348,  2534848]      *
  2272    chr18 [59589912, 59590412]      *
   897    chr18 [24348927, 24349427]      *
   107    chr18 [ 2537580,  2538080]      *
  1986    chr18 [53069041, 53069541]      *
   ...      ...                  ...    ...
  2641    chr18 [71562750, 71563250]      *
  2243    chr18 [59256493, 59256993]      *
  1645    chr18 [43620150, 43620650]      *
  1186    chr18 [32306249, 32306749]      *
  1759    chr18 [46474665, 46475165]      *
  -------
  seqinfo: 1 sequence from an unspecified genome; no seqlengths

Remember that by default, at most 1,000 sites will be used (starting with site having the lowest FDR) -- you can change this with the maxSites parameter.

 

ADD COMMENT

Login before adding your answer.

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