Previous changeset 31:eb15a3841da4 (2020-04-28) Next changeset 33:f5d51091cf84 (2023-09-11) |
Commit message:
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae" |
modified:
README.rst abims_xcms_xcmsSet.xml lib.r macros_xcms.xml repository_dependencies.xml xcms_xcmsSet.r |
removed:
test-data/faahKO.raw.RData test-data/faahKO_reduce.zip |
b |
diff -r eb15a3841da4 -r b02d1992a43a README.rst --- a/README.rst Tue Apr 28 09:35:10 2020 -0400 +++ b/README.rst Wed Apr 07 16:47:14 2021 +0000 |
b |
@@ -24,6 +24,10 @@ .. _News: https://bioconductor.org/packages/release/bioc/news/xcms/NEWS +**Version 3.12.0+galaxy* - 03/03/2020** + +- UPGRADE: upgrade the xcms version from 3.6.1 to 3.12.0 (see XCMS News_) + **Version 3.6.1.0 - 03/09/2019** - UPGRADE: upgrade the xcms version from 3.4.4 to 3.6.1 (see XCMS News_) |
b |
diff -r eb15a3841da4 -r b02d1992a43a abims_xcms_xcmsSet.xml --- a/abims_xcms_xcmsSet.xml Tue Apr 28 09:35:10 2020 -0400 +++ b/abims_xcms_xcmsSet.xml Wed Apr 07 16:47:14 2021 +0000 |
b |
@@ -1,4 +1,4 @@ -<tool id="abims_xcms_xcmsSet" name="xcms findChromPeaks (xcmsSet)" version="@TOOL_VERSION@+galaxy1"> +<tool id="abims_xcms_xcmsSet" name="xcms findChromPeaks (xcmsSet)" version="@TOOL_VERSION@+galaxy0"> <description>Chromatographic peak detection</description> <macros> @@ -500,11 +500,11 @@ Changelog/News -------------- -.. _News: https://bioconductor.org/packages/release/bioc/news/xcms/NEWS +@HELP_XCMS_NEWVERSION_31200@ **Version 3.6.1+galaxy1 - 22/04/2020** -- NEW: possibility to get a tabular file with all the chromatographic peaks obtained with the CentWave and MatchedFilter methods. +- NEW: possibility to get a tabular file with all the chromatographic peaks obtained with the CentWave and MatchedFilter methods. @HELP_XCMS_NEWVERSION_3610@ |
b |
diff -r eb15a3841da4 -r b02d1992a43a lib.r --- a/lib.r Tue Apr 28 09:35:10 2020 -0400 +++ b/lib.r Wed Apr 07 16:47:14 2021 +0000 |
[ |
b'@@ -6,8 +6,8 @@\n parseCommandArgs <- function(...) {\n args <- batch::parseCommandArgs(...)\n for (key in names(args)) {\n- if (args[key] %in% c("TRUE","FALSE"))\n- args[key] = as.logical(args[key])\n+ if (args[key] %in% c("TRUE", "FALSE"))\n+ args[key] <- as.logical(args[key])\n }\n return(args)\n }\n@@ -17,14 +17,20 @@\n # - load the packages\n # - display the sessionInfo\n loadAndDisplayPackages <- function(pkgs) {\n- for(pkg in pkgs) suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))\n+ for (pkg in pkgs) suppressPackageStartupMessages(stopifnot(library(pkg, quietly = TRUE, logical.return = TRUE, character.only = TRUE)))\n \n- sessioninfo = sessionInfo()\n- cat(sessioninfo$R.version$version.string,"\\n")\n+ sessioninfo <- sessionInfo()\n+ cat(sessioninfo$R.version$version.string, "\\n")\n cat("Main packages:\\n")\n- for (pkg in names(sessioninfo$otherPkgs)) { cat(paste(pkg,packageVersion(pkg)),"\\t") }; cat("\\n")\n+ for (pkg in names(sessioninfo$otherPkgs)) {\n+ cat(paste(pkg, packageVersion(pkg)), "\\t")\n+ }\n+ cat("\\n")\n cat("Other loaded packages:\\n")\n- for (pkg in names(sessioninfo$loadedOnly)) { cat(paste(pkg,packageVersion(pkg)),"\\t") }; cat("\\n")\n+ for (pkg in names(sessioninfo$loadedOnly)) {\n+ cat(paste(pkg, packageVersion(pkg)), "\\t")\n+ }\n+ cat("\\n")\n }\n \n #@author G. Le Corguille\n@@ -43,20 +49,20 @@\n chromTIC_adjusted <- NULL\n chromBPI_adjusted <- NULL\n md5sumList <- NULL\n- for(image in args$images) {\n+ for (image in args$images) {\n \n load(image)\n # Handle infiles\n if (!exists("singlefile")) singlefile <- NULL\n if (!exists("zipfile")) zipfile <- NULL\n- rawFilePath <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile, args)\n+ rawFilePath <- retrieveRawfileInTheWorkingDir(singlefile, zipfile, args)\n zipfile <- rawFilePath$zipfile\n singlefile <- rawFilePath$singlefile\n \n if (exists("raw_data")) xdata <- raw_data\n if (!exists("xdata")) stop("\\n\\nERROR: The RData doesn\'t contain any object called \'xdata\'. This RData should have been created by an old version of XMCS 2.*")\n \n- cat(sampleNamesList$sampleNamesOrigin,"\\n")\n+ cat(sampleNamesList$sampleNamesOrigin, "\\n")\n \n if (!exists("xdata_merged")) {\n xdata_merged <- xdata\n@@ -68,14 +74,14 @@\n chromTIC_adjusted_merged <- chromTIC_adjusted\n chromBPI_adjusted_merged <- chromBPI_adjusted\n } else {\n- if (is(xdata, "XCMSnExp")) xdata_merged <- c(xdata_merged,xdata)\n- else if (is(xdata, "OnDiskMSnExp")) xdata_merged <- xcms:::.concatenate_OnDiskMSnExp(xdata_merged,xdata)\n+ if (is(xdata, "XCMSnExp")) xdata_merged <- c(xdata_merged, xdata)\n+ else if (is(xdata, "OnDiskMSnExp")) xdata_merged <- xcms:::.concatenate_OnDiskMSnExp(xdata_merged, xdata)\n else stop("\\n\\nERROR: The RData either a OnDiskMSnExp object called raw_data or a XCMSnExp object called xdata")\n \n- singlefile_merged <- c(singlefile_merged,singlefile)\n- md5sumList_merged$origin <- rbind(md5sumList_merged$origin,md5sumList$origin)\n- sampleNamesList_merged$sampleNamesOrigin <- c(sampleNamesList_merged$sampleNamesOrigin,sampleNamesList$sampleNamesOrigin)\n- sampleNamesList_merged$sampleNamesMakeNames <- c(sampleNamesList_merged$sampleNamesMakeNames,sampleNamesList$sampleNamesMakeNames)\n+ singlefile_merged <- c(singlefile_merged, singlefile)\n+ md5sumList_merged$origin <- rbind(md5sumList_merged$origin, md5sumList$origin)\n+ sampleNamesList_merged$sampleNamesOrigin <- c(sampleNamesList_merged$sampleNamesOrigin, sampleNamesList$sampleNamesOrigin)\n+ sampleNamesList_merged$sampleNamesMakeNames <- c(sampleNamesList_merged$sampleNamesMakeNames, sampleNamesList$sampleNamesMakeNam'..b'length("singlefile") > 0)) {\n files <- vector()\n for (singlefile_sampleName in names(singlefile)) {\n singlefile_galaxyPath <- singlefile[[singlefile_sampleName]]\n- if(!file.exists(singlefile_galaxyPath)){\n- error_message <- paste("Cannot access the sample:",singlefile_sampleName,"located:",singlefile_galaxyPath,". Please, contact your administrator ... if you have one!")\n+ if (!file.exists(singlefile_galaxyPath)) {\n+ error_message <- paste("Cannot access the sample:", singlefile_sampleName, "located:", singlefile_galaxyPath, ". Please, contact your administrator ... if you have one!")\n print(error_message); stop(error_message)\n }\n \n- if (!suppressWarnings( try (file.link(singlefile_galaxyPath, singlefile_sampleName), silent=T)))\n+ if (!suppressWarnings(try(file.link(singlefile_galaxyPath, singlefile_sampleName), silent = T)))\n file.copy(singlefile_galaxyPath, singlefile_sampleName)\n files <- c(files, singlefile_sampleName)\n }\n }\n # zipfile\n- if(!is.null(zipfile) && (zipfile != "")) {\n- if(!file.exists(zipfile)){\n- error_message <- paste("Cannot access the Zip file:",zipfile,". Please, contact your administrator ... if you have one!")\n+ if (!is.null(zipfile) && (zipfile != "")) {\n+ if (!file.exists(zipfile)) {\n+ error_message <- paste("Cannot access the Zip file:", zipfile, ". Please, contact your administrator ... if you have one!")\n print(error_message)\n stop(error_message)\n }\n- suppressWarnings(unzip(zipfile, unzip="unzip"))\n+ suppressWarnings(unzip(zipfile, unzip = "unzip"))\n \n #get the directory name\n- suppressWarnings(filesInZip <- unzip(zipfile, list=T))\n- directories <- unique(unlist(lapply(strsplit(filesInZip$Name,"/"), function(x) x[1])))\n+ suppressWarnings(filesInZip <- unzip(zipfile, list = T))\n+ directories <- unique(unlist(lapply(strsplit(filesInZip$Name, "/"), function(x) x[1])))\n directories <- directories[!(directories %in% c("__MACOSX")) & file.info(directories)$isdir]\n directory <- "."\n if (length(directories) == 1) directory <- directories\n \n- cat("files_root_directory\\t",directory,"\\n")\n+ cat("files_root_directory\\t", directory, "\\n")\n \n- filepattern <- c("[Cc][Dd][Ff]", "[Nn][Cc]", "([Mm][Zz])?[Xx][Mm][Ll]","[Mm][Zz][Dd][Aa][Tt][Aa]", "[Mm][Zz][Mm][Ll]")\n- filepattern <- paste(paste("\\\\.", filepattern, "$", sep=""),collapse="|")\n+ filepattern <- c("[Cc][Dd][Ff]", "[Nn][Cc]", "([Mm][Zz])?[Xx][Mm][Ll]", "[Mm][Zz][Dd][Aa][Tt][Aa]", "[Mm][Zz][Mm][Ll]")\n+ filepattern <- paste(paste("\\\\.", filepattern, "$", sep = ""), collapse = "|")\n info <- file.info(directory)\n- listed <- list.files(directory[info$isdir], pattern=filepattern,recursive=TRUE, full.names=TRUE)\n+ listed <- list.files(directory[info$isdir], pattern = filepattern, recursive = TRUE, full.names = TRUE)\n files <- c(directory[!info$isdir], listed)\n exists <- file.exists(files)\n files <- files[exists]\n \n }\n- return(list(zipfile=zipfile, singlefile=singlefile, files=files))\n+ return(list(zipfile = zipfile, singlefile = singlefile, files = files))\n \n }\n \n@@ -405,15 +437,15 @@\n getxcmsSetObject <- function(xobject) {\n # XCMS 1.x\n if (class(xobject) == "xcmsSet")\n- return (xobject)\n+ return(xobject)\n # XCMS 3.x\n if (class(xobject) == "XCMSnExp") {\n # Get the legacy xcmsSet object\n- suppressWarnings(xset <- as(xobject, \'xcmsSet\'))\n+ suppressWarnings(xset <- as(xobject, "xcmsSet"))\n if (!is.null(xset@phenoData$sample_group))\n sampclass(xset) <- xset@phenoData$sample_group\n else\n sampclass(xset) <- "."\n- return (xset)\n+ return(xset)\n }\n }\n' |
b |
diff -r eb15a3841da4 -r b02d1992a43a macros_xcms.xml --- a/macros_xcms.xml Tue Apr 28 09:35:10 2020 -0400 +++ b/macros_xcms.xml Wed Apr 07 16:47:14 2021 +0000 |
b |
@@ -1,7 +1,7 @@ <?xml version="1.0"?> <macros> - <token name="@TOOL_VERSION@">3.6.1</token> + <token name="@TOOL_VERSION@">3.12.0</token> <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">bioconductor-xcms</requirement> @@ -243,6 +243,7 @@ .. _xcms: https://bioconductor.org/packages/release/bioc/html/xcms.html .. _manual: http://www.bioconductor.org/packages/release/bioc/manuals/xcms/man/xcms.pdf .. _example: https://bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcms.html +.. _News: https://bioconductor.org/packages/release/bioc/news/xcms/NEWS </token> @@ -256,6 +257,11 @@ - UPGRADE: upgrade the xcms version from 3.4.4 to 3.6.1 (see XCMS News_) </token> + <token name="@HELP_XCMS_NEWVERSION_31200@"> +**Version 3.12.0+galaxy* - 03/03/2020** + +- UPGRADE: upgrade the xcms version from 3.6.1 to 3.12.0 (see XCMS News_) + </token> <xml name="citation"> <citations> |
b |
diff -r eb15a3841da4 -r b02d1992a43a repository_dependencies.xml --- a/repository_dependencies.xml Tue Apr 28 09:35:10 2020 -0400 +++ b/repository_dependencies.xml Wed Apr 07 16:47:14 2021 +0000 |
b |
@@ -1,5 +1,5 @@ <?xml version="1.0" ?> <repositories> - <repository changeset_revision="7800ba9a4c1e" name="no_unzip_datatype" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu"/> - <repository changeset_revision="544f6d2329ac" name="rdata_xcms_datatypes" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu"/> + <repository name="no_unzip_datatype" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" changeset_revision="7800ba9a4c1e"/> + <repository name="rdata_xcms_datatypes" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" changeset_revision="544f6d2329ac"/> </repositories> \ No newline at end of file |
b |
diff -r eb15a3841da4 -r b02d1992a43a test-data/faahKO.raw.RData |
b |
Binary file test-data/faahKO.raw.RData has changed |
b |
diff -r eb15a3841da4 -r b02d1992a43a test-data/faahKO_reduce.zip |
b |
Binary file test-data/faahKO_reduce.zip has changed |
b |
diff -r eb15a3841da4 -r b02d1992a43a xcms_xcmsSet.r --- a/xcms_xcmsSet.r Tue Apr 28 09:35:10 2020 -0400 +++ b/xcms_xcmsSet.r Wed Apr 07 16:47:14 2021 +0000 |
[ |
@@ -1,7 +1,7 @@ #!/usr/bin/env Rscript # ----- LOG FILE ----- -log_file <- file("log.txt", open="wt") +log_file <- file("log.txt", open = "wt") sink(log_file) sink(log_file, type = "output") @@ -10,10 +10,12 @@ cat("\tSESSION INFO\n") #Import the different functions -source_local <- function(fname){ argv <- commandArgs(trailingOnly=FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } +source_local <- function(fname) { + argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/")) +} source_local("lib.r") -pkgs <- c("xcms","batch") +pkgs <- c("xcms", "batch") loadAndDisplayPackages(pkgs) cat("\n\n"); @@ -21,7 +23,7 @@ # ----- ARGUMENTS ----- cat("\tARGUMENTS INFO\n") args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects -write.table(as.matrix(args), col.names=F, quote=F, sep='\t') +write.table(as.matrix(args), col.names = F, quote = F, sep = "\t") cat("\n\n") @@ -31,7 +33,7 @@ #saving the commun parameters BPPARAM <- MulticoreParam(1) -if (!is.null(args$BPPARAM)){ +if (!is.null(args$BPPARAM)) { BPPARAM <- MulticoreParam(args$BPPARAM) } register(BPPARAM) @@ -44,7 +46,7 @@ method <- args$method -if (!is.null(args$roiList)){ +if (!is.null(args$roiList)) { cat("\t\troiList provided\n") args$roiList <- list(getDataFrameFromFile(args$roiList)) print(args$roiList) @@ -60,7 +62,7 @@ if (!exists("raw_data")) stop("\n\nERROR: The RData doesn't contain any object called 'raw_data' which is provided by the tool: MSnbase readMSData") # Handle infiles -rawFilePath <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile, args) +rawFilePath <- retrieveRawfileInTheWorkingDir(singlefile, zipfile, args) zipfile <- rawFilePath$zipfile singlefile <- rawFilePath$singlefile @@ -79,34 +81,30 @@ if (exists("filterRtParam")) raw_data <- filterRt(raw_data, filterRtParam) if (exists("filterMzParam")) raw_data <- filterMz(raw_data, filterMzParam) #Apply this filter only if file contain MS and MSn -if(length(unique(msLevel(raw_data)))!= 1){ - raw_data <- filterMsLevel(raw_data,msLevel=1) +if (length(unique(msLevel(raw_data))) != 1) { + raw_data <- filterMsLevel(raw_data, msLevel = 1) } cat("\t\t\tChromatographic peak detection\n") # clear the arguement list to remove unexpected key/value as singlefile_galaxyPath or method ... -args <- args[names(args) %in% slotNames(do.call(paste0(method,"Param"), list()))] +args <- args[names(args) %in% slotNames(do.call(paste0(method, "Param"), list()))] -findChromPeaksParam <- do.call(paste0(method,"Param"), args) +findChromPeaksParam <- do.call(paste0(method, "Param"), args) print(findChromPeaksParam) -xdata <- findChromPeaks(raw_data, param=findChromPeaksParam) +xdata <- findChromPeaks(raw_data, param = findChromPeaksParam) # Check if there are no peaks if (nrow(chromPeaks(xdata)) == 0) stop("No peaks were detected. You should review your settings") # Create a sampleMetada file -sampleNamesList <- getSampleMetadata(xdata=xdata, sampleMetadataOutput="sampleMetadata.tsv") - -#cat("\t\t\tCompute and Store TIC and BPI\n") -#chromTIC = chromatogram(xdata, aggregationFun = "sum") -#chromBPI = chromatogram(xdata, aggregationFun = "max") +sampleNamesList <- getSampleMetadata(xdata = xdata, sampleMetadataOutput = "sampleMetadata.tsv") # Create a chromPeaks table if required if (exists("peaklistParam")) { - if(peaklistParam){ - cat("\nCreating the chromatographic peaks' table...\n") - write.table(chromPeaks(xdata), file="chromPeak_table.tsv",sep="\t",quote=F,row.names=F) - } + if (peaklistParam) { + cat("\nCreating the chromatographic peaks' table...\n") + write.table(chromPeaks(xdata), file = "chromPeak_table.tsv", sep = "\t", quote = F, row.names = F) + } } cat("\n\n") @@ -124,8 +122,8 @@ cat("\n\n") #saving R data in .Rdata file to save the variables used in the present tool -objects2save <- c("xdata", "zipfile", "singlefile", "md5sumList", "sampleNamesList") #, "chromTIC", "chromBPI") -save(list=objects2save[objects2save %in% ls()], file="xcmsSet.RData") +objects2save <- c("xdata", "zipfile", "singlefile", "md5sumList", "sampleNamesList") +save(list = objects2save[objects2save %in% ls()], file = "xcmsSet.RData") cat("\tDONE\n") |