Skip to content

Commit

Permalink
Merge pull request #162 from rcastelo/157-provide-filtered-gene-sets-…
Browse files Browse the repository at this point in the history
…sizes

modify vignette to demonstrate use of 'geneSetSizes()' in limma example
  • Loading branch information
axelklenk authored Apr 16, 2024
2 parents 840b3d2 + a581bc0 commit 602c981
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: GSVA
Version: 1.51.13
Version: 1.51.14
Title: Gene Set Variation Analysis for Microarray and RNA-Seq Data
Authors@R: c(person("Robert", "Castelo", role=c("aut", "cre"), email="[email protected]"),
person("Justin", "Guinney", role="aut", email="[email protected]"),
Expand Down
11 changes: 5 additions & 6 deletions vignettes/GSVA.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -633,21 +633,20 @@ summary(res)
```

As Figure \@ref(fig:setsizebysigma) below shows, GSVA scores have higher
precision for larger gene sets^[Thanks to Gordon Smyth for point this out to us.].
precision for larger gene sets^[Thanks to Gordon Smyth for pointing this out to us.].

```{r setsizebysigma, height=700, width=500, fig.cap="Residual standard deviation of GSVA scores as function of gene set size."}
gssizes <- lengths(geneIds(cgpC2BroadSets)) ## fetch gene set sizes
mt <- match(rownames(leukemia_es), names(gssizes))
gssizes <- gssizes[mt] ## rearrange gene set sizes to the rows of GSVA scores
gssizes <- geneSetSizes(leukemia_es)
plot(sqrt(gssizes), sqrt(fit$sigma), xlab="Sqrt(gene sets sizes)",
ylab="Sqrt(standard deviation)", las=1, pch=".", cex=3)
```

In such a setting, we can improve the analysis of differentially expressed
pathways by using the limma-trend approach [@phipson2016robust] setting the
`trend` parameter in the call to the `eBayes()` function to the vector of gene
set sizes, in one-to-one correspondence with the gene sets in the rows of the
GSVA scores container, as calculated before in `gssizes`.
set sizes. The list of gene sets or a vector of gene set sizes can be obtained
from the GSVA scores container using function `geneSets()` or `geneSetSizes()`
and has been stored in `gssizes` before.

```{r}
fit <- eBayes(fit, trend=gssizes)
Expand Down

0 comments on commit 602c981

Please sign in to comment.