Skip to content

Commit 48bd1eb

Browse files
committed
Improve logging in PerformTcrClustering
1 parent be5a839 commit 48bd1eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

singlecell/resources/chunks/PerformTcrClustering.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ for (datasetId in names(seuratObjects)) {
22
printName(datasetId)
33
seuratObj <- readSeuratRDS(seuratObjects[[datasetId]])
44

5+
print(paste0('Calculating distances for: ', datasetId))
56
seuratObj <- tcrClustR::CalculateTcrDistances(
67
inputData = seuratObj,
78
chains = c('TRA', 'TRB', 'TRG', 'TRD'),
@@ -10,6 +11,7 @@ for (datasetId in names(seuratObjects)) {
1011
calculateChainPairs = TRUE
1112
)
1213

14+
print('Performing TCR Clustering')
1315
seuratObj <- tcrClustR::RunTcrClustering(
1416
seuratObj_TCR = seuratObj,
1517
dianaHeight = 20,
@@ -22,7 +24,8 @@ for (datasetId in names(seuratObjects)) {
2224
} else {
2325
for (an in names(seuratObj@misc$TCR_Distances)) {
2426
ad <- seuratObj@misc$TCR_Distances[[an]]
25-
print(paste0('Assay: ', an, ', total clones: ', nrow(ad)))
27+
fn <- length(unique(seuratObj[[paste0(an, '_ClusterIdx')]]))
28+
print(paste0('Assay: ', an, ', total clones: ', nrow(ad), '. Distinct families: ', fn))
2629
}
2730
}
2831

0 commit comments

Comments
 (0)