Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
TuomasBorman committed Jan 8, 2025
1 parent e4cd2d9 commit 09d3e46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/addAlpha.R
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ setMethod("getAlpha", signature = c(x = "SummarizedExperiment"),
"populated or with 'tree' provided separately.", call. = FALSE)
}
# Check for unsupported values (negative values)
if( any(assay(x, assay.type) < 0) ){
if( any(assay(x, assay.type) < 0 & !is.na(assay(x, assay.type))) ){
ind <- detected[["non_neg"]]
index_rm <- detected[!ind, "index"]
detected <- detected[ind, ]
Expand All @@ -640,7 +640,7 @@ setMethod("getAlpha", signature = c(x = "SummarizedExperiment"),
# Subsample the data and then calculate index based on the rarified data
res <- bplapply(seq(niter), function(i){
x_sub <- rarefyAssay(x, assay.type = assay.type, verbose = FALSE, ...)
temp <- .calculate_alpha(x_sub, assay.type, index, name, ...)
temp <- .calculate_alpha(x_sub, "subsampled", index, name, ...)
return(temp)
}, BPPARAM = BPPARAM)
# Combine list of matrixed from multiple iterations
Expand Down

0 comments on commit 09d3e46

Please sign in to comment.