From a025fc1c6efc5c82b67a75d80b39f4214b2b2b37 Mon Sep 17 00:00:00 2001 From: Philippine Louail Date: Fri, 26 Jan 2024 20:24:03 +0100 Subject: [PATCH] fixes --- R/method-filterFeatures.R | 2 -- man/filterFeatures.Rd | 4 +--- vignettes/xcms.Rmd | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/R/method-filterFeatures.R b/R/method-filterFeatures.R index a239885f7..78ce84551 100644 --- a/R/method-filterFeatures.R +++ b/R/method-filterFeatures.R @@ -77,7 +77,6 @@ #' #' ## Load a test data set with features defined. #' test_xcms <- loadXcmsData() -#' #' ## Set up parameter to filter based on coefficient of variation. By setting #' ## the filter such as below, features that have a coefficient of variation #' ## superior to 0.3 in QC samples will be removed from the object `test_xcms` @@ -88,7 +87,6 @@ #' #' filtered_data_rsd <- filterFeatures(object = test_xcms, filter = rsd_filter) #' -#' #' ## Set up parameter to filter based on D-ratio. By setting the filter such #' ## as below, features that have a D-ratio computed based on their abundance #' ## between QC and study samples superior to 0.5 will be removed from the diff --git a/man/filterFeatures.Rd b/man/filterFeatures.Rd index 171a400da..79b56598d 100644 --- a/man/filterFeatures.Rd +++ b/man/filterFeatures.Rd @@ -61,18 +61,16 @@ library(MsExperiment) ## Load a test data set with features defined. test_xcms <- loadXcmsData() - ## Set up parameter to filter based on coefficient of variation. By setting ## the filter such as below, features that have a coefficient of variation ## superior to 0.3 in QC samples will be removed from the object `test_xcms` ## when calling the `filterFeatures` function. -rsd_filter <- RsdFilter(threshold = 0.3 +rsd_filter <- RsdFilter(threshold = 0.3, qcIndex = sampleData(test_xcms)$sample_type == "QC") filtered_data_rsd <- filterFeatures(object = test_xcms, filter = rsd_filter) - ## Set up parameter to filter based on D-ratio. By setting the filter such ## as below, features that have a D-ratio computed based on their abundance ## between QC and study samples superior to 0.5 will be removed from the diff --git a/vignettes/xcms.Rmd b/vignettes/xcms.Rmd index 17a8d4770..188d65a5e 100644 --- a/vignettes/xcms.Rmd +++ b/vignettes/xcms.Rmd @@ -1124,12 +1124,12 @@ The `filter` argument can accommodate various types of input, each determining t specific type of quality assessment and filtering to be performed. The `RsdFilter` enable users to filter features based on their relative -standard deviation (coefficient of vairation) for a specified `threshold`. It +standard deviation (coefficient of variation) for a specified `threshold`. It is recommended to base the computation on quality control (QC) samples, as demonstrated below: ```{r} -# Set up parameters for RsdFilter +# Set up parameters for RsdFilter rsd_filter <- RsdFilter(threshold = 0.3, qcIndex = sampleData(faahko)$sample_type == "QC")