From 27009423377fa2ecf52374c407f3ce5d72a334ed Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Tue, 20 Apr 2021 13:15:30 +0100 Subject: [PATCH 1/2] fixed function imports with metabolyseR update --- NAMESPACE | 4 ++-- R/calcCorrelations-method.R | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 4c30e13..3acaecf 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -83,9 +83,9 @@ importFrom(magrittr,set_names) importFrom(magrittr,set_rownames) importFrom(metabolyseR,analysisData) importFrom(metabolyseR,analysisParameters) -importFrom(metabolyseR,correlationResults) +importFrom(metabolyseR,analysisResults) importFrom(metabolyseR,dat) -importFrom(metabolyseR,keepVariables) +importFrom(metabolyseR,keepFeatures) importFrom(metabolyseR,metabolyse) importFrom(metabolyseR,sinfo) importFrom(methods,new) diff --git a/R/calcCorrelations-method.R b/R/calcCorrelations-method.R index 57a8d68..42d426a 100644 --- a/R/calcCorrelations-method.R +++ b/R/calcCorrelations-method.R @@ -1,4 +1,4 @@ -#' @importFrom metabolyseR analysisParameters metabolyse correlationResults keepVariables analysisData dat sinfo +#' @importFrom metabolyseR analysisParameters metabolyse analysisResults keepFeatures analysisData dat sinfo #' @importFrom magrittr set_rownames #' @importFrom stats cutree dist hclust @@ -38,16 +38,19 @@ setMethod('calcCorrelations',signature = 'Assignment',function(assignment){ split(.$Group) %>% parLapply(cl = clus,function(f){ analysisData(assignment@data,tibble(ID = 1:nrow(assignment@data))) %>% - keepVariables(variables = f$Feature) %>% + keepFeatures(features = f$Feature) %>% {metabolyse(dat(.),sinfo(.),p,verbose = FALSE)} %>% - correlationResults() + analysisResults(element = 'correlations') }) %>% bind_rows(.id = 'RT Group') stopCluster(clus) } else { - cors <- metabolyse(assignment@data,tibble(ID = 1:nrow(assignment@data)),p,verbose = F) %>% - correlationResults() + cors <- metabolyse(assignment@data, + tibble(ID = 1:nrow(assignment@data)), + p, + verbose = FALSE) %>% + analysisResults(element = 'correlations') } assignment@correlations <- cors From 9755538983b87d25976a98c3c2c536098cc6b87f Mon Sep 17 00:00:00 2001 From: jasenfinch Date: Tue, 20 Apr 2021 13:16:22 +0100 Subject: [PATCH 2/2] bumped version 0.7.8 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0ecf3dc..e0f3e1c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: MFassign Title: Molecular Formula Assignment for High Resolution metabolomics -Version: 0.7.7 +Version: 0.7.8 Authors@R: person("Jasen", "Finch", email = "jsf9@aber.ac.uk", role = c("aut", "cre")) Description: Molecular formula assignment for high resolution metabolomics. Depends: R (>= 3.5.0),