From b871b03155eddaaab0c5c805dcd4178acc472413 Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Wed, 29 Mar 2023 14:40:57 +0100 Subject: [PATCH 1/4] bumped version to 0.6.2 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3611e48..ffc9e51 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: metaboMisc Title: Miscellaneous Functions for Metabolomics Analyses -Version: 0.6.1 +Version: 0.6.2 Authors@R: person("Jasen", "Finch", email = "jsf9@aber.ac.uk", role = c("aut", "cre")) Description: Miscellaneous helper functions for metabolomics analyses that do not yet have a permanent home. URL: https://jasenfinch.github.io/metaboMisc/ From e1e7f26dc9185402fd74335aa9cbdce70e808cdd Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Wed, 29 Mar 2023 14:57:23 +0100 Subject: [PATCH 2/4] Fixed miss injection and batch correction detection for GC-MS data sets processed using xcms --- R/detect.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/detect.R b/R/detect.R index fbf5ec1..4cd74c3 100644 --- a/R/detect.R +++ b/R/detect.R @@ -59,7 +59,7 @@ setMethod('detectMissInjections',signature = 'MetaboProfile', mi <- x %>% processedData() - if (!is.list(mi)){ + if (is.data.frame(mi)){ mi <- list(mi) } @@ -68,10 +68,10 @@ setMethod('detectMissInjections',signature = 'MetaboProfile', if (mi %>% names() %>% - is.na() %>% + {is.null(.) | is.na(.)} %>% any()) { names(mi) <- replace(names(mi), - is.na(names(mi)), + is.null(names(mi)) | is.na(names(mi)), 'NA') } @@ -166,7 +166,7 @@ setMethod('detectBatchDiff',signature = "MetaboProfile", TICdat <- x %>% processedData() - if (!is.list(TICdat)){ + if (is.data.frame(TICdat)){ TICdat <- list(TICdat) } @@ -175,10 +175,10 @@ setMethod('detectBatchDiff',signature = "MetaboProfile", if (TICdat %>% names() %>% - is.na() %>% + {is.null(.) | is.na(.)} %>% any()) { names(TICdat) <- replace(names(TICdat), - is.na(names(TICdat)), + is.null(names(TICdat)) | is.na(names(TICdat)), 'NA') } From 6aafab8ee6f2e3a4d6ead6d0d8a5f7300208a7fe Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Wed, 29 Mar 2023 15:03:35 +0100 Subject: [PATCH 3/4] Fix the featureSummary() method for GC-MS data sets processed using xcms --- R/summary.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/summary.R b/R/summary.R index 0994949..e24aa92 100644 --- a/R/summary.R +++ b/R/summary.R @@ -42,7 +42,7 @@ setMethod('featureSummary',signature = 'MetaboProfile', featSummary <- function(x){ - if (!is.list(x)){ + if (is.data.frame(x)){ x <- list(x) } From 2ca5b09b16fea14432dc1276c706e1b21aa94c45 Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Wed, 29 Mar 2023 15:08:52 +0100 Subject: [PATCH 4/4] Update package NEWS --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index ea95cac..992677d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# metaboMisc 0.6.2 + +* Fixed miss injection and batch correction detection for GC-MS data sets processed using xcms. + +* Fixed the feature summary for GC-MS data sets processed using xcms. + # metaboMisc 0.6.1 * Fix the missing `name` column in tables returned from `convertSampleInfo()`.