Skip to content

Commit f157feb

Browse files
committed
load and preprocess airway data set
1 parent 5dfc6de commit f157feb

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ Imports:
4141
iSEEu
4242
Suggests:
4343
airway,
44+
BiocStyle,
4445
knitr,
45-
rmarkdown,
46+
org.Hs.eg.db,
4647
pkgdown,
47-
BiocStyle,
48+
rmarkdown,
4849
scRNAseq,
4950
scater
5051
URL: https://isee.github.io/iSEEDemoEuroBioC2024/

vignettes/workshop_isee_extension.Rmd

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,42 @@ In the next 10 minutes, we will:
343343

344344
The `r BiocStyle::Biocpkg("iSEEpathways")` vignette [Integration with other panels](https://isee.github.io/iSEEpathways/articles/integration.html) can also be accessed locally using the R code `vignette("integration", package = "iSEEpathways")`.
345345

346-
In this part, we load the
346+
In this part, we load the `r BiocStyle::Biocexptpkg("airway")` package, providing a `RangedSummarizedExperiment` object for RNA-Seq in airway smooth muscle cells.
347347

348348
```{r}
349349
library(airway)
350+
data(airway)
351+
airway
350352
```
351353

354+
We quickly reorder the levels of the dexamethasone treatment, ensuring that the untreated level is first, and used as reference level during the upcoming differential expression analysis.
355+
356+
```{r}
357+
airway$dex <- relevel(airway$dex, "untrt")
358+
```
359+
360+
We also take a minute to convert rownames to more recognisable gene symbols using the annotation package `r BiocStyle::Biocannopkg("org.Hs.eg.db")`.
361+
362+
To avoid losing any information, we store a copy of the original Ensembl gene identifiers and the corresponding gene symbols in the row metadata.
363+
364+
To make sure that rownames are unique, we use the `r BiocStyle::Biocpkg("scater")` function `uniquifyFeatureNames()`.
365+
The function uses the gene symbol if unique; otherwise it combines it with the Ensembl gene identifier to make it unique.
366+
367+
```{r}
368+
library("org.Hs.eg.db")
369+
library("scater")
370+
rowData(airway)[["ENSEMBL"]] <- rownames(airway)
371+
rowData(airway)[["SYMBOL"]] <- mapIds(org.Hs.eg.db, rownames(airway), "SYMBOL", "ENSEMBL")
372+
rowData(airway)[["uniquifyFeatureNames"]] <- uniquifyFeatureNames(
373+
ID = rowData(airway)[["ENSEMBL"]],
374+
names = rowData(airway)[["SYMBOL"]]
375+
)
376+
rownames(airway) <- rowData(airway)[["uniquifyFeatureNames"]]
377+
```
378+
379+
380+
381+
352382

353383
Plan:
354384

0 commit comments

Comments
 (0)