Skip to content

Commit

Permalink
Update Maaslin2.R
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNickols authored Nov 11, 2024
1 parent 0256ed9 commit 5ff4892
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/Maaslin2.R
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,8 @@ Maaslin2 <-
# Filter data based on variance #
#################################

sds <- apply(filtered_data, 2, sd)
variance_filtered_data <- filtered_data[, which(sds > min_variance), drop = FALSE]
vars <- apply(filtered_data, 2, var)
variance_filtered_data <- filtered_data[, which(vars > min_variance), drop = FALSE]
variance_filtered_features <- ncol(filtered_data) - ncol(variance_filtered_data)
logging::loginfo("Total filtered features with variance filtering: %d", variance_filtered_features)
variance_filtered_feature_names <- setdiff(names(filtered_data), names(variance_filtered_data))
Expand Down

0 comments on commit 5ff4892

Please sign in to comment.