Skip to content

Commit

Permalink
Speed up filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNickols committed Oct 6, 2024
1 parent 85cd509 commit d0198bf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions R/maaslin3.R
Original file line number Diff line number Diff line change
Expand Up @@ -1651,11 +1651,9 @@ maaslin_filter <- function(normalized_data,

# Filter by abundance
data_zeros <- unfiltered_data
for (col_index in seq_along(data_zeros)) {
data_zeros[, col_index][is.na(data_zeros[, col_index])] <-
min(min_abundance, zero_threshold) - 1
}

data_zeros[is.na(data_zeros)] <-
min(min_abundance, zero_threshold) - 1

##########################################
# Apply the non-zero abundance threshold #
##########################################
Expand Down

0 comments on commit d0198bf

Please sign in to comment.