Skip to content

Commit 6c9b31a

Browse files
committed
Bugfix to TcrFilter thresholdToKeep param
1 parent 6b4a6f3 commit 6c9b31a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

singlecell/resources/chunks/TcrFilter.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ for (datasetId in names(seuratObjects)) {
2626
return(length(intersect(values, cdr3ForLocus)) != 0)
2727
})
2828

29-
if (sum(matchingCells) <= thresholdToKeep) {
30-
print(paste0('Too few cells, skipping: ', datasetId))
29+
if (sum(matchingCells) == 0) {
30+
print(paste0('No matching cells, skipping: ', datasetId))
3131
next
3232
}
3333

@@ -41,6 +41,8 @@ for (datasetId in names(seuratObjects)) {
4141

4242
if (all(is.null(cellsToKeep))) {
4343
print('There were no matching cells')
44+
} else if (length(cellsToKeep) <= thresholdToKeep) {
45+
print(paste0('Too few cells, skipping: ', datasetId))
4446
} else {
4547
print(paste0('Total passing cells: ', length(cellsToKeep)))
4648
seuratObj <- subset(seuratObj, cells = cellsToKeep)

0 commit comments

Comments
 (0)