...
|
...
|
@@ -93,15 +93,15 @@ We can leverage Scater's ability to use "nested" data frames to visualize TCR fe
|
93
|
93
|
library(scater)
|
94
|
94
|
sce = logNormCounts(sce)
|
95
|
95
|
sce = runPCA(sce)
|
96
|
|
-plotReducedDim(sce, dimred = 'PCA', colour_by = I(sce$pairing$pairing))
|
|
96
|
+plotReducedDim(sce, dimred = 'PCA', colour_by = I(sce$pairing$pairing), point_alpha = 1)
|
97
|
97
|
```
|
98
|
98
|
|
99
|
99
|
Here we calculate the first two principal components (which aren't very interesting because these are simulated data without any special structure), and then visualize if the TCR was paired or not.
|
100
|
100
|
|
101
|
101
|
```{r, out.height='500px', out.width = '500px'}
|
102
|
102
|
only_paired = sce[,which(sce$pairing$pairing == 'paired')]
|
103
|
|
-plotReducedDim(only_paired, dimred = 'PCA', colour_by = I(only_paired$alpha$j_gene))
|
104
|
|
-plotReducedDim(only_paired, dimred = 'PCA', colour_by = I(only_paired$beta$j_gene))
|
|
103
|
+plotReducedDim(only_paired, dimred = 'PCA', colour_by = I(only_paired$alpha$j_gene), point_alpha = 1)
|
|
104
|
+plotReducedDim(only_paired, dimred = 'PCA', colour_by = I(only_paired$beta$j_gene), point_alpha = 1)
|
105
|
105
|
```
|
106
|
106
|
|
107
|
107
|
Since the `ContigCellDB` is nested within the `SingleCellExperiment` it automatically gets subsetted appropriately when the parent object is subsetted. Enough `data.frame`-like semantics have been implemented so that fields from the `cell_tbl` can be visualized.
|