Note: some texts in this report are based on the book Orchestrating Single-Cell Analysis with Bioconductor published under CC BY 4.0


Project: Integration of 1k and 3k PBMC

  • Institute: Example institute
  • Laboratory: Example laboratory
  • People: Example person 1, Example person 2

1000 and 3000 peripheral blood mononuclear cells by 10x Genomics

  • Organism: human

Input data overview

This table is showing which data were integrated. Before integration, these data were processed by the single-sample pipeline.

The first step in integration was subsetting the input data to contain only a common set of features (“universe”):

Common features count: 8691

Then each sample was rescaled to adjust for differences in sequencing depth. The batchelor::multiBatchNorm() function recomputes log-normalized expression values after adjusting the size factors for systematic differences in coverage between SingleCellExperiment objects. (Size factors only remove biases between cells within a single batch.) This improves the quality of the correction by removing one aspect of the technical differences between batches.

Show used functions ▾

Highly variable genes (HVGs) selection

HVGs identified in individual samples are combined before integration.

6 cell cycle related genes were removed before HVG selection.

Show cell cycle-related genes ▾
ENSEMBL SYMBOL
ENSG00000132780 NASP
ENSG00000162607 USP1
ENSG00000143815 LBR
ENSG00000164104 HMGB2
ENSG00000188229 TUBB4B
ENSG00000189159 JPT1

HVG metric (common for all samples): ‘gene_var’ -> combined by scran::combineVar()

Based on “gene_var”, HVGs were selected by: top 3000 HVGs.

All HVGs

Found 3000 HVGs.

HVGs with removed CC genes

Found 3000 HVGs.

Show used functions ▾

PCA selection

  • Elbow point method: a simple heuristic for choosing PCs involves identifying the elbow point in the percentage of variance explained by successive PCs. This refers to the “elbow” in the curve of a scree plot as shown.
  • Technical variance method: use the technical component estimates to determine the proportion of variance that should be retained. This is implemented in scran::denoisePCA(), which takes the estimates returned by scran::modelGeneVar().
  • Forced: use a predefined number of PCs.
  • Corrected: Use the number of PCs calculated during the integration.

Harmony

With all HVGs

50 PCs were selected using the ‘NA’ method.

Removed cell cycle genes from HVGs

50 PCs were selected using the ‘NA’ method.

Mutual nearest neighbors (fastMNN())

With all HVGs

50 PCs were selected using the ‘corrected’ method.

Removed cell cycle genes from HVGs

50 PCs were selected using the ‘corrected’ method.

Linear regression (regressBatches())

With all HVGs

50 PCs were selected using the ‘corrected’ method.

Removed cell cycle genes from HVGs

50 PCs were selected using the ‘corrected’ method.

Rescaling (rescaleBatches())

With all HVGs

15 PCs were selected using the ‘forced’ method.

Removed cell cycle genes from HVGs

15 PCs were selected using the ‘forced’ method.

Uncorrected (multiBatchNorm())

With all HVGs

15 PCs were selected using the ‘forced’ method.

Removed cell cycle genes from HVGs

15 PCs were selected using the ‘forced’ method.

Integration dimreds

Here you can quickly check how samples overlap after integration.

Harmony

Show method details ▾

Used function: harmony::RunHarmony()

Harmony projects cells into a shared embedding in which cells group by cell type rather than dataset-specific conditions. Harmony takes PCA matrix as the input and calculates new reduced dimensions that are corrected for batch effect and subsequently used for downstream steps (UMAP, t-SNE, clustering). That is, Harmony does not calculate a corrected expression matrix.

More details in Nature Methods

With all HVGs

HARMONY

Removed cell cycle genes from HVGs

HARMONY

Mutual nearest neighbors (fastMNN())

Show method details ▾

Used function: batchelor::fastMNN()

Mutual nearest neighbors (MNN) are pairs of cells from different batches that belong in each other’s set of nearest neighbors. The reasoning is that MNN pairs represent cells from the same biological state prior to the application of a batch effect - see Haghverdi et al. (2018) for full theoretical details. Thus, the difference between cells in MNN pairs can be used as an estimate of the batch effect, the subtraction of which yields batch-corrected values.

Compared to linear regression, MNN correction does not assume that the population composition is the same or known beforehand. This is because it learns the shared population structure via identification of MNN pairs and uses this information to obtain an appropriate estimate of the batch effect. Instead, the key assumption of MNN-based approaches is that the batch effect is orthogonal to the biology in high-dimensional expression space. Violations reduce the effectiveness and accuracy of the correction, with the most common case arising from variations in the direction of the batch effect between clusters. Nonetheless, the assumption is usually reasonable as a random vector is very likely to be orthogonal in high-dimensional space.

More details in OSCA

Removed cell cycle genes from HVGs

Linear regression (regressBatches())

Show method details ▾

Used function: batchelor::regressBatches()

Batch effects in bulk RNA sequencing studies are commonly removed with linear regression. This involves fitting a linear model to each gene’s expression profile, setting the undesirable batch term to zero and recomputing the observations sans the batch effect, yielding a set of corrected expression values for downstream analyses.

To use this approach in a scRNA-seq context, we assume that the composition of cell subpopulations is the same across batches. We also assume that the batch effect is additive, i.e., any batch-induced fold-change in expression is the same across different cell subpopulations for any given gene. These are strong assumptions as batches derived from different individuals will naturally exhibit variation in cell type abundances and expression. Nonetheless, they may be acceptable when dealing with batches that are technical replicates generated from the same population of cells. (In fact, when its assumptions hold, linear regression is the most statistically efficient as it uses information from all cells to compute the common batch vector.) Linear modelling can also accommodate situations where the composition is known a priori by including the cell type as a factor in the linear model, but this situation is even less common.

More details in OSCA

Removed cell cycle genes from HVGs

Rescaling (rescaleBatches())

Show method details ▾

Used function: batchelor::rescaleBatches()

We use the rescaleBatches() function from the batchelor package to remove the batch effect. This is roughly equivalent to applying a linear regression to the log-expression values per gene, with some adjustments to improve performance and efficiency. For each gene, the mean expression in each batch is scaled down until it is equal to the lowest mean across all batches. We deliberately choose to scale all expression values down as this mitigates differences in variance when batches lie at different positions on the mean-variance trend. (Specifically, the shrinkage effect of the pseudo-count is greater for smaller counts, suppressing any differences in variance across batches.)

More details in OSCA

Removed cell cycle genes from HVGs

Uncorrected (multiBatchNorm())

Show method details ▾

Used function: batchelor::multiBatchNorm()

Data were rescaled to adjust for differences in sequencing depth between samples. These data will be used for identification of cluster markers (stage cluster_markers) and differential expression analysis (stage contrasts).

More details in OSCA

Removed cell cycle genes from HVGs


Integration diagnostics

Graph-based clustering was used for diagnostics below.

Harmony

With all HVGs

Cells’s assignment

cluster pbmc1k pbmc3k
1 19.0% (224) 12.2% (340)
2 10.6% (125) 9.2% (256)
3 0.7% (8) 0.4% (12)
4 15.7% (185) 23.1% (642)
5 9.5% (112) 6.7% (185)
6 4.6% (54) 5.6% (155)
7 15.3% (181) 12.5% (347)
8 1.9% (22) 1.1% (30)
9 2.7% (32) 5.4% (149)
10 1.6% (19) 1.2% (33)
11 14.6% (172) 19.2% (534)
12 0.7% (8) 0.1% (4)
13 1.6% (19) 2.3% (65)
14 1.7% (20) 1.0% (27)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
9 32 149 0.3766248
12 8 4 0.3745522
1 224 340 0.1873182
8 22 30 0.1679094
14 20 27 0.1648747
4 185 642 0.1490095
5 112 185 0.1151456
13 19 65 0.0916155
11 172 534 0.0753191
3 8 12 0.0564023
10 19 33 0.0514235
7 181 347 0.0406645
6 54 155 0.0339520
2 125 256 0.0181615

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.8191378 0.6748258

Removed cell cycle genes from HVGs

Cells’s assignment

cluster pbmc1k pbmc3k
1 17.4% (206) 10.8% (299)
2 2.3% (27) 1.5% (42)
3 9.6% (113) 8.9% (247)
4 15.4% (182) 21.6% (599)
5 3.1% (37) 6.2% (171)
6 4.6% (54) 5.6% (156)
7 15.3% (181) 12.5% (347)
8 10.5% (124) 7.4% (205)
9 0.7% (8) 0.5% (14)
10 1.9% (22) 1.0% (29)
11 15.2% (179) 20.6% (573)
12 1.7% (20) 2.3% (65)
13 0.7% (8) 0.1% (4)
14 1.7% (20) 1.0% (28)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
5 37 171 0.3802113
13 8 4 0.3745522
1 206 299 0.2258289
10 22 29 0.1876631
14 20 28 0.1455313
8 124 205 0.1159271
4 182 599 0.1108979
2 27 42 0.1100458
11 179 573 0.0931570
12 20 65 0.0689663
7 181 347 0.0406645
6 54 156 0.0362057
9 8 14 0.0262408
3 113 247 0.0050848

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.8206348 0.6874412

Mutual nearest neighbors (fastMNN())

With all HVGs

Cells’s assignment

cluster pbmc1k pbmc3k
1 16.2% (191) 15.4% (428)
2 15.6% (184) 12.6% (349)
3 12.1% (143) 3.2% (90)
4 1.9% (23) 1.2% (34)
5 2.1% (25) 0.6% (17)
6 14.9% (176) 19.7% (548)
7 15.6% (184) 23.2% (646)
8 0.7% (8) 0.1% (4)
9 2.6% (31) 5.9% (163)
10 0.7% (8) 0.3% (7)
11 4.1% (48) 5.9% (165)
12 7.1% (84) 5.1% (143)
13 4.7% (56) 5.7% (158)
14 1.7% (20) 1.0% (27)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
3 143 90 1.5355457
5 25 17 0.7580083
9 31 163 0.5255817
8 8 4 0.3745522
10 8 7 0.2070589
14 20 27 0.1648747
7 184 646 0.1580656
4 23 34 0.1273880
11 48 165 0.1228103
12 84 143 0.0928364
6 176 548 0.0770069
2 184 349 0.0450533
13 56 158 0.0284724
1 191 428 0.0023346

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.6802628 0.7187125

Removed cell cycle genes from HVGs

Cells’s assignment

cluster pbmc1k pbmc3k
1 15.6% (184) 12.6% (350)
2 1.9% (23) 1.2% (34)
3 10.2% (120) 2.4% (68)
4 15.9% (188) 11.3% (314)
5 2.1% (25) 0.6% (17)
6 13.5% (160) 22.8% (634)
7 0.7% (8) 0.1% (4)
8 16.7% (197) 20.2% (561)
9 4.1% (48) 5.9% (165)
10 2.5% (29) 5.3% (147)
11 7.5% (88) 5.1% (141)
12 2.4% (28) 5.5% (152)
13 4.7% (55) 5.7% (158)
14 0.7% (8) 0.3% (7)
15 1.7% (20) 1.0% (27)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
3 120 68 1.7172827
5 25 17 0.7580083
12 28 152 0.5563309
10 29 147 0.4693369
7 8 4 0.3745522
6 160 634 0.2669172
14 8 7 0.2070589
15 20 27 0.1648747
11 88 141 0.1311486
2 23 34 0.1273880
9 48 165 0.1228103
4 188 314 0.1135258
1 184 350 0.0438700
8 197 561 0.0358759
13 55 158 0.0343491

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.6730963 0.6794929

Linear regression (regressBatches())

With all HVGs

Cells’s assignment

WARNING: The following clusters have zero number of assigned cells in some samples: 2, 6, 9, 10, 15, 16, 17, 21, 23, 24, 25

cluster pbmc1k pbmc3k
1 0.1% (1) 17.8% (494)
2 17.4% (205) 0.0% (0)
3 3.9% (46) 6.4% (178)
4 0.3% (4) 2.1% (57)
5 2.3% (27) 1.1% (31)
6 4.5% (53) 0.0% (0)
7 0.4% (5) 21.2% (588)
8 0.2% (2) 21.6% (600)
9 17.2% (203) 0.0% (0)
10 8.0% (95) 0.0% (0)
11 2.5% (29) 0.1% (2)
12 0.7% (8) 0.3% (7)
13 0.4% (5) 12.5% (348)
14 0.2% (2) 5.6% (157)
15 2.5% (30) 0.0% (0)
16 6.4% (75) 0.0% (0)
17 2.2% (26) 0.0% (0)
18 0.7% (8) 0.1% (4)
19 0.3% (3) 4.5% (125)
20 0.3% (3) 0.3% (8)
21 12.9% (152) 0.0% (0)
22 0.2% (2) 0.9% (26)
23 4.3% (51) 0.0% (0)
24 0.0% (0) 4.6% (128)
25 10.7% (126) 0.0% (0)
26 1.7% (20) 0.9% (26)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
2 205 0 13.2325327
9 203 0 13.1619306
8 2 600 12.6706320
1 1 494 12.2719403
21 152 0 11.1723650
7 5 588 10.3256045
25 126 0 9.9795955
10 95 0 8.3283815
13 5 348 7.2604982
16 75 0 7.0792700
24 0 128 5.5748370
6 53 0 5.4626418
23 51 0 5.2993299
14 2 157 5.0879976
19 3 125 3.7005721
15 30 0 3.3594157
17 26 0 2.9329660
11 29 2 2.7829067
4 4 57 1.2785441
22 2 26 0.5995513
18 8 4 0.3745522
5 27 31 0.3076562
3 46 178 0.2120390
12 8 7 0.2070589
26 20 26 0.1859469
20 3 8 0.0019810

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.682578 0.7571707

Removed cell cycle genes from HVGs

Cells’s assignment

WARNING: The following clusters have zero number of assigned cells in some samples: 4, 5, 11, 12, 17, 20, 22, 24

cluster pbmc1k pbmc3k
1 0.7% (8) 23.2% (645)
2 0.4% (5) 18.0% (499)
3 4.8% (57) 6.2% (172)
4 18.7% (221) 0.0% (0)
5 9.2% (109) 0.0% (0)
6 0.3% (4) 2.1% (57)
7 2.9% (34) 0.1% (2)
8 4.5% (53) 0.0% (1)
9 0.2% (2) 19.9% (553)
10 0.7% (8) 0.3% (7)
11 15.1% (178) 0.0% (0)
12 14.6% (172) 0.0% (0)
13 0.4% (5) 12.5% (346)
14 0.2% (2) 5.6% (156)
15 1.9% (23) 1.0% (27)
16 0.7% (8) 0.1% (4)
17 2.2% (26) 0.0% (0)
18 0.1% (1) 4.6% (129)
19 0.2% (2) 0.9% (26)
20 4.3% (51) 0.0% (0)
21 10.7% (126) 0.1% (2)
22 0.0% (0) 4.6% (127)
23 1.7% (20) 0.9% (26)
24 5.6% (66) 0.0% (0)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
4 221 0 13.7806576
11 178 0 12.2356531
9 2 553 12.0989086
12 172 0 12.0001506
1 8 645 9.3569132
2 5 499 9.3034438
21 126 2 9.1394383
5 109 0 9.1105150
13 5 346 7.2300754
24 66 0 6.4540334
22 0 127 5.5408527
20 51 0 5.2993299
8 53 1 5.1393728
14 2 156 5.0610466
18 1 129 4.8847532
7 34 2 3.2564159
17 26 0 2.9329660
6 4 57 1.2785441
19 2 26 0.5995513
16 8 4 0.3745522
15 23 27 0.2678992
10 8 7 0.2070589
23 20 26 0.1859469
3 57 172 0.0539253

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.8054033 0.732235

Rescaling (rescaleBatches())

With all HVGs

Cells’s assignment

cluster pbmc1k pbmc3k
1 10.4% (123) 6.9% (192)
2 0.7% (8) 17.9% (497)
3 1.9% (22) 1.9% (53)
4 27.3% (323) 0.1% (2)
5 4.7% (56) 5.6% (156)
6 4.5% (53) 21.9% (608)
7 15.5% (183) 12.5% (346)
8 0.7% (8) 24.6% (685)
9 2.2% (26) 1.2% (33)
10 15.7% (185) 0.2% (5)
11 2.6% (31) 5.6% (155)
12 1.7% (20) 0.9% (26)
13 1.4% (17) 0.5% (15)
14 10.7% (126) 0.2% (6)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
4 323 2 15.6417269
10 185 5 10.4018585
8 8 685 9.7282735
2 8 497 7.8369010
14 126 6 7.8174078
6 53 608 2.3425682
11 31 155 0.4594092
13 17 15 0.4015521
9 26 33 0.2293598
12 20 26 0.1859469
1 123 192 0.1560397
7 183 346 0.0463707
5 56 156 0.0245889
3 22 53 0.0003581

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.6740225 0.7658615

Removed cell cycle genes from HVGs

Cells’s assignment

cluster pbmc1k pbmc3k
1 12.4% (146) 15.7% (436)
2 2.4% (28) 2.2% (60)
3 27.6% (326) 0.1% (3)
4 0.3% (4) 17.6% (489)
5 3.0% (35) 37.9% (1052)
6 4.7% (56) 5.6% (156)
7 15.5% (183) 12.5% (346)
8 2.3% (27) 1.2% (33)
9 2.6% (31) 5.6% (155)
10 1.7% (20) 0.9% (26)
11 1.4% (17) 0.5% (15)
12 15.0% (177) 0.0% (1)
13 11.1% (131) 0.3% (7)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
3 326 3 15.2295849
12 177 1 11.7113049
4 4 489 9.7820859
13 131 7 7.7518446
5 35 1052 6.0106521
9 31 155 0.4594092
11 17 15 0.4015521
8 27 33 0.2604478
10 20 26 0.1859469
1 146 436 0.0550276
7 183 346 0.0463707
6 56 156 0.0245889
2 28 60 0.0060915

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.6792661 0.6569117

Uncorrected (multiBatchNorm())

With all HVGs

Cells’s assignment

WARNING: The following clusters have zero number of assigned cells in some samples: 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22

cluster pbmc1k pbmc3k
1 0.0% (0) 17.8% (496)
2 18.5% (218) 0.0% (0)
3 10.4% (123) 0.0% (0)
4 0.0% (0) 11.7% (325)
5 0.0% (0) 25.6% (711)
6 15.4% (182) 0.0% (0)
7 17.3% (204) 0.0% (0)
8 0.0% (0) 18.1% (502)
9 3.0% (36) 0.0% (0)
10 0.1% (1) 1.8% (51)
11 4.4% (52) 0.0% (0)
12 3.7% (44) 0.0% (0)
13 0.0% (0) 12.5% (346)
14 0.0% (0) 5.8% (160)
15 6.7% (79) 0.0% (0)
16 1.6% (19) 0.0% (0)
17 0.0% (0) 1.1% (31)
18 13.4% (158) 0.0% (0)
19 1.7% (20) 0.0% (0)
20 2.4% (28) 0.0% (0)
21 0.0% (0) 4.7% (131)
22 1.4% (16) 0.0% (0)
23 0.1% (1) 0.9% (26)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
5 0 711 16.1932513
2 218 0 13.6800620
8 0 502 13.5217296
1 0 496 13.4341285
7 204 0 13.1972922
6 182 0 12.3896491
18 158 0 11.4280451
13 0 346 10.9558864
4 0 325 10.5537889
3 123 0 9.8319303
15 79 0 7.3434691
14 0 160 6.5965950
21 0 131 5.6759811
11 52 0 5.3813805
12 44 0 4.7014018
9 36 0 3.9611720
20 28 0 3.1488586
19 20 0 2.2515270
16 19 0 2.1328930
10 1 51 1.9771562
22 16 0 1.7684687
17 0 31 1.4145495
23 1 26 0.8302394

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.8069368 0.7607062

Removed cell cycle genes from HVGs

Cells’s assignment

WARNING: The following clusters have zero number of assigned cells in some samples: 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22

cluster pbmc1k pbmc3k
1 0.0% (0) 17.8% (495)
2 18.5% (218) 0.0% (0)
3 0.0% (0) 11.1% (309)
4 0.0% (0) 24.6% (684)
5 15.4% (182) 0.0% (0)
6 17.2% (203) 0.0% (0)
7 0.0% (0) 19.6% (545)
8 9.7% (115) 0.0% (0)
9 0.1% (1) 1.9% (52)
10 3.0% (35) 0.0% (0)
11 4.3% (51) 0.0% (0)
12 4.4% (52) 0.0% (0)
13 2.5% (30) 0.0% (0)
14 0.0% (0) 12.5% (346)
15 1.6% (19) 0.0% (0)
16 0.0% (0) 5.8% (160)
17 6.6% (78) 0.0% (0)
18 13.5% (159) 0.0% (0)
19 0.0% (0) 1.1% (31)
20 1.8% (21) 0.0% (0)
21 0.0% (0) 4.7% (131)
22 1.4% (16) 0.0% (0)
23 0.1% (1) 0.9% (26)
Total 100.0% (1181) 100.0% (2779)

Cells’s assignment (plots)

Variance in cluster assignment

The variation in the log-abundances to rank the clusters with the greatest variability in their proportional abundances across batches. We can then focus on batch-specific clusters that may be indicative of incomplete batch correction. Obviously, though, this diagnostic is subject to interpretation as the same outcome can be caused by batch-specific populations; some prior knowledge about the biological context is necessary to distinguish between these two possibilities.

cluster pbmc1k pbmc3k var
4 0 684 15.8831655
7 0 545 14.1288766
2 218 0 13.6800620
1 0 495 13.4194561
6 203 0 13.1619306
5 182 0 12.3896491
18 159 0 11.4700212
14 0 346 10.9558864
3 0 309 10.2357979
8 115 0 9.4265038
17 78 0 7.2781558
16 0 160 6.5965950
21 0 131 5.6759811
12 52 0 5.3813805
11 51 0 5.2993299
10 35 0 3.8638409
13 30 0 3.3594157
20 21 0 2.3687080
15 19 0 2.1328930
9 1 52 2.0211752
22 16 0 1.7684687
19 0 31 1.4145495
23 1 26 0.8302394

Rand indices

Rand index is used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

pbmc1k pbmc3k
0.8030236 0.754878


Integration Rand indices

Rand indices are used to evaluate biological heterogeneity preservation by summarizing the agreement between clusterings. This provides a simple metric that we can use to assess the preservation of variation by different correction methods. Larger Rand indices (i.e., closer to 1) are more desirable, though this must be balanced against the ability of each method to actually remove the batch effect.

Show used functions ▾

Show input parameters

Main config

## $PROJECT_NAME
## [1] "Integration of 1k and 3k PBMC"
## 
## $PROJECT_DESCRIPTION
## [1] "1000 and 3000 peripheral blood mononuclear cells by 10x Genomics"
## 
## $INSTITUTE
## [1] "Example institute"
## 
## $LABORATORY
## [1] "Example laboratory"
## 
## $PEOPLE
## [1] "Example person 1, Example person 2"
## 
## $ORGANISM
## [1] "human"
## 
## $ANNOTATION_LIST
## $ANNOTATION_LIST$human
## [1] "org.Hs.eg.db"
## 
## $ANNOTATION_LIST$mouse
## [1] "org.Mm.eg.db"
## 
## 
## $ENSEMBL_SPECIES
## [1] "Homo_sapiens"
## 
## $CSS_FILE
## [1] "/home/rstudio/shared/scdrake_run_tests_20231202_01-1.5.1-bioc3.15-docker/pipeline_outputs/example_data/integration/Rmd/common/stylesheet.css"
## 
## $BASE_OUT_DIR
## [1] "/home/rstudio/shared/scdrake_run_tests_20231202_01-1.5.1-bioc3.15-docker/pipeline_outputs/example_data/integration/output/integration"
## 
## $ANNOTATION_DB_FILE
## [1] "/usr/local/lib/R/site-library/org.Hs.eg.db/extdata/org.Hs.eg.sqlite"
## 
## $ANNOTATION_PKG
## [1] "org.Hs.eg.db"
## 
## attr(,"class")
## [1] "scdrake_list" "list"

Integration config

## $INTEGRATION_SOURCES
## $pbmc1k
## $pbmc1k$path
## [1] "../pbmc1k/.drake"
## 
## $pbmc1k$path_type
## [1] "drake_cache"
## 
## $pbmc1k$description
## [1] "10x Genomics PBMC 1k dataset"
## 
## $pbmc1k$hvg_rm_cc_genes
## [1] TRUE
## 
## $pbmc1k$hvg_cc_genes_var_expl_threshold
## [1] 5
## 
## $pbmc1k$name
## [1] "pbmc1k"
## 
## 
## $pbmc3k
## $pbmc3k$path
## [1] "../pbmc3k/sce_final_norm_clustering.Rds"
## 
## $pbmc3k$path_type
## [1] "sce"
## 
## $pbmc3k$description
## [1] "10x Genomics PBMC 3k dataset"
## 
## $pbmc3k$hvg_rm_cc_genes
## [1] FALSE
## 
## $pbmc3k$hvg_cc_genes_var_expl_threshold
## NULL
## 
## $pbmc3k$name
## [1] "pbmc3k"
## 
## 
## attr(,"class")
## [1] "scdrake_list" "list"        
## 
## $HVG_COMBINATION_INT
## [1] "hvg_metric"
## 
## $HVG_SELECTION_INT
## [1] "top"
## 
## $HVG_SELECTION_VALUE_INT
## [1] 3000
## 
## $INTEGRATION_METHODS
## $uncorrected
## $uncorrected$pca_selection_method
## [1] "forced"
## 
## $uncorrected$pca_forced_pcs
## [1] 15
## 
## $uncorrected$tsne_perp
## [1] 20
## 
## $uncorrected$tsne_max_iter
## [1] 1000
## 
## $uncorrected$name
## [1] "uncorrected"
## 
## 
## $rescaling
## $rescaling$pca_selection_method
## [1] "forced"
## 
## $rescaling$pca_forced_pcs
## [1] 15
## 
## $rescaling$tsne_perp
## [1] 20
## 
## $rescaling$tsne_max_iter
## [1] 1000
## 
## $rescaling$integration_params
## $rescaling$integration_params$log.base
## [1] 2
## 
## $rescaling$integration_params$pseudo.count
## [1] 1
## 
## 
## $rescaling$name
## [1] "rescaling"
## 
## 
## $regression
## $regression$pca_selection_method
## [1] "corrected"
## 
## $regression$pca_forced_pcs
## [1] 15
## 
## $regression$tsne_perp
## [1] 20
## 
## $regression$tsne_max_iter
## [1] 1000
## 
## $regression$integration_params
## $regression$integration_params$d
## [1] 50
## 
## 
## $regression$name
## [1] "regression"
## 
## 
## $mnn
## $mnn$pca_selection_method
## [1] "corrected"
## 
## $mnn$pca_forced_pcs
## [1] 15
## 
## $mnn$tsne_perp
## [1] 20
## 
## $mnn$tsne_max_iter
## [1] 1000
## 
## $mnn$integration_params
## $mnn$integration_params$k
## [1] 20
## 
## $mnn$integration_params$prop.k
## NULL
## 
## $mnn$integration_params$cos.norm
## [1] TRUE
## 
## $mnn$integration_params$ndist
## [1] 3
## 
## $mnn$integration_params$d
## [1] 50
## 
## $mnn$integration_params$merge.order
## NULL
## 
## $mnn$integration_params$auto.merge
## [1] TRUE
## 
## 
## $mnn$name
## [1] "mnn"
## 
## 
## $harmony
## $harmony$pca_selection_method
## NULL
## 
## $harmony$pca_forced_pcs
## NULL
## 
## $harmony$tsne_perp
## [1] 20
## 
## $harmony$tsne_max_iter
## [1] 1000
## 
## $harmony$integration_params
## $harmony$integration_params$dims.use
## [1] 50
## 
## $harmony$integration_params$theta
## NULL
## 
## $harmony$integration_params$lambda
## NULL
## 
## $harmony$integration_params$sigma
## [1] 0.1
## 
## $harmony$integration_params$nclust
## NULL
## 
## $harmony$integration_params$tau
## [1] 0
## 
## $harmony$integration_params$block.size
## [1] 0.05
## 
## $harmony$integration_params$max.iter.harmony
## [1] 10
## 
## $harmony$integration_params$max.iter.cluster
## [1] 20
## 
## $harmony$integration_params$epsilon.cluster
## [1] 1e-05
## 
## $harmony$integration_params$epsilon.harmony
## [1] 1e-04
## 
## 
## $harmony$name
## [1] "harmony"
## 
## 
## attr(,"class")
## [1] "scdrake_list" "list"        
## 
## $INTEGRATION_SNN_K
## [1] 10
## 
## $INTEGRATION_SNN_TYPE
## [1] "rank"
## 
## $INTEGRATION_SNN_CLUSTERING_METHOD
## [1] "walktrap"
## 
## $SELECTED_MARKERS_FILE
## [1] "/home/rstudio/shared/scdrake_run_tests_20231202_01-1.5.1-bioc3.15-docker/pipeline_outputs/example_data/integration/selected_markers.csv"
## 
## $INTEGRATION_REPORT_RMD_FILE
## [1] "/home/rstudio/shared/scdrake_run_tests_20231202_01-1.5.1-bioc3.15-docker/pipeline_outputs/example_data/integration/Rmd/integration/01_integration.Rmd"
## 
## $INTEGRATION_BASE_OUT_DIR
## [1] "/home/rstudio/shared/scdrake_run_tests_20231202_01-1.5.1-bioc3.15-docker/pipeline_outputs/example_data/integration/output/integration/01_integration"
## 
## $INTEGRATION_SELECTED_MARKERS_OUT_DIR
## [1] "/home/rstudio/shared/scdrake_run_tests_20231202_01-1.5.1-bioc3.15-docker/pipeline_outputs/example_data/integration/output/integration/01_integration/selected_markers"
## 
## $INTEGRATION_REPORT_HTML_FILE
## [1] "/home/rstudio/shared/scdrake_run_tests_20231202_01-1.5.1-bioc3.15-docker/pipeline_outputs/example_data/integration/output/integration/01_integration/01_integration.html"
## 
## $INTEGRATION_KNITR_MESSAGE
## [1] FALSE
## 
## $INTEGRATION_KNITR_WARNING
## [1] FALSE
## 
## $INTEGRATION_KNITR_ECHO
## [1] FALSE
## 
## attr(,"class")
## [1] "scdrake_list" "list"

Show runtime info

drake cache directory

/home/rstudio/shared/scdrake_run_tests_20231202_01-1.5.1-bioc3.15-docker/pipeline_outputs/example_data/integration/.drake

Traceback and warnings

## No traceback available

Bioconductor version

3.15

External libs

##                                                      zlib 
##                                                  "1.2.11" 
##                                                     bzlib 
##                                      "1.0.8, 13-Jul-2019" 
##                                                        xz 
##                                                   "5.2.4" 
##                                                      PCRE 
##                                        "10.34 2019-11-21" 
##                                                       ICU 
##                                                    "66.1" 
##                                                       TRE 
##                                 "TRE 0.8.0 R_fixes (BSD)" 
##                                                     iconv 
##                                              "glibc 2.31" 
##                                                  readline 
##                                                     "8.0" 
##                                                      BLAS 
## "/usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3"

Session info (pretty)

## ─ Session info ───────────────────────────────────────────────────────────────
##  setting  value
##  version  R version 4.2.1 (2022-06-23)
##  os       Ubuntu 20.04.4 LTS
##  system   x86_64, linux-gnu
##  ui       X11
##  language en
##  collate  C
##  ctype    en_US.UTF-8
##  tz       Etc/UTC
##  date     2023-12-02
##  pandoc   2.18 @ /usr/local/bin/ (via rmarkdown)
## 
## ─ Packages ───────────────────────────────────────────────────────────────────
##  !  package                * version    date (UTC) lib source
##     abind                    1.4-5      2016-07-21 [1] RSPM (R 4.2.0)
##     AnnotationDbi          * 1.58.0     2022-04-26 [1] Bioconductor
##     AnnotationFilter       * 1.20.0     2022-04-26 [1] Bioconductor
##     AnnotationHub            3.4.0      2022-04-26 [1] Bioconductor
##     argparser                0.7.1      2021-03-08 [1] RSPM (R 4.2.0)
##     assertthat               0.2.1      2019-03-21 [1] CRAN (R 4.2.0)
##     backports                1.4.1      2021-12-13 [1] RSPM (R 4.2.0)
##     base64url                1.4        2018-05-14 [1] RSPM (R 4.2.0)
##     batchelor                1.12.3     2022-06-23 [1] Bioconductor
##     beachmat                 2.12.0     2022-04-26 [1] Bioconductor
##     beeswarm                 0.4.0      2021-06-01 [1] RSPM (R 4.2.0)
##     Biobase                * 2.56.0     2022-04-26 [1] Bioconductor
##     BiocFileCache            2.4.0      2022-04-26 [1] Bioconductor
##     BiocGenerics           * 0.42.0     2022-04-26 [1] Bioconductor
##     BiocIO                   1.6.0      2022-04-26 [1] Bioconductor
##     BiocManager              1.30.19    2022-10-25 [1] RSPM (R 4.2.0)
##     BiocNeighbors            1.14.0     2022-04-26 [1] Bioconductor
##     BiocParallel             1.30.4     2022-10-11 [1] Bioconductor
##     BiocSingular             1.12.0     2022-04-26 [1] Bioconductor
##     BiocVersion              3.15.2     2022-03-29 [1] Bioconductor
##     biomaRt                  2.52.0     2022-04-26 [1] Bioconductor
##     Biostrings               2.64.1     2022-08-18 [1] Bioconductor
##     bit                      4.0.5      2022-11-15 [1] RSPM (R 4.2.0)
##     bit64                    4.0.5      2020-08-30 [1] CRAN (R 4.2.0)
##     bitops                   1.0-7      2021-04-24 [1] CRAN (R 4.2.0)
##     blob                     1.2.3      2022-04-10 [1] CRAN (R 4.2.0)
##     bluster                  1.6.0      2022-04-26 [1] Bioconductor
##     brio                     1.1.3      2021-11-30 [1] CRAN (R 4.2.0)
##     bslib                    0.4.1      2022-11-02 [1] RSPM (R 4.2.0)
##     cachem                   1.0.6      2021-08-19 [1] CRAN (R 4.2.0)
##     callr                    3.7.3      2022-11-02 [1] RSPM (R 4.2.0)
##     celldex                * 1.6.0      2022-04-28 [1] Bioconductor
##     class                    7.3-20     2022-01-16 [2] CRAN (R 4.2.1)
##     cli                    * 3.4.1      2022-09-23 [1] RSPM (R 4.2.0)
##     cluster                  2.1.3      2022-03-28 [2] CRAN (R 4.2.1)
##     clustermq                0.8.8      2019-06-05 [1] RSPM (R 4.2.1)
##     clustree                 0.5.0      2022-06-25 [1] RSPM (R 4.2.0)
##     codetools                0.2-18     2020-11-04 [2] CRAN (R 4.2.1)
##     colorspace               2.0-3      2022-02-21 [1] CRAN (R 4.2.0)
##     conflicted             * 1.1.0      2021-11-26 [1] RSPM (R 4.2.0)
##     cowplot                  1.1.1      2020-12-30 [1] RSPM (R 4.2.0)
##     crayon                   1.5.2      2022-09-29 [1] RSPM (R 4.2.0)
##     curl                     4.3.3      2022-10-06 [1] RSPM (R 4.2.0)
##     data.table               1.14.6     2022-11-16 [1] RSPM (R 4.2.0)
##     DBI                      1.1.3      2022-06-18 [1] RSPM (R 4.2.0)
##     dbplyr                   2.2.1      2022-06-27 [1] RSPM (R 4.2.0)
##     DelayedArray           * 0.22.0     2022-04-26 [1] Bioconductor
##     DelayedMatrixStats       1.18.2     2022-10-13 [1] Bioconductor
##     deldir                   1.0-6      2021-10-23 [1] RSPM (R 4.2.0)
##     DEoptimR                 1.0-11     2022-04-03 [1] CRAN (R 4.2.0)
##     desc                     1.4.2      2022-09-08 [1] RSPM (R 4.2.0)
##     devtools                 2.4.4      2022-07-20 [1] RSPM (R 4.2.0)
##     digest                   0.6.30     2022-10-18 [1] RSPM (R 4.2.0)
##     downlit                  0.4.2      2022-07-05 [1] RSPM (R 4.2.0)
##     dplyr                    1.0.10     2022-09-01 [1] RSPM (R 4.2.0)
##     dqrng                    0.3.0      2021-05-01 [1] RSPM (R 4.2.0)
##     drake                  * 7.13.4     2022-08-19 [1] RSPM (R 4.2.0)
##     DropletUtils             1.16.0     2022-04-26 [1] Bioconductor
##     DT                       0.26       2022-10-19 [1] RSPM (R 4.2.0)
##     e1071                    1.7-12     2022-10-24 [1] RSPM (R 4.2.0)
##     edgeR                    3.38.4     2022-08-07 [1] Bioconductor
##     ellipsis                 0.3.2      2021-04-29 [1] CRAN (R 4.2.0)
##     ensembldb              * 2.20.2     2022-06-16 [1] Bioconductor
##     evaluate                 0.18       2022-11-07 [1] RSPM (R 4.2.0)
##     ExperimentHub            2.4.0      2022-04-26 [1] Bioconductor
##     fansi                    1.0.3      2022-03-24 [1] CRAN (R 4.2.0)
##     farver                   2.1.1      2022-07-06 [1] RSPM (R 4.2.0)
##     fastmap                  1.1.0      2021-01-25 [1] CRAN (R 4.2.0)
##     filelock                 1.0.2      2018-10-05 [1] CRAN (R 4.2.0)
##     fitdistrplus             1.1-8      2022-03-10 [1] RSPM (R 4.2.0)
##     fs                       1.5.2      2021-12-08 [1] CRAN (R 4.2.0)
##     future                   1.29.0     2022-11-06 [1] RSPM (R 4.2.0)
##     future.apply             1.10.0     2022-11-05 [1] RSPM (R 4.2.0)
##     generics                 0.1.3      2022-07-05 [1] RSPM (R 4.2.0)
##     GenomeInfoDb           * 1.32.4     2022-09-06 [1] Bioconductor
##     GenomeInfoDbData         1.2.8      2022-05-02 [1] Bioconductor
##     GenomicAlignments        1.32.1     2022-07-24 [1] Bioconductor
##     GenomicFeatures        * 1.48.4     2022-09-20 [1] Bioconductor
##     GenomicRanges          * 1.48.0     2022-04-26 [1] Bioconductor
##     ggbeeswarm               0.6.0      2017-08-07 [1] RSPM (R 4.2.0)
##     ggforce                  0.4.1      2022-10-04 [1] RSPM (R 4.2.0)
##     ggplot2                  3.4.0      2022-11-04 [1] RSPM (R 4.2.0)
##     ggplotify                0.1.0      2021-09-02 [1] RSPM (R 4.2.0)
##     ggraph                   2.1.0      2022-10-09 [1] RSPM (R 4.2.0)
##     ggrepel                  0.9.2      2022-11-06 [1] RSPM (R 4.2.0)
##     ggridges                 0.5.4      2022-09-26 [1] RSPM (R 4.2.0)
##     glmGamPoi                1.8.0      2022-04-26 [1] Bioconductor
##     globals                  0.16.2     2022-11-21 [1] RSPM (R 4.2.0)
##     glue                     1.6.2      2022-02-24 [1] CRAN (R 4.2.0)
##     goftest                  1.2-3      2021-10-07 [1] RSPM (R 4.2.0)
##     graphlayouts             0.8.4      2022-11-24 [1] RSPM (R 4.2.0)
##     gridExtra                2.3        2017-09-09 [1] CRAN (R 4.2.0)
##     gridGraphics             0.5-1      2020-12-13 [1] RSPM (R 4.2.0)
##     gtable                   0.3.1      2022-09-01 [1] RSPM (R 4.2.0)
##     harmony                  0.1.1      2022-11-14 [1] RSPM (R 4.2.0)
##     HDF5Array              * 1.24.2     2022-08-02 [1] Bioconductor
##     here                   * 1.0.1      2020-12-13 [1] RSPM (R 4.2.0)
##     highr                    0.9        2021-04-16 [1] CRAN (R 4.2.0)
##     hms                      1.1.2      2022-08-19 [1] RSPM (R 4.2.0)
##     htmltools                0.5.3      2022-07-18 [1] RSPM (R 4.2.0)
##     htmlwidgets              1.5.4      2021-09-08 [1] CRAN (R 4.2.0)
##     httpuv                   1.6.6      2022-09-08 [1] RSPM (R 4.2.0)
##     httr                     1.4.4      2022-08-17 [1] RSPM (R 4.2.0)
##     ica                      1.0-3      2022-07-08 [1] RSPM (R 4.2.0)
##     igraph                   1.3.5      2022-09-22 [1] RSPM (R 4.2.0)
##     interactiveDisplayBase   1.34.0     2022-04-26 [1] Bioconductor
##     IRanges                * 2.30.1     2022-08-18 [1] Bioconductor
##     irlba                    2.3.5.1    2022-10-03 [1] RSPM (R 4.2.0)
##     janitor                  2.1.0      2021-01-05 [1] RSPM (R 4.2.0)
##     jquerylib                0.1.4      2021-04-26 [1] CRAN (R 4.2.0)
##     jsonlite                 1.8.4      2022-12-06 [1] RSPM (R 4.2.0)
##     kableExtra               1.3.4      2021-02-20 [1] RSPM (R 4.2.0)
##     KEGGREST                 1.36.3     2022-07-12 [1] Bioconductor
##     KernSmooth               2.23-20    2021-05-03 [2] CRAN (R 4.2.1)
##     knitr                    1.41       2022-11-18 [1] RSPM (R 4.2.0)
##     labeling                 0.4.2      2020-10-20 [1] CRAN (R 4.2.0)
##     later                    1.3.0      2021-08-18 [1] CRAN (R 4.2.0)
##     lattice                  0.20-45    2021-09-22 [2] CRAN (R 4.2.1)
##     lazyeval                 0.2.2      2019-03-15 [1] CRAN (R 4.2.0)
##     leiden                   0.4.3      2022-09-10 [1] RSPM (R 4.2.0)
##     lifecycle                1.0.3      2022-10-07 [1] RSPM (R 4.2.0)
##     limma                    3.52.4     2022-09-27 [1] Bioconductor
##     listenv                  0.8.0      2019-12-05 [1] RSPM (R 4.2.0)
##     littler                  0.3.17     2023-05-26 [1] Github (eddelbuettel/littler@31aa160)
##     lmtest                   0.9-40     2022-03-21 [1] RSPM (R 4.2.0)
##     locfit                   1.5-9.6    2022-07-11 [1] RSPM (R 4.2.0)
##     lubridate                1.9.0      2022-11-06 [1] RSPM (R 4.2.0)
##     magrittr               * 2.0.3      2022-03-30 [1] CRAN (R 4.2.0)
##     MASS                     7.3-58.1   2022-08-03 [2] RSPM (R 4.2.0)
##     Matrix                 * 1.5-3      2022-11-11 [1] RSPM (R 4.2.0)
##     MatrixGenerics         * 1.8.1      2022-06-26 [1] Bioconductor
##     matrixStats            * 0.63.0     2022-11-18 [1] RSPM (R 4.2.0)
##     memoise                  2.0.1      2021-11-26 [1] CRAN (R 4.2.0)
##     metapod                  1.4.0      2022-04-26 [1] Bioconductor
##     mime                     0.12       2021-09-28 [1] CRAN (R 4.2.0)
##     miniUI                   0.1.1.1    2018-05-18 [1] RSPM (R 4.2.0)
##     munsell                  0.5.0      2018-06-12 [1] CRAN (R 4.2.0)
##     mvtnorm                  1.1-3      2021-10-08 [1] CRAN (R 4.2.0)
##     nlme                     3.1-158    2022-06-15 [2] RSPM (R 4.2.0)
##     org.Hs.eg.db             3.15.0     2022-04-11 [1] Bioconductor
##     parallelly               1.32.1     2022-07-21 [1] RSPM (R 4.2.0)
##     patchwork                1.1.2      2022-08-19 [1] RSPM (R 4.2.0)
##     pbapply                  1.6-0      2022-11-16 [1] RSPM (R 4.2.0)
##     pcaPP                    2.0-3      2022-10-24 [1] RSPM (R 4.2.0)
##     PCAtools                 2.8.0      2022-04-26 [1] Bioconductor
##     pheatmap                 1.0.12     2019-01-04 [1] RSPM (R 4.2.0)
##     pillar                   1.8.1      2022-08-19 [1] RSPM (R 4.2.0)
##     pkgbuild                 1.3.1      2021-12-20 [1] RSPM (R 4.2.0)
##     pkgconfig                2.0.3      2019-09-22 [1] CRAN (R 4.2.0)
##     pkgload                  1.3.2      2022-11-16 [1] RSPM (R 4.2.0)
##     plotly                   4.10.1     2022-11-07 [1] RSPM (R 4.2.0)
##     plyr                     1.8.8      2022-11-11 [1] RSPM (R 4.2.0)
##     png                      0.1-8      2022-11-29 [1] RSPM (R 4.2.0)
##     polyclip                 1.10-4     2022-10-20 [1] RSPM (R 4.2.0)
##     prettyunits              1.1.1      2020-01-24 [1] CRAN (R 4.2.0)
##     processx                 3.8.0      2022-10-26 [1] RSPM (R 4.2.0)
##     profvis                  0.3.7      2020-11-02 [1] RSPM (R 4.2.0)
##     progress                 1.2.2      2019-05-16 [1] CRAN (R 4.2.0)
##     progressr                0.11.0     2022-09-02 [1] RSPM (R 4.2.0)
##     promises                 1.2.0.1    2021-02-11 [1] CRAN (R 4.2.0)
##     ProtGenerics             1.28.0     2022-04-26 [1] Bioconductor
##     proxy                    0.4-27     2022-06-09 [1] RSPM (R 4.2.0)
##     ps                       1.7.2      2022-10-26 [1] RSPM (R 4.2.0)
##     purrr                    0.3.5      2022-10-06 [1] RSPM (R 4.2.0)
##     qs                       0.25.4     2022-08-09 [1] RSPM (R 4.2.0)
##     R.methodsS3              1.8.2      2022-06-13 [1] RSPM (R 4.2.0)
##     R.oo                     1.25.0     2022-06-12 [1] RSPM (R 4.2.0)
##     R.utils                  2.12.2     2022-11-11 [1] RSPM (R 4.2.0)
##     R6                       2.5.1      2021-08-19 [1] CRAN (R 4.2.0)
##     RANN                     2.6.1      2019-01-08 [1] RSPM (R 4.2.0)
##     RApiSerialize            0.1.2      2022-08-25 [1] RSPM (R 4.2.0)
##     rappdirs                 0.3.3      2021-01-31 [1] CRAN (R 4.2.0)
##     RColorBrewer             1.1-3      2022-04-03 [1] CRAN (R 4.2.0)
##     Rcpp                     1.0.9      2022-07-08 [1] RSPM (R 4.2.0)
##     RcppAnnoy                0.0.20     2022-10-27 [1] RSPM (R 4.2.0)
##     RcppParallel             5.1.5      2022-01-05 [1] RSPM (R 4.2.0)
##     RCurl                    1.98-1.9   2022-10-03 [1] RSPM (R 4.2.0)
##     readr                    2.1.3      2022-10-01 [1] RSPM (R 4.2.0)
##     remotes                  2.4.2      2021-11-30 [1] RSPM (R 4.2.0)
##     reshape2                 1.4.4      2020-04-09 [1] CRAN (R 4.2.0)
##     ResidualMatrix           1.6.1      2022-08-16 [1] Bioconductor
##     restfulr                 0.0.15     2022-06-16 [1] RSPM (R 4.2.0)
##     reticulate               1.26       2022-08-31 [1] RSPM (R 4.2.0)
##     rhdf5                  * 2.40.0     2022-04-26 [1] Bioconductor
##     rhdf5filters             1.8.0      2022-04-26 [1] Bioconductor
##     Rhdf5lib                 1.18.2     2022-05-15 [1] Bioconductor
##     RhpcBLASctl              0.21-247.1 2021-11-05 [1] RSPM (R 4.2.0)
##     rjson                    0.2.21     2022-01-09 [1] CRAN (R 4.2.0)
##     rlang                  * 1.0.6      2022-09-24 [1] RSPM (R 4.2.0)
##     rmarkdown                2.18       2022-11-09 [1] RSPM (R 4.2.0)
##     robustbase               0.95-0     2022-04-02 [1] CRAN (R 4.2.0)
##     ROCR                     1.0-11     2020-05-02 [1] CRAN (R 4.2.0)
##     rprojroot                2.0.3      2022-04-02 [1] CRAN (R 4.2.0)
##     rrcov                    1.7-2      2022-10-24 [1] RSPM (R 4.2.0)
##     Rsamtools                2.12.0     2022-04-26 [1] Bioconductor
##     RSQLite                  2.2.19     2022-11-24 [1] RSPM (R 4.2.0)
##     rstudioapi               0.14       2022-08-22 [1] RSPM (R 4.2.0)
##     rsvd                     1.0.5      2021-04-16 [1] RSPM (R 4.2.0)
##     rtracklayer              1.56.1     2022-06-23 [1] Bioconductor
##     Rtsne                    0.16       2022-04-17 [1] RSPM (R 4.2.0)
##     rvest                    1.0.3      2022-08-19 [1] RSPM (R 4.2.0)
##     rzmq                     0.9.8      2021-05-04 [1] RSPM (R 4.2.0)
##     S4Vectors              * 0.34.0     2022-04-26 [1] Bioconductor
##     sass                     0.4.4      2022-11-24 [1] RSPM (R 4.2.0)
##     SC3                      1.15.1     2023-05-26 [1] Github (gorgitko/SC3@58d73fb)
##     ScaledMatrix             1.4.1      2022-09-11 [1] Bioconductor
##     scales                   1.2.1      2022-08-20 [1] RSPM (R 4.2.0)
##     scater                   1.24.0     2022-04-26 [1] Bioconductor
##     scattermore              0.8        2022-02-14 [1] RSPM (R 4.2.0)
##     scDblFinder              1.10.0     2022-04-26 [1] Bioconductor
##  VP scdrake                * 1.5.1      2023-06-15 [?] Bioconductor (on disk 1.5.0)
##     scran                    1.24.1     2022-09-11 [1] Bioconductor
##     sctransform              0.3.5      2022-09-21 [1] RSPM (R 4.2.0)
##     scuttle                  1.6.3      2022-08-23 [1] Bioconductor
##     sessioninfo              1.2.2      2021-12-06 [1] RSPM (R 4.2.0)
##     Seurat                   4.3.0      2022-11-18 [1] RSPM (R 4.2.0)
##     SeuratObject             4.1.3      2022-11-07 [1] RSPM (R 4.2.0)
##     shiny                    1.7.3      2022-10-25 [1] RSPM (R 4.2.0)
##     SingleCellExperiment     1.18.1     2022-10-02 [1] Bioconductor
##     SingleR                  1.10.0     2022-04-26 [1] Bioconductor
##     snakecase                0.11.0     2019-05-25 [1] RSPM (R 4.2.0)
##     sp                       1.5-1      2022-11-07 [1] RSPM (R 4.2.0)
##     sparseMatrixStats        1.8.0      2022-04-26 [1] Bioconductor
##     spatstat.data            3.0-0      2022-10-21 [1] RSPM (R 4.2.0)
##     spatstat.explore         3.0-5      2022-11-10 [1] RSPM (R 4.2.0)
##     spatstat.geom            3.0-3      2022-10-25 [1] RSPM (R 4.2.0)
##     spatstat.random          3.0-1      2022-11-03 [1] RSPM (R 4.2.0)
##     spatstat.sparse          3.0-0      2022-10-21 [1] RSPM (R 4.2.0)
##     spatstat.utils           3.0-1      2022-10-19 [1] RSPM (R 4.2.0)
##     statmod                  1.4.37     2022-08-12 [1] RSPM (R 4.2.0)
##     storr                    1.2.5      2020-12-01 [1] RSPM (R 4.2.0)
##     stringfish               0.15.7     2022-04-13 [1] RSPM (R 4.2.0)
##     stringi                  1.7.8      2022-07-11 [1] RSPM (R 4.2.0)
##     stringr                  1.5.0      2022-12-02 [1] RSPM (R 4.2.0)
##     SummarizedExperiment   * 1.26.1     2022-04-29 [1] Bioconductor
##     survival                 3.3-1      2022-03-03 [2] CRAN (R 4.2.1)
##     svglite                  2.1.0      2022-02-03 [1] RSPM (R 4.2.0)
##     systemfonts              1.0.4      2022-02-11 [1] RSPM (R 4.2.0)
##     tensor                   1.5        2012-05-05 [1] RSPM (R 4.2.0)
##     testthat               * 3.1.5      2022-10-08 [1] RSPM (R 4.2.0)
##     tibble                   3.1.8      2022-07-22 [1] RSPM (R 4.2.0)
##     tidygraph                1.2.3      2023-02-01 [1] RSPM (R 4.2.0)
##     tidyr                    1.2.1      2022-09-08 [1] RSPM (R 4.2.0)
##     tidyselect               1.1.2      2022-02-21 [1] RSPM (R 4.2.0)
##     timechange               0.1.1      2022-11-04 [1] RSPM (R 4.2.0)
##     tweenr                   2.0.2      2022-09-06 [1] RSPM (R 4.2.0)
##     txtq                     0.2.4      2021-03-27 [1] RSPM (R 4.2.0)
##     tzdb                     0.3.0      2022-03-28 [1] CRAN (R 4.2.0)
##     urlchecker               1.0.1      2021-11-30 [1] RSPM (R 4.2.0)
##     usethis                  2.1.6      2022-05-25 [1] RSPM (R 4.2.0)
##     utf8                     1.2.2      2021-07-24 [1] CRAN (R 4.2.0)
##     uwot                     0.1.14     2022-08-22 [1] RSPM (R 4.2.0)
##     vctrs                    0.5.1      2022-11-16 [1] RSPM (R 4.2.0)
##     vipor                    0.4.5      2017-03-22 [1] RSPM (R 4.2.0)
##     viridis                  0.6.2      2021-10-13 [1] CRAN (R 4.2.0)
##     viridisLite              0.4.1      2022-08-22 [1] RSPM (R 4.2.0)
##     webshot                  0.5.4      2022-09-26 [1] RSPM (R 4.2.0)
##     withr                    2.5.0      2022-03-03 [1] CRAN (R 4.2.0)
##     WriteXLS                 6.4.0      2022-02-24 [1] RSPM (R 4.2.0)
##     xfun                     0.35       2022-11-16 [1] RSPM (R 4.2.0)
##     xgboost                  1.6.0.1    2022-04-16 [1] RSPM (R 4.2.0)
##     XML                      3.99-0.13  2022-12-04 [1] RSPM (R 4.2.0)
##     xml2                     1.3.3      2021-11-30 [1] CRAN (R 4.2.0)
##     xtable                   1.8-4      2019-04-21 [1] CRAN (R 4.2.0)
##     XVector                  0.36.0     2022-04-26 [1] Bioconductor
##     yaml                     2.3.6      2022-10-18 [1] RSPM (R 4.2.0)
##     yulab.utils              0.0.5      2022-06-30 [1] RSPM (R 4.2.0)
##     zlibbioc                 1.42.0     2022-04-26 [1] Bioconductor
##     zoo                      1.8-11     2022-09-17 [1] RSPM (R 4.2.0)
## 
##  [1] /usr/local/lib/R/site-library
##  [2] /usr/local/lib/R/library
## 
##  V ── Loaded and on-disk version mismatch.
##  P ── Loaded and on-disk path mismatch.
## 
## ──────────────────────────────────────────────────────────────────────────────

Session info (base)

## R version 4.2.1 (2022-06-23)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.4 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats    graphics stats4   utils    methods  base    
## 
## other attached packages:
##  [1] celldex_1.6.0               SummarizedExperiment_1.26.1
##  [3] ensembldb_2.20.2            AnnotationFilter_1.20.0    
##  [5] GenomicFeatures_1.48.4      GenomicRanges_1.48.0       
##  [7] GenomeInfoDb_1.32.4         HDF5Array_1.24.2           
##  [9] rhdf5_2.40.0                DelayedArray_0.22.0        
## [11] MatrixGenerics_1.8.1        matrixStats_0.63.0         
## [13] Matrix_1.5-3                drake_7.13.4               
## [15] AnnotationDbi_1.58.0        IRanges_2.30.1             
## [17] S4Vectors_0.34.0            Biobase_2.56.0             
## [19] BiocGenerics_0.42.0         scdrake_1.5.1              
## [21] testthat_3.1.5              magrittr_2.0.3             
## [23] here_1.0.1                  cli_3.4.1                  
## [25] rlang_1.0.6                 conflicted_1.1.0           
## 
## loaded via a namespace (and not attached):
##   [1] rsvd_1.0.5                    ica_1.0-3                    
##   [3] svglite_2.1.0                 class_7.3-20                 
##   [5] ps_1.7.2                      Rsamtools_2.12.0             
##   [7] lmtest_0.9-40                 rprojroot_2.0.3              
##   [9] crayon_1.5.2                  MASS_7.3-58.1                
##  [11] rhdf5filters_1.8.0            nlme_3.1-158                 
##  [13] WriteXLS_6.4.0                backports_1.4.1              
##  [15] XVector_0.36.0                ROCR_1.0-11                  
##  [17] irlba_2.3.5.1                 callr_3.7.3                  
##  [19] limma_3.52.4                  scater_1.24.0                
##  [21] filelock_1.0.2                stringfish_0.15.7            
##  [23] xgboost_1.6.0.1               qs_0.25.4                    
##  [25] BiocParallel_1.30.4           rjson_0.2.21                 
##  [27] bit64_4.0.5                   glue_1.6.2                   
##  [29] harmony_0.1.1                 scDblFinder_1.10.0           
##  [31] pheatmap_1.0.12               sctransform_0.3.5            
##  [33] parallel_4.2.1                processx_3.8.0               
##  [35] vipor_0.4.5                   spatstat.sparse_3.0-0        
##  [37] base64url_1.4                 spatstat.geom_3.0-3          
##  [39] tidyselect_1.1.2              usethis_2.1.6                
##  [41] argparser_0.7.1               SeuratObject_4.1.3           
##  [43] fitdistrplus_1.1-8            XML_3.99-0.13                
##  [45] tidyr_1.2.1                   zoo_1.8-11                   
##  [47] GenomicAlignments_1.32.1      xtable_1.8-4                 
##  [49] evaluate_0.18                 ggplot2_3.4.0                
##  [51] scuttle_1.6.3                 zlibbioc_1.42.0              
##  [53] rstudioapi_0.14               miniUI_0.1.1.1               
##  [55] sp_1.5-1                      bslib_0.4.1                  
##  [57] shiny_1.7.3                   BiocSingular_1.12.0          
##  [59] xfun_0.35                     pkgbuild_1.3.1               
##  [61] cluster_2.1.3                 tidygraph_1.2.3              
##  [63] KEGGREST_1.36.3               clustermq_0.8.8              
##  [65] tibble_3.1.8                  interactiveDisplayBase_1.34.0
##  [67] ggrepel_0.9.2                 listenv_0.8.0                
##  [69] Biostrings_2.64.1             png_0.1-8                    
##  [71] future_1.29.0                 withr_2.5.0                  
##  [73] bitops_1.0-7                  ggforce_0.4.1                
##  [75] plyr_1.8.8                    pcaPP_2.0-3                  
##  [77] e1071_1.7-12                  dqrng_0.3.0                  
##  [79] RcppParallel_5.1.5            pillar_1.8.1                 
##  [81] cachem_1.0.6                  fs_1.5.2                     
##  [83] DelayedMatrixStats_1.18.2     vctrs_0.5.1                  
##  [85] ellipsis_0.3.2                generics_0.1.3               
##  [87] RApiSerialize_0.1.2           devtools_2.4.4               
##  [89] tools_4.2.1                   beeswarm_0.4.0               
##  [91] munsell_0.5.0                 tweenr_2.0.2                 
##  [93] proxy_0.4-27                  fastmap_1.1.0                
##  [95] compiler_4.2.1                pkgload_1.3.2                
##  [97] abind_1.4-5                   httpuv_1.6.6                 
##  [99] rtracklayer_1.56.1            ExperimentHub_2.4.0          
## [101] sessioninfo_1.2.2             plotly_4.10.1                
## [103] GenomeInfoDbData_1.2.8        gridExtra_2.3                
## [105] edgeR_3.38.4                  lattice_0.20-45              
## [107] deldir_1.0-6                  utf8_1.2.2                   
## [109] later_1.3.0                   dplyr_1.0.10                 
## [111] BiocFileCache_2.4.0           jsonlite_1.8.4               
## [113] storr_1.2.5                   scales_1.2.1                 
## [115] datasets_4.2.1                ScaledMatrix_1.4.1           
## [117] pbapply_1.6-0                 sparseMatrixStats_1.8.0      
## [119] lazyeval_0.2.2                promises_1.2.0.1             
## [121] R.utils_2.12.2                goftest_1.2-3                
## [123] spatstat.utils_3.0-1          reticulate_1.26              
## [125] rmarkdown_2.18                cowplot_1.1.1                
## [127] statmod_1.4.37                webshot_0.5.4                
## [129] Rtsne_0.16                    glmGamPoi_1.8.0              
## [131] uwot_0.1.14                   igraph_1.3.5                 
## [133] survival_3.3-1                ResidualMatrix_1.6.1         
## [135] yaml_2.3.6                    systemfonts_1.0.4            
## [137] htmltools_0.5.3               memoise_2.0.1                
## [139] profvis_0.3.7                 BiocIO_1.6.0                 
## [141] Seurat_4.3.0                  locfit_1.5-9.6               
## [143] graphlayouts_0.8.4            PCAtools_2.8.0               
## [145] viridisLite_0.4.1             digest_0.6.30                
## [147] rrcov_1.7-2                   assertthat_0.2.1             
## [149] RhpcBLASctl_0.21-247.1        mime_0.12                    
## [151] rappdirs_0.3.3                SingleR_1.10.0               
## [153] RSQLite_2.2.19                yulab.utils_0.0.5            
## [155] future.apply_1.10.0           remotes_2.4.2                
## [157] data.table_1.14.6             urlchecker_1.0.1             
## [159] blob_1.2.3                    R.oo_1.25.0                  
## [161] labeling_0.4.2                splines_4.2.1                
## [163] Rhdf5lib_1.18.2               AnnotationHub_3.4.0          
## [165] ProtGenerics_1.28.0           RCurl_1.98-1.9               
## [167] hms_1.1.2                     colorspace_2.0-3             
## [169] DropletUtils_1.16.0           BiocManager_1.30.19          
## [171] ggbeeswarm_0.6.0              littler_0.3.17               
## [173] sass_0.4.4                    Rcpp_1.0.9                   
## [175] RANN_2.6.1                    mvtnorm_1.1-3                
## [177] txtq_0.2.4                    fansi_1.0.3                  
## [179] tzdb_0.3.0                    brio_1.1.3                   
## [181] parallelly_1.32.1             R6_2.5.1                     
## [183] grid_4.2.1                    ggridges_0.5.4               
## [185] lifecycle_1.0.3               bluster_1.6.0                
## [187] curl_4.3.3                    jquerylib_0.1.4              
## [189] leiden_0.4.3                  snakecase_0.11.0             
## [191] robustbase_0.95-0             desc_1.4.2                   
## [193] RcppAnnoy_0.0.20              org.Hs.eg.db_3.15.0          
## [195] RColorBrewer_1.1-3            spatstat.explore_3.0-5       
## [197] stringr_1.5.0                 htmlwidgets_1.5.4            
## [199] beachmat_2.12.0               polyclip_1.10-4              
## [201] biomaRt_2.52.0                purrr_0.3.5                  
## [203] timechange_0.1.1              gridGraphics_0.5-1           
## [205] rvest_1.0.3                   globals_0.16.2               
## [207] spatstat.random_3.0-1         patchwork_1.1.2              
## [209] progressr_0.11.0              batchelor_1.12.3             
## [211] codetools_0.2-18              grDevices_4.2.1              
## [213] lubridate_1.9.0               metapod_1.4.0                
## [215] prettyunits_1.1.1             SingleCellExperiment_1.18.1  
## [217] dbplyr_2.2.1                  R.methodsS3_1.8.2            
## [219] gtable_0.3.1                  DBI_1.1.3                    
## [221] highr_0.9                     tensor_1.5                   
## [223] httr_1.4.4                    KernSmooth_2.23-20           
## [225] stringi_1.7.8                 progress_1.2.2               
## [227] reshape2_1.4.4                farver_2.1.1                 
## [229] viridis_0.6.2                 DT_0.26                      
## [231] xml2_1.3.3                    BiocNeighbors_1.14.0         
## [233] kableExtra_1.3.4              restfulr_0.0.15              
## [235] readr_2.1.3                   ggplotify_0.1.0              
## [237] scattermore_0.8               BiocVersion_3.15.2           
## [239] scran_1.24.1                  DEoptimR_1.0-11              
## [241] bit_4.0.5                     clustree_0.5.0               
## [243] spatstat.data_3.0-0           ggraph_2.1.0                 
## [245] janitor_2.1.0                 pkgconfig_2.0.3              
## [247] rzmq_0.9.8                    knitr_1.41                   
## [249] downlit_0.4.2                 SC3_1.15.1

Page generated on 2023-12-02 19:11:24

LS0tCnRpdGxlOiAi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