From 919ecd3bfbf9ef55c269e6cdd2e1a4c870e783dd Mon Sep 17 00:00:00 2001 From: jorainer Date: Wed, 20 May 2020 13:12:39 +0200 Subject: [PATCH] fix: issue #471 --- R/functions-XCMSnExp.R | 7 ++++++- inst/NEWS | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/R/functions-XCMSnExp.R b/R/functions-XCMSnExp.R index fbcbdc7ad..4f937da8f 100644 --- a/R/functions-XCMSnExp.R +++ b/R/functions-XCMSnExp.R @@ -54,7 +54,12 @@ dropGenericProcessHistory <- function(x, fun) { xs@rt <- rts ## @phenoData - xs@phenoData <- pData(from) + pd <- pData(from) + if (nrow(pd) != length(fileNames(from))) { + pd <- data.frame(file_name = basename(fileNames(from))) + rownames(pd) <- pd$file_name + } + xs@phenoData <- pd ## @filepaths xs@filepaths <- fileNames(from) diff --git a/inst/NEWS b/inst/NEWS index a8641b0d3..e7f9dc9c2 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,5 +1,7 @@ Changes in version 3.10.1 +- Fix for issue #471. Thanks for Andris Jankevics for reporting and providing a + solution. - Fix issue #475. - Fix problem in converting an XCMSnExp into an xcmsSet object (issue #464).