Skip to content

Commit

Permalink
fix isotype length vector specification in suggesting isotypes when u…
Browse files Browse the repository at this point in the history
…se.isotype.control = FALSE
  • Loading branch information
MattPM committed Aug 26, 2021
1 parent 768691f commit e23e7bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/dsb.r
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' Normalize single cell antibody derived tag (ADT) protein data with the DSBNormalizeProtein function. This single function runs step I (ambient protein background correction) and step II (defining and removing cell to cell technical variation) of the dsb normalization method. See <https://www.biorxiv.org/content/10.1101/2020.02.24.963603v3> for details of the algorithm.
#'
#' @author Matthew P. Mulè, \email{mattmule@@gmail.com}
#' @param cell_protein_matrix Raw protein ADT count data to be normalized with cells as columns and proteins as rows. See vignette, this is defined after quality control outlier cell removal based on the filtered output from Cell Ranger. Any CITE-seq count alignment tool can be used to define this as well.
#' @param empty_drop_matrix Raw empty droplet protein count data used for background correction with cells as columns and proteins as rows. This can easily be defined from the raw output from Cell Ranger (see vignette). Any count alignment tool for CITE-seq can be used to align and define these background drops.
#' @param denoise.counts TRUE (default) recommended to keep this TRUE and use with use.isotype.control = TRUE. This runs step II of the dsb algorithm to define and remove cell to cell technical noise.
Expand Down Expand Up @@ -83,8 +83,8 @@ DSBNormalizeProtein = function(cell_protein_matrix, empty_drop_matrix, denoise.c
' and set `isotype.control.name.vec` to a vector of isotype control protien names from cell_protein_matrix'
)
iso_detect = rownames(cell_protein_matrix)[grepl('sotype|Iso|iso', rownames(cell_protein_matrix))]
if (length(iso_detect > 0)) {
print('potential isotype controls detected')
if (length(iso_detect) > 0) {
print('potential isotype controls detected: ')
print(iso_detect)
}
}
Expand Down Expand Up @@ -148,5 +148,5 @@ DSBNormalizeProtein = function(cell_protein_matrix, empty_drop_matrix, denoise.c
return(ret_obj)
} else {
return(norm_adt)
}
}
}
3 changes: 3 additions & 0 deletions man/DSBNormalizeProtein.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e23e7bc

Please sign in to comment.