<p>They are not referring to density of reads. It is the density of the fold change, the y variable in the plot to left of Fig2b. It tells you the distribution of the foldchange and 92% of the fold change is &lt;0.</p>
<p>See <a href="https://www.statmethods.net/graphs/density.html" rel="nofollow noreferrer">this page for more details on density and histograms</a></p>
<p>Suppose your data is something like this (purely making this up):</p>
<pre><code>set.seed(555)
fc = rnorm(1000,-0.5,2)
averATAC = -0.5*(fc - 0.5)^2 + 0.2*fc + 3  + rnorm(100,25,10)
</code></pre>
<p>You fit a density to it and you get the plot:</p>
<pre><code>par(mfrow=c(1,2))
plot(averATAC,fc)
plot(dens<span class="math-container">$y,dens$</span>x,xlab = &quot;density&quot;,ylab=&quot;fc&quot;)
</code></pre>
<p><a href="https://i.sstatic.net/VYK9s.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/VYK9s.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-02-28T19:48:39.630Z
your answers are part of my phd work I mean those example which helps me to express my solution
kcm
CC BY-SA 4.0
2021-03-05T05:30:21.070Z
how is the percentage being calculated from the density?
kcm
CC BY-SA 4.0
2021-03-08T13:12:19.690Z
I think it's an overkill, but you can do ```sum(dens$y[dens$x<0])/sum(den$y)```
StupidWolf
CC BY-SA 4.0
2021-03-09T05:53:44.513Z
"overkill" i will go for it
kcm
CC BY-SA 4.0
2021-02-28T14:44:10.033Z
2021-02-28T14:44:10.033Z
StupidWolf
<p>Just count the number of reads overlapping an ATAC-seq peak and divide it by the length of the peak gives you the read density. Each dot is a fold change, but to calculate fold change, average density from all the samples are taken, that is what the &quot;average&quot; is referring to.</p>

CC BY-SA 4.0
2021-02-26T07:23:36.137Z
my query is about the 92.3 % density what does it represent ? The fold change or the average ?
kcm
CC BY-SA 4.0
2021-02-27T15:24:51.930Z
I see, it's the proportion of fold change falls below 0 on the y axis of the plot on the left
Phoenix Mu
CC BY-SA 4.0
2021-02-28T06:22:12.733Z
so is that the negative fold change they plotted?
kcm
CC BY-SA 4.0
2021-02-28T14:45:59.413Z
it is a density plot of fold changes, not the density of the reads.
StupidWolf
CC BY-SA 4.0
2021-02-26T03:01:30.727Z
2021-02-26T03:01:30.727Z
Phoenix Mu
<p>This paper <a href="https://www.nature.com/articles/s41467-018-03856-y/figures/2" rel="nofollow noreferrer">Fig2b</a></p>
<blockquote>
<p>b Changes of chromatin accessibility in AMD (n = 14) relative to
normal (n = 11) in all retina samples. Each dot represents one
ATAC-Seq peak. Blue line in the left panel indicates average fold
changes of peaks with the same ATAC-Seq intensity. <strong>The percentage of
reduced peaks is shown under the density curve in the right panel.</strong></p>
</blockquote>
<p>How is the density calculated or what is being shown there? average ATAC seq signal or Fold change?</p>

<atac-seq>
ATAC seq density calculation
# ATAC seq density calculation

(Asked by: username_0 on 2021-02-25)

This paper [Fig2b](https://www.nature.com/articles/s41467-018-03856-y/figures/2)

> b Changes of chromatin accessibility in AMD (n = 14) relative to
> normal (n = 11) in all retina samples. Each dot represents one
> ATAC-Seq peak. Blue line in the left panel indicates average fold
> changes of peaks with the same ATAC-Seq intensity. **The percentage of
> reduced peaks is shown under the density curve in the right panel.**

How is the density calculated or what is being shown there? average ATAC seq signal or Fold change?

**Tags:** atac-seq

---

## 2 answers

### Answer by username_1 on 2021-02-28. Score: 1 | Accepted answer

They are not referring to density of reads. It is the density of the fold change, the y variable in the plot to left of Fig2b. It tells you the distribution of the foldchange and 92% of the fold change is <0.
See this page for more details on density and histograms
Suppose your data is something like this (purely making this up):
set.seed(555)
fc = rnorm(1000,-0.5,2)
averATAC = -0.5*(fc - 0.5)^2 + 0.2*fc + 3  + rnorm(100,25,10)

You fit a density to it and you get the plot:
par(mfrow=c(1,2))
plot(averATAC,fc)
plot(dens$y,dens$x,xlab = "density",ylab="fc")

> **Comments:**
> **username_0**: your answers are part of my phd work I mean those example which helps me to express my solution  
> **username_0**: how is the percentage being calculated from the density?  
> **username_1**: I think it's an overkill, but you can do ```sum(dens$y[dens$x<0])/sum(den$y)```  
> **username_0**: "overkill" i will go for it  

---

### Answer by username_2 on 2021-02-26. Score: 0

Just count the number of reads overlapping an ATAC-seq peak and divide it by the length of the peak gives you the read density. Each dot is a fold change, but to calculate fold change, average density from all the samples are taken, that is what the "average" is referring to.

> **Comments:**
> **username_0**: my query is about the 92.3 % density what does it represent ? The fold change or the average ?  
> **username_2**: I see, it's the proportion of fold change falls below 0 on the y axis of the plot on the left  
> **username_0**: so is that the negative fold change they plotted?  
> **username_1**: it is a density plot of fold changes, not the density of the reads.  

---

