diff --git a/R/rliger.R b/R/rliger.R index 81570570..465bf032 100755 --- a/R/rliger.R +++ b/R/rliger.R @@ -4587,7 +4587,7 @@ getProportionMito <- function(object, use.norm = FALSE) { data.use <- object@norm.data } percent_mito <- unlist(lapply(unname(data.use), function(x) { - colSums(x[mito.genes, ]) / colSums(x) + colSums(x[rownames(x) %in% mito.genes, ]) / colSums(x) }), use.names = TRUE) return(percent_mito) @@ -7161,4 +7161,4 @@ calcNormLoadings = function(object) { } return(results) -} \ No newline at end of file +}