Skip to content

Commit

Permalink
Updated mean-var and dispersion figures
Browse files Browse the repository at this point in the history
  • Loading branch information
royfrancis committed Dec 2, 2020
1 parent 4aabb10 commit 9e26620
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
Binary file added data/deseq_dispersion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 22 additions & 3 deletions slide_dge.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,42 @@ sizeFactors(d)
```

---
name: dge-dispersion
name: dge-dispersion-1

## Dispersion

- Dispersion is a measure of variability in gene expression for a given mean
- Dispersion is unreliable for low mean counts

```{r,fig.height=4,fig.width=8,echo=FALSE}
cv <- function(x) sd(x)/mean(x)
rowCv <- function(x) apply(x,1,cv)
{
par(mfrow=c(1,2))
plot(x=log10(rowMeans(cf)+1),y=log10(rowVars(as.matrix(cf))),xlab="Log10 Mean counts",ylab="Log10 Mean Variance")
plot(x=log10(rowMeans(cf)+1),y=log10(rowCv(as.matrix(cf))),xlab="Log10 Mean counts",ylab="Log10 Mean CV")
par(mfrow=c(1,1))
}
```


---
name: dge-dispersion-2

## Dispersion

- Genes with similar mean values must have similar dispersion
- Estimate likely (ML) dispersion for each gene based on counts
- Fit a curve through the gene-wise estimates
- Shrink dispersion towards the curve

```{r,fig.height=3,fig.width=3}
d <- DESeq2::estimateDispersions(d)
{par(mar=c(4,4,1,1))
plotDispEsts(d)}
```

![](data/deseq_dispersion.png)

---
name: dge-test

Expand Down

0 comments on commit 9e26620

Please sign in to comment.