Skip to content

Commit 30eda78

Browse files
committed
Auto-add missing columns to PredictTcellActivation
(cherry picked from commit b506b87)
1 parent f0bccd2 commit 30eda78

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

singlecell/resources/chunks/IdentifyAndStoreActiveClonotypes.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ for (datasetId in names(seuratObjects)) {
1111
printName(datasetId)
1212
seuratObj <- readSeuratRDS(seuratObjects[[datasetId]])
1313

14+
if (! 'TRB_Segments' %in% names(seuratObj@meta.data)) {
15+
print('Re-running AppendTcr to add segment columns')
16+
seuratObj <- Rdiscvr::DownloadAndAppendTcrClonotypes(seuratObj, allowMissing = TRUE)
17+
}
18+
1419
Rdiscvr::IdentifyAndStoreActiveClonotypes(seuratObj, chain = 'TRA', storeStimLevelData = FALSE)
1520
Rdiscvr::IdentifyAndStoreActiveClonotypes(seuratObj, chain = 'TRB')
1621

singlecell/resources/chunks/PredictTcellActivation.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ for (datasetId in names(seuratObjects)) {
1010
}
1111
}
1212

13+
if (! 'TRB_Segments' %in% names(seuratObj@meta.data)) {
14+
print('Re-running AppendTcr to add segment columns')
15+
seuratObj <- Rdiscvr::DownloadAndAppendTcrClonotypes(seuratObj, allowMissing = TRUE)
16+
}
17+
1318
seuratObj <- RIRA::PredictTcellActivation(seuratObj)
1419

1520
saveData(seuratObj, datasetId)

0 commit comments

Comments
 (0)