Skip to content

Commit

Permalink
fix: fix bug in filterFeatures,PercentMissingFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Feb 23, 2024
1 parent 1cf7cda commit e606322
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: xcms
Version: 4.1.7
Version: 4.1.8
Title: LC-MS and GC-MS Data Analysis
Description: Framework for processing and visualization of chromatographically
separated and single-spectra mass spectral data. Imports from AIA/ANDI NetCDF,
Expand Down
4 changes: 2 additions & 2 deletions R/method-filterFeatures.R
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ setMethod("filterFeatures",
vals <- rowPercentMissing(featureValues(object, ...)[, spl_idx])
fts_idx <- c(fts_idx, which(vals <= filter@threshold))
}
fts_idx <- order(unique(fts_idx))
fts_idx <- sort(unique(fts_idx))
message(length(vals) - length(fts_idx), " features were removed")
ph <- XProcessHistory(param = filter,
date. = date(),
Expand All @@ -479,7 +479,7 @@ setMethod("filterFeatures",
vals <- rowPercentMissing(assay(object, assay)[, spl_idx])
fts_idx <- c(fts_idx, which(vals <= filter@threshold))
}
fts_idx <- order(unique(fts_idx))
fts_idx <- sort(unique(fts_idx))
message(length(vals) - length(fts_idx), " features were removed")
object[fts_idx]
}
Expand Down
5 changes: 5 additions & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Changes in version 4.1.8
----------------------

- Fix bug in `filterFeatures,PercentMissingFilter`.

Changes in version 4.1.7
----------------------

Expand Down

0 comments on commit e606322

Please sign in to comment.