Skip to content

Commit f336c68

Browse files
committed
Bugfix to ClrNormalizeByGroup when ADT not present
1 parent 2a284bb commit f336c68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

singlecell/resources/chunks/ClrNormalizeByGroup.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
for (datasetId in names(seuratObjects)) {
22
printName(datasetId)
3+
4+
seuratObj <- readRDS(seuratObjects[[datasetId]])
35
if (!('ADT' %in% names(seuratObj@assays))) {
46
print('ADT assay not present, skipping')
5-
next
7+
} else {
8+
seuratObj <- CellMembrane::ClrNormalizeByGroup(seuratObj, groupingVar = groupingVar, assayName = assayName, targetAssayName = targetAssayName, margin = margin, minCellsPerGroup = minCellsPerGroup, calculatePerFeatureUCell = calculatePerFeatureUCell, featureInclusionList = featureWhitelist, featureExclusionList = featureExclusionList, doAsinhTransform = doAsinhTransform)
69
}
710

8-
seuratObj <- readRDS(seuratObjects[[datasetId]])
9-
seuratObj <- CellMembrane::ClrNormalizeByGroup(seuratObj, groupingVar = groupingVar, assayName = assayName, targetAssayName = targetAssayName, margin = margin, minCellsPerGroup = minCellsPerGroup, calculatePerFeatureUCell = calculatePerFeatureUCell, featureInclusionList = featureWhitelist, featureExclusionList = featureExclusionList, doAsinhTransform = doAsinhTransform)
10-
1111
saveData(seuratObj, datasetId)
1212

1313
# Cleanup

0 commit comments

Comments
 (0)