Skip to content

Commit

Permalink
Make old donor column that has the same ID as before
Browse files Browse the repository at this point in the history
  • Loading branch information
alanocallaghan committed Apr 16, 2024
1 parent 91cedd2 commit 8286486
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions inst/book/segerstolpe-pancreas.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ rownames(sce.seger) <- ens.id[keep]
```

We simplify the names of some of the relevant column metadata fields for ease of access.
Some editing of the cell type labels is necessary for consistency with other data sets.
Some editing of the cell type labels is necessary for consistency with other data sets,
and old versions of these data.

```{r sample-annotation}
emtab.meta <- colData(sce.seger)[,c("cell type", "disease",
"individual", "single cell well quality")]
colnames(emtab.meta) <- c("CellType", "Disease", "Donor", "Quality")
emtab.meta$OldDonor <- gsub("(.*)_.*", "\\1", colnames(sce.seger))
colData(sce.seger) <- emtab.meta
sce.seger$CellType <- gsub(" cell", "", sce.seger$CellType)
sce.seger$CellType <- paste0(
toupper(substr(sce.seger$CellType, 1, 1)),
Expand All @@ -62,7 +65,7 @@ library(scater)
stats <- perCellQCMetrics(sce.seger)
qc <- quickPerCellQC(stats, percent_subsets="altexps_ERCC_percent",
batch=sce.seger$Donor,
subset=!sce.seger$Donor %in% c("HP1504901", "HP1509101"))
subset=!sce.seger$OldDonor %in% c("HP1504901", "HP1509101"))
sce.seger <- sce.seger[,!(qc$discard | low.qual)]
```
Expand Down

0 comments on commit 8286486

Please sign in to comment.