Skip to content

Commit

Permalink
refactor: remove Rmd files and keep md versions only
Browse files Browse the repository at this point in the history
  • Loading branch information
cafferychen777 committed Nov 20, 2024
1 parent a8ce954 commit 290b4f9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 676 deletions.
8 changes: 4 additions & 4 deletions R/generate_taxa_test_single.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,18 @@ generate_taxa_test_single <- function(data.obj,
mStat_filter(prev.filter = prev.filter,
abund.filter = abund.filter)

# 在运行 linda 之前添加检查
# Add a check before running linda
if (nrow(otu_tax_agg_filter) == 0 || ncol(otu_tax_agg_filter) == 0) {
warning("No features remain after filtering. Consider using less stringent filter thresholds.")
return(list()) # 返回空列表
return(list())
}

# Add this check before linda analysis
if (any(colSums(otu_tax_agg_filter) == 0)) {
keep_samples <- colSums(otu_tax_agg_filter) > 0
if (sum(keep_samples) == 0) {
warning("No samples remain after filtering.")
return(list()) # 返回空列表
return(list())
}
otu_tax_agg_filter <- otu_tax_agg_filter[, keep_samples]
allvars <- names(meta_tab)
Expand Down Expand Up @@ -267,4 +267,4 @@ generate_taxa_test_single <- function(data.obj,
names(test.list) <- feature.level

return(test.list)
}
}
219 changes: 0 additions & 219 deletions README-CN.Rmd

This file was deleted.

Loading

0 comments on commit 290b4f9

Please sign in to comment.