Skip to content

Commit

Permalink
pass cpm cutoff
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-james committed Jan 15, 2025
1 parent 7285bd7 commit fc0baa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/deg.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ deg.prepare <- function(se, pathology, case, control, sample.col, filter_only_ca
### Filter by expression
pb = pb[edgeR::filterByExpr(pb, group=pathology, min.count=min.count, min.prop=frac_n),]
if (cpm.cutoff > 0) {
pb = pb[filterByCPM(assays(pb)[[1]], group=pb[[pathology]], min.prob=frac_n),]
pb = pb[filterByCPM(assays(pb)[[1]], group=pb[[pathology]], min.prob=frac_n, min.cpm=cpm.cutoff),]
}
se = se[rownames(pb), SummarizedExperiment::colData(se)[[sample.col]] %in% colnames(pb)]
cd = SummarizedExperiment::colData(se)
Expand Down

0 comments on commit fc0baa4

Please sign in to comment.