Previous changeset 12:dcb9041cb9ea (2017-11-29) Next changeset 14:d78d3d4a82db (2018-09-19) |
Commit message:
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857 |
modified:
README.rst abims_xcms_fillPeaks.xml lib.r macros.xml static/images/xcms_fillpeaks_workflow.png test-data/faahKO-single.xset.merged.group.retcor.group.RData test-data/faahKO.xset.group.retcor.group.RData |
added:
lib-xcms3.x.x.r macros_xcms.xml test-data/faahKO-single.xset.merged.group2.retcor2.group2.RData test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.dataMatrix.NAless.tsv test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.dataMatrix.tsv test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.variableMetadata.tsv xcms_fillpeaks.r |
removed:
xcms.r |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 README.rst --- a/README.rst Wed Nov 29 09:47:20 2017 -0500 +++ b/README.rst Tue Sep 18 16:13:36 2018 -0400 |
b |
@@ -2,24 +2,37 @@ Changelog/News -------------- +**Version 3.0.0.0 - 08/03/2018** + +- UPGRADE: upgrade the xcms version from 1.46.0 to 3.0.0. So refactoring of a lot of underlying codes and methods. Some parameters may have been renamed. + +- UPDATE: since xcms 3.0.0, the selection of a method is no more needed (chrom or MSW). xcms will detect from the data the peak picking method used in findChromPeaks + +- UPDATE: since xcms 3.0.0, new parameters are available: expandMz, expandRt and ppm + + **Version 2.1.1 - 29/11/2017** - BUGFIX: To avoid issues with accented letter in the parentFile tag of the mzXML files, we changed a hidden mechanim to LC_ALL=C + **Version 2.1.0 - 07/02/2017** - IMPROVEMENT: change the management of the peaklist ids. The main ids remain the same as xcms generated. The export setiings now only add custom names in the variableMetadata tab (namecustom) - IMPROVEMENT: xcms.fillpeaks can deal with merged individual data + **Version 2.0.8 - 22/12/2016** -- IMPROVEMENT: Add an option to export the peak list at this step without have to wait camara.annotate +- IMPROVEMENT: Add an option to export the peak list at this step without having to wait for CAMERA.annotate + **Version 2.0.7 - 06/07/2016** - UPGRADE: upgrate the xcms version from 1.44.0 to 1.46.0 + **Version 2.0.6 - 04/04/2016** - TEST: refactoring to pass planemo test using conda dependencies |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 abims_xcms_fillPeaks.xml --- a/abims_xcms_fillPeaks.xml Wed Nov 29 09:47:20 2017 -0500 +++ b/abims_xcms_fillPeaks.xml Tue Sep 18 16:13:36 2018 -0400 |
[ |
b'@@ -1,22 +1,24 @@\n-<tool id="abims_xcms_fillPeaks" name="xcms.fillPeaks" version="2.1.1">\n+<tool id="abims_xcms_fillPeaks" name="xcms fillChromPeaks (fillPeaks)" version="@WRAPPER_VERSION@.0">\n \n- <description>Integrate a sample\'s signal in regions where peak groups are not represented to create new peaks in missing areas</description>\n+ <description>Integrate areas of missing peaks</description>\n \n <macros>\n <import>macros.xml</import>\n+ <import>macros_xcms.xml</import>\n </macros>\n \n <expand macro="requirements"/>\n <expand macro="stdio"/>\n \n <command><![CDATA[\n- @COMMAND_XCMS_SCRIPT@\n- xfunction fillPeaks\n+ @COMMAND_RSCRIPT@/xcms_fillpeaks.r\n+\n image \'$image\'\n \n- xsetRdataOutput \'$xsetRData\'\n-\n- method $method\n+ ## Advanced\n+ expandMz $Adv.expandMz\n+ expandRt $Adv.expandRt\n+ ppm $Adv.ppm\n \n @COMMAND_PEAKLIST@\n \n@@ -27,11 +29,13 @@\n ]]></command>\n \n <inputs>\n- <param name="image" type="data" format="rdata.xcms.group,rdata" label="xset RData file" help="output file from another xcms function (group)" />\n- <param name="method" type="select" label="Filling method" help="[method] See the help section below">\n- <option value="chrom" selected="true">chrom</option>\n- <option value="MSW" >MSW</option>\n- </param>\n+ <param name="image" type="data" format="rdata.xcms.group,rdata" label="@INPUT_IMAGE_LABEL@" help="@INPUT_IMAGE_HELP@ from groupChromPeaks" />\n+\n+ <section name="Adv" title="Advanced Options" expanded="False">\n+ <param argument="expandMz" type="integer" value="0" label="Value by which the mz width of peaks should be expanded" help="Each peak is expanded in mz direction by \xe2\x80\x98expandMz *\xe2\x80\x99 their original mz width. A value of \xe2\x80\x980\xe2\x80\x99 means no expansion, a value of \xe2\x80\x981\xe2\x80\x99 grows each peak by 1 * the mz width of the peak resulting in peakswith twice their original size in mz direction (expansion by half mz width to both sides)." />\n+ <param argument="expandRt" type="integer" value="0" label="Value by which the RT width of peaks should be expanded" help="Each peak is expanded in RT direction by \xe2\x80\x98expandRt *\xe2\x80\x99 their original RT width. A value of \xe2\x80\x980\xe2\x80\x99 means no expansion, a value of \xe2\x80\x981\xe2\x80\x99 grows each peak by 1 * the RT width of the peak resulting in peakswith twice their original size in RT direction (expansion by half RT width to both sides)."/>\n+ <param argument="ppm" type="integer" value="0" label="Specifying a ppm by which the mz width of the peak region should be expanded" help="For peaks with an mz width smaller than \xe2\x80\x98mean(c(mzmin, mzmax)) * ppm / 1e6\xe2\x80\x99, the \xe2\x80\x98mzmin\xe2\x80\x99 will be replaced by \xe2\x80\x98mean(c(mzmin, mzmax)) - (mean(c(mzmin, mzmax)) * ppm / 2 / 1e6)\xe2\x80\x99 and \xe2\x80\x98mzmax\xe2\x80\x99 by \xe2\x80\x98mean(c(mzmin, mzmax)) + (mean(c(mzmin, mzmax)) * ppm / 2 / 1e6)\xe2\x80\x99. This is applied before eventually expanding the mz width using the \xe2\x80\x98expandMz\xe2\x80\x99 parameter." />\n+ </section>\n \n <expand macro="input_peaklist"/>\n \n@@ -40,72 +44,111 @@\n </inputs>\n \n <outputs>\n- <data name="xsetRData" format="rdata.xcms.fillpeaks" label="${image.name[:-6]}.fillPeaks.RData" />\n+ <data name="xsetRData" format="rdata.xcms.fillpeaks" label="${image.name[:-6]}.fillChromPeaks.RData" from_work_dir="fillpeaks.RData" />\n <expand macro="output_peaklist" function="fillpeaks" />\n- <data name="log" format="txt" label="xset.log.txt" hidden="true" />\n </outputs>\n \n <tests>\n <!--<test>\n- <param name="image" value="xset.group.retcor.group.RData"/>\n+ <param name="image" value="xset.group.retcor.group.RData" ftype="rdata"/>\n <param name="method" value="chrom"/>\n <param name="zip_file" value="sacuri_dir_root.zip" ftype="zip" />\n- <output name="log">\n- <assert_contents>\n- <has_text text="object with 4 sample'..b"spectra.\n-\n-\n-Get a Peak List\n----------------\n+.. _fillChromPeaks_manual: https://rdrr.io/bioc/xcms/man/fillChromPeaks.html\n \n-If 'true', the module generates two additional files corresponding to the peak list:\n-- the variable metadata file (corresponding to information about extracted ions such as mass or retention time)\n-- the data matrix (corresponding to related intensities)\n-\n-**decimal places for [mass or retention time] values in identifiers**\n+@HELP_XCMS_MANUAL@\n \n- | Ions' identifiers are constructed as MxxxTyyy where 'xxx' is the ion median mass and 'yyy' the ion median retention time.\n- | Two parameters are used to adjust the number of decimal places wanted in identifiers for mass and retention time respectively.\n- | Theses parameters do not affect decimal places in columns other than the identifier one.\n-\n-**Reported intensity values**\n-\n- | This parameter determines which values should be reported as intensities in the dataMatrix table; it correspond to xcms 'intval' parameter:\n- | - into: integrated area of original (raw) peak\n- | - maxo: maximum intensity of original (raw) peak\n- | - intb: baseline corrected integrated peak area (only available if peak detection was done by \xe2\x80\x98findPeaks.centWave\xe2\x80\x99)\n+@HELP_PEAKLIST@\n \n ------------\n Output files\n@@ -222,45 +220,9 @@\n \n xset.fillPeaks.RData : rdata.xcms.fillpeaks format\n \n- | Rdata file that will be used in the **CAMERA.annotate** or **xcms.summary** step of the workflow.\n-\n-xset.variableMetadata.tsv : tabular format\n-\n- | Table containing information about ions; can be used as one input of **Quality_Metrics** or **Generic_filter** modules.\n-\n-xset.dataMatrix.tsv : tabular format\n-\n- | Table containing ions' intensities; can be used as one input of **Quality_Metrics** or **Generic_filter** modules.\n-\n-------\n-\n-.. class:: infomark\n-\n-The output file is a xset.fillPeaks.RData file. You can continue your analysis using it in **CAMERA.annotate** or **xcms.summary** tool.\n-\n-\n----------------------------------------------------\n+ | Rdata file that will be used in the **CAMERA.annotate** or **xcms.process_history** step of the workflow.\n \n----------------\n-Working example\n----------------\n-\n-Input files\n------------\n-\n- | RData file -> **xset.retcor.RData**\n-\n-Parameters\n-----------\n-\n- | method -> **chrom**\n- | Get a Peak List -> **false**\n-\n-\n-Output files\n-------------\n-\n- | **xset.fillPeaks.RData: RData file**\n+@HELP_PEAKLIST_OUTPUT@\n \n \n ---------------------------------------------------\n@@ -268,28 +230,42 @@\n Changelog/News\n --------------\n \n+**Version 3.0.0.0 - 08/03/2018**\n+\n+- UPGRADE: upgrade the xcms version from 1.46.0 to 3.0.0. So refactoring of a lot of underlying codes and methods. Some parameters may have been renamed.\n+\n+- UPDATE: since xcms 3.0.0, the selection of a method is no more needed (chrom or MSW). xcms will detect from the data the peak picking method used in findChromPeaks\n+\n+- UPDATE: since xcms 3.0.0, new parameters are available: expandMz, expandRt and ppm\n+\n+\n **Version 2.1.1 - 29/11/2017**\n \n - BUGFIX: To avoid issues with accented letter in the parentFile tag of the mzXML files, we changed a hidden mechanim to LC_ALL=C\n \n+\n **Version 2.1.0 - 07/02/2017**\n \n - IMPROVEMENT: change the management of the peaklist ids. The main ids remain the same as xcms generated. The export setiings now only add custom names in the variableMetadata tab (namecustom)\n \n - IMPROVEMENT: xcms.fillpeaks can deal with merged individual data\n \n+\n **Version 2.0.8 - 22/12/2016**\n \n - IMPROVEMENT: Add an option to export the peak list at this step without having to wait for CAMERA.annotate\n \n+\n **Version 2.0.7 - 06/07/2016**\n \n - UPGRADE: upgrate the xcms version from 1.44.0 to 1.46.0\n \n+\n **Version 2.0.6 - 04/04/2016**\n \n - TEST: refactoring to pass planemo test using conda dependencies\n \n+\n **Version 2.0.5 - 10/02/2016**\n \n - BUGFIX: better management of errors. Datasets remained green although the process failed\n" |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 lib-xcms3.x.x.r --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib-xcms3.x.x.r Tue Sep 18 16:13:36 2018 -0400 |
[ |
@@ -0,0 +1,152 @@ + + +#@TODO: remove this function as soon as we can use xcms 3.x.x from Bioconductor 3.7 +# https://github.com/sneumann/xcms/issues/250 +groupnamesW4M <- function(xdata, mzdec = 0, rtdec = 0) { + mzfmt <- paste("%.", mzdec, "f", sep = "") + rtfmt <- paste("%.", rtdec, "f", sep = "") + + gnames <- paste("M", sprintf(mzfmt, featureDefinitions(xdata)[,"mzmed"]), "T", + sprintf(rtfmt, featureDefinitions(xdata)[,"rtmed"]), sep = "") + + if (any(dup <- duplicated(gnames))) + for (dupname in unique(gnames[dup])) { + dupidx <- which(gnames == dupname) + gnames[dupidx] <- paste(gnames[dupidx], seq(along = dupidx), sep = "_") + } + + return (gnames) +} + +#@TODO: remove this function as soon as we can use xcms 3.x.x from Bioconductor 3.7 +# https://github.com/sneumann/xcms/issues/247 +.concatenate_XCMSnExp <- function(...) { + x <- list(...) + if (length(x) == 0) + return(NULL) + if (length(x) == 1) + return(x[[1]]) + ## Check that all are XCMSnExp objects. + if (!all(unlist(lapply(x, function(z) is(z, "XCMSnExp"))))) + stop("All passed objects should be 'XCMSnExp' objects") + new_x <- as(.concatenate_OnDiskMSnExp(...), "XCMSnExp") + ## If any of the XCMSnExp has alignment results or detected features drop + ## them! + x <- lapply(x, function(z) { + if (hasAdjustedRtime(z)) { + z <- dropAdjustedRtime(z) + warning("Adjusted retention times found, had to drop them.") + } + if (hasFeatures(z)) { + z <- dropFeatureDefinitions(z) + warning("Feature definitions found, had to drop them.") + } + z + }) + ## Combine peaks + fls <- lapply(x, fileNames) + startidx <- cumsum(lengths(fls)) + pks <- lapply(x, chromPeaks) + procH <- lapply(x, processHistory) + for (i in 2:length(fls)) { + pks[[i]][, "sample"] <- pks[[i]][, "sample"] + startidx[i - 1] + procH[[i]] <- lapply(procH[[i]], function(z) { + z@fileIndex <- as.integer(z@fileIndex + startidx[i - 1]) + z + }) + } + pks <- do.call(rbind, pks) + new_x@.processHistory <- unlist(procH) + chromPeaks(new_x) <- pks + if (validObject(new_x)) + new_x +} + +#@TODO: remove this function as soon as we can use xcms 3.x.x from Bioconductor 3.7 +# https://github.com/sneumann/xcms/issues/247 +.concatenate_OnDiskMSnExp <- function(...) { + x <- list(...) + if (length(x) == 0) + return(NULL) + if (length(x) == 1) + return(x[[1]]) + ## Check that all are XCMSnExp objects. + if (!all(unlist(lapply(x, function(z) is(z, "OnDiskMSnExp"))))) + stop("All passed objects should be 'OnDiskMSnExp' objects") + ## Check processingQueue + procQ <- lapply(x, function(z) z@spectraProcessingQueue) + new_procQ <- procQ[[1]] + is_ok <- unlist(lapply(procQ, function(z) + !is.character(all.equal(new_procQ, z)) + )) + if (any(!is_ok)) { + warning("Processing queues from the submitted objects differ! ", + "Dropping the processing queue.") + new_procQ <- list() + } + ## processingData + fls <- lapply(x, function(z) z@processingData@files) + startidx <- cumsum(lengths(fls)) + ## featureData + featd <- lapply(x, fData) + ## Have to update the file index and the spectrum names. + for (i in 2:length(featd)) { + featd[[i]]$fileIdx <- featd[[i]]$fileIdx + startidx[i - 1] + rownames(featd[[i]]) <- MSnbase:::formatFileSpectrumNames( + fileIds = featd[[i]]$fileIdx, + spectrumIds = featd[[i]]$spIdx, + nSpectra = nrow(featd[[i]]), + nFiles = length(unlist(fls)) + ) + } + featd <- do.call(rbind, featd) + featd$spectrum <- 1:nrow(featd) + ## experimentData + expdata <- lapply(x, function(z) { + ed <- z@experimentData + data.frame(instrumentManufacturer = ed@instrumentManufacturer, + instrumentModel = ed@instrumentModel, + ionSource = ed@ionSource, + analyser = ed@analyser, + detectorType = ed@detectorType, + stringsAsFactors = FALSE) + }) + expdata <- do.call(rbind, expdata) + expdata <- new("MIAPE", + instrumentManufacturer = expdata$instrumentManufacturer, + instrumentModel = expdata$instrumentModel, + ionSource = expdata$ionSource, + analyser = expdata$analyser, + detectorType = expdata$detectorType) + + ## protocolData + protodata <- lapply(x, function(z) z@protocolData) + if (any(unlist(lapply(protodata, nrow)) > 0)) + warning("Found non-empty protocol data, but merging protocol data is", + " currently not supported. Skipped.") + ## phenoData + pdata <- do.call(rbind, lapply(x, pData)) + res <- new( + "OnDiskMSnExp", + phenoData = new("NAnnotatedDataFrame", data = pdata), + featureData = new("AnnotatedDataFrame", featd), + processingData = new("MSnProcess", + processing = paste0("Concatenated [", date(), "]"), + files = unlist(fls), smoothed = NA), + experimentData = expdata, + spectraProcessingQueue = new_procQ) + if (validObject(res)) + res +} + +#@TODO: remove this function as soon as we can use xcms 3.x.x from Bioconductor 3.7 +# https://github.com/sneumann/xcms/issues/247 +c.XCMSnExp <- function(...) { + .concatenate_XCMSnExp(...) +} + +#@TODO: remove this function as soon as we can use xcms 3.x.x from Bioconductor 3.7 +# https://github.com/sneumann/xcms/issues/247 +c.MSnbase <- function(...) { + .concatenate_OnDiskMSnExp(...) +} |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 lib.r --- a/lib.r Wed Nov 29 09:47:20 2017 -0500 +++ b/lib.r Tue Sep 18 16:13:36 2018 -0400 |
[ |
b'@@ -1,319 +1,269 @@\n-#Authors ABiMS TEAM\n-#Lib.r for Galaxy Workflow4Metabolomics xcms tools\n-#\n-#version 2.4: lecorguille\n-# add getPeaklistW4M\n-#version 2.3: yguitton\n-# correction for empty PDF when only 1 class\n-#version 2.2\n-# correct bug in Base Peak Chromatogram (BPC) option, not only TIC when scanrange used in xcmsSet\n-# Note if scanrange is used a warning is prompted in R console but do not stop PDF generation\n-#version 2.1: yguitton\n-# Modifications made by Guitton Yann\n+#@authors ABiMS TEAM, Y. Guitton\n+# lib.r for Galaxy Workflow4Metabolomics xcms tools\n+\n+#@author G. Le Corguille\n+# solve an issue with batch if arguments are logical TRUE/FALSE\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+ }\n+ return(args)\n+}\n \n+#@author G. Le Corguille\n+# This function will\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+\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+ cat("Other loaded packages:\\n")\n+ for (pkg in names(sessioninfo$loadedOnly)) { cat(paste(pkg,packageVersion(pkg)),"\\t") }; cat("\\n")\n+}\n+\n+#@author G. Le Corguille\n+# This function merge several chromBPI or chromTIC into one.\n+mergeChrom <- function(chrom_merged, chrom) {\n+ if (is.null(chrom_merged)) return(NULL)\n+ chrom_merged@.Data <- cbind(chrom_merged@.Data, chrom@.Data)\n+ return(chrom_merged)\n+}\n \n #@author G. Le Corguille\n-#This function convert if it is required the Retention Time in minutes\n+# This function merge several xdata into one.\n+mergeXData <- function(args) {\n+ chromTIC <- NULL\n+ chromBPI <- NULL\n+ chromTIC_adjusted <- NULL\n+ chromBPI_adjusted <- NULL\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 <- getRawfilePathFromArguments(singlefile, zipfile, args)\n+ zipfile <- rawFilePath$zipfile\n+ singlefile <- rawFilePath$singlefile\n+ retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)\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+\n+ if (!exists("xdata_merged")) {\n+ xdata_merged <- xdata\n+ singlefile_merged <- singlefile\n+ md5sumList_merged <- md5sumList\n+ sampleNamesList_merged <- sampleNamesList\n+ chromTIC_merged <- chromTIC\n+ chromBPI_merged <- chromBPI\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 <- .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$sampleNamesMakeNam'..b'ile[[singlefile_sampleName]] = singlefile_galaxyPath\n- }\n- }\n- for (argument in c("zipfile","zipfilePositive","zipfileNegative","singlefile_galaxyPath","singlefile_sampleName","singlefile_galaxyPathPositive","singlefile_sampleNamePositive","singlefile_galaxyPathNegative","singlefile_sampleNameNegative")) {\n- listArguments[[argument]]=NULL\n- }\n- return(list(zipfile=zipfile, singlefile=singlefile, listArguments=listArguments))\n+ }\n+ return(list(zipfile=zipfile, singlefile=singlefile))\n }\n \n-\n # This function retrieve the raw file in the working directory\n # - if zipfile: unzip the file with its directory tree\n # - if singlefiles: set symlink with the good filename\n+#@author Gildas Le Corguille lecorguille@sb-roscoff.fr\n retrieveRawfileInTheWorkingDirectory <- function(singlefile, zipfile) {\n if(!is.null(singlefile) && (length("singlefile")>0)) {\n for (singlefile_sampleName in names(singlefile)) {\n- singlefile_galaxyPath = singlefile[[singlefile_sampleName]]\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+ 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- file.symlink(singlefile_galaxyPath,singlefile_sampleName)\n+ if (!suppressWarnings( try (file.link(singlefile_galaxyPath, singlefile_sampleName), silent=T)))\n+ file.copy(singlefile_galaxyPath, singlefile_sampleName)\n+\n }\n- directory = "."\n+ directory <- "."\n \n }\n- if(!is.null(zipfile) && (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+ 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 \n #list all file in the zip file\n- #zip_files=unzip(zipfile,list=T)[,"Name"]\n+ #zip_files <- unzip(zipfile,list=T)[,"Name"]\n \n #unzip\n suppressWarnings(unzip(zipfile, unzip="unzip"))\n \n #get the directory name\n- 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+ 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 \n }\n return (directory)\n }\n+\n+\n+# This function retrieve a xset like object\n+#@author Gildas Le Corguille lecorguille@sb-roscoff.fr\n+getxcmsSetObject <- function(xobject) {\n+ # XCMS 1.x\n+ if (class(xobject) == "xcmsSet")\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+ if (!is.null(xset@phenoData$sample_group))\n+ sampclass(xset) <- xset@phenoData$sample_group\n+ else\n+ sampclass(xset) <- "."\n+ return (xset)\n+ }\n+}\n' |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 macros.xml --- a/macros.xml Wed Nov 29 09:47:20 2017 -0500 +++ b/macros.xml Tue Sep 18 16:13:36 2018 -0400 |
[ |
@@ -1,141 +1,52 @@ <?xml version="1.0"?> <macros> - <xml name="requirements"> - <requirements> - <requirement type="package" version="0.4_1">r-snow</requirement> - <requirement type="package" version="1.46.0">bioconductor-xcms</requirement> - <requirement type="package" version="1.1_4">r-batch</requirement> - </requirements> - </xml> - <xml name="requirements_light"> - <requirements> - <requirement type="package" version="1.46.0">bioconductor-xcms</requirement> - </requirements> - </xml> <xml name="stdio"> <stdio> <exit_code range="1" level="fatal" /> </stdio> </xml> - <token name="@COMMAND_XCMS_SCRIPT@"> - LC_ALL=C Rscript $__tool_directory__/xcms.r - </token> + <!-- COMMAND --> + <token name="@COMMAND_RSCRIPT@">LC_ALL=C Rscript $__tool_directory__/</token> <token name="@COMMAND_LOG_EXIT@"> ; return=\$?; - mv log.txt '$log'; - cat '$log'; + cat 'log.txt'; sh -c "exit \$return" </token> - <!-- zipfile load for planemo test --> - - <token name="@COMMAND_FILE_LOAD@"> - #if $file_load_section.file_load_conditional.file_load_select == "yes": - #if $file_load_section.file_load_conditional.input[0].is_of_type("mzxml") or $file_load_section.file_load_conditional.input[0].is_of_type("mzml") or $file_load_section.file_load_conditional.input[0].is_of_type("mzdata") or $file_load_section.file_load_conditional.input[0].is_of_type("netcdf"): - #set singlefile_galaxyPath = ','.join( [ str( $single_file ) for $single_file in $file_load_section.file_load_conditional.input ] ) - #set singlefile_sampleName = ','.join( [ str( $single_file.name ) for $single_file in $file_load_section.file_load_conditional.input ] ) - - singlefile_galaxyPath '$singlefile_galaxyPath' singlefile_sampleName '$singlefile_sampleName' - #else - zipfile '$file_load_section.file_load_conditional.input' - #end if - #end if - </token> - - <xml name="input_file_load"> - <section name="file_load_section" title="Resubmit your raw dataset or your zip file"> - <conditional name="file_load_conditional"> - <param name="file_load_select" type="select" label="Resubmit your dataset or your zip file" help="Use only if you get a message which say that your original dataset or zip file have been deleted on the server." > - <option value="no" >no need</option> - <option value="yes" >yes</option> - </param> - <when value="no"> - </when> - <when value="yes"> - <param name="input" type="data" format="mzxml,mzml,mzdata,netcdf,no_unzip.zip,zip" multiple="true" label="File(s) from your history containing your chromatograms" help="Single file mode for the format: mzxml, mzml, mzdata and netcdf. Zip file mode for the format: no_unzip.zip, zip. See the help section below." /> - </when> - </conditional> - </section> + <!-- INPUT_VALIDATORS --> + <xml name="input_validator_range_integer"> + <validator type="regex" message="The format is 'min,max'" >[0-9]+ *, *[0-9]+</validator> </xml> - <xml name="test_file_load_zip"> - <section name="file_load_section"> - <conditional name="file_load_conditional"> - <param name="file_load_select" value="yes" /> - <param name="input" value="faahKO_reduce.zip" ftype="zip" /> - </conditional> - </section> + <xml name="input_validator_range_float"> + <validator type="regex" message="The format is 'min,max'" >[0-9]+\.?[0-9]* *, *[0-9]+\.?[0-9]*</validator> </xml> - <xml name="test_file_load_single"> - <section name="file_load_section"> - <conditional name="file_load_conditional"> - <param name="file_load_select" value="yes" /> - <param name="input" value="wt15.CDF,ko16.CDF,ko15.CDF,wt16.CDF" ftype="netcdf" /> - </conditional> - </section> + <xml name="input_validator_list_integer"> + <validator type="regex" message="The format is '1,2,4,6'" >[0-9, ]+</validator> </xml> - <token name="@COMMAND_PEAKLIST@"> - #if $peaklist.peaklistBool - variableMetadataOutput '$variableMetadata' - dataMatrixOutput '$dataMatrix' - convertRTMinute $peaklist.convertRTMinute - numDigitsMZ $peaklist.numDigitsMZ - numDigitsRT $peaklist.numDigitsRT - intval $peaklist.intval - #end if - </token> + + <token name="@INPUT_IMAGE_LABEL@">RData file</token> + <token name="@INPUT_IMAGE_HELP@">It contains a xcms3::XCMSnExp object (named xdata)</token> - <xml name="input_peaklist"> - <conditional name="peaklist"> - <param name="peaklistBool" type="boolean" label="Get a Peak List" /> - <when value="true"> - <param name="convertRTMinute" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Convert retention time (seconds) into minutes" help="Convert the columns rtmed, rtmin and rtmax into minutes"/> - <param name="numDigitsMZ" type="integer" value="4" label="Number of decimal places for mass values reported in ions' identifiers." help="A minimum of 4 decimal places is recommended. Useful to avoid duplicates within identifiers" /> - <param name="numDigitsRT" type="integer" value="0" label="Number of decimal places for retention time values reported in ions' identifiers." help="Useful to avoid duplicates within identifiers" /> - <param name="intval" type="select" label="Reported intensity values" help="[intval] See the help section below"> - <option value="into" selected="true">into</option> - <option value="maxo">maxo</option> - <option value="intb">intb</option> - </param> - </when> - <when value="false" /> - </conditional> - </xml> - <xml name="output_peaklist" token_function=""> - <data name="variableMetadata" format="tabular" label="${image.name[:-6]}.@FUNCTION@.variableMetadata.tsv"> - <filter>(peaklist['peaklistBool'])</filter> - </data> - <data name="dataMatrix" format="tabular" label="${image.name[:-6]}.@FUNCTION@.dataMatrix.tsv" > - <filter>(peaklist['peaklistBool'])</filter> - </data> - </xml> - - <token name="@HELP_AUTHORS@"> -.. class:: infomark - -**Authors** Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu + <!-- MISC --> + <token name="@HELP_AUTHORS_WRAPPERS@"> .. class:: infomark -**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff and Yann Guitton yann.guitton@oniris-nantes.fr - part of Workflow4Metabolomics.org [W4M] +**Galaxy integration** ABiMS TEAM - SU/CNRS - Station biologique de Roscoff and Yann Guitton - LABERCA +Part of Workflow4Metabolomics.org [W4M] | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool. ---------------------------------------------------- - </token> - - <xml name="citation"> - <citations> - <citation type="doi">10.1021/ac051437y</citation> + <xml name="citation_w4m"> <citation type="doi">10.1093/bioinformatics/btu813</citation> - </citations> </xml> </macros> |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 macros_xcms.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros_xcms.xml Tue Sep 18 16:13:36 2018 -0400 |
[ |
b'@@ -0,0 +1,244 @@\n+<?xml version="1.0"?>\n+<macros>\n+\n+ <token name="@WRAPPER_VERSION@">3.0.0</token>\n+ <xml name="requirements">\n+ <requirements>\n+ <requirement type="package" version="@WRAPPER_VERSION@">bioconductor-xcms</requirement>\n+ <requirement type="package" version="1.1_4">r-batch</requirement>\n+ <requirement type="package" version="1.1_2">r-rcolorbrewer</requirement>\n+ <requirement type="package" version="6.0">unzip</requirement>\n+ <yield />\n+ </requirements>\n+ </xml>\n+\n+ <!-- FILE_LOAD for planemo test -->\n+ <token name="@COMMAND_FILE_LOAD@">\n+ #if $file_load_section.file_load_conditional.file_load_select == "yes":\n+ #if $file_load_section.file_load_conditional.input[0].is_of_type("mzxml") or $file_load_section.file_load_conditional.input[0].is_of_type("mzml") or $file_load_section.file_load_conditional.input[0].is_of_type("mzdata") or $file_load_section.file_load_conditional.input[0].is_of_type("netcdf"):\n+ #set singlefile_galaxyPath = \'|\'.join( [ str( $single_file ) for $single_file in $file_load_section.file_load_conditional.input ] )\n+ #set singlefile_sampleName = \'|\'.join( [ str( $single_file.name ) for $single_file in $file_load_section.file_load_conditional.input ] )\n+\n+ singlefile_galaxyPath \'$singlefile_galaxyPath\' singlefile_sampleName \'$singlefile_sampleName\'\n+ #else\n+ zipfile \'$file_load_section.file_load_conditional.input\'\n+ #end if\n+ #end if\n+ </token>\n+\n+ <xml name="input_file_load">\n+ <section name="file_load_section" title="Resubmit your raw dataset or your zip file">\n+ <conditional name="file_load_conditional">\n+ <param name="file_load_select" type="select" label="Resubmit your dataset or your zip file" help="Use only if you get a message saying that your original dataset or zip file have been deleted on the server." >\n+ <option value="no" >no need</option>\n+ <option value="yes" >yes</option>\n+ </param>\n+ <when value="no">\n+ </when>\n+ <when value="yes">\n+ <param name="input" type="data" format="mzxml,mzml,mzdata,netcdf,no_unzip.zip,zip" multiple="true" label="File(s) from your history containing your chromatograms" help="Single file mode for the format: mzxml, mzml, mzdata and netcdf. Zip file mode for the format: no_unzip.zip, zip. See the help section below." />\n+ </when>\n+ </conditional>\n+ </section>\n+ </xml>\n+\n+ <xml name="test_file_load_zip">\n+ <section name="file_load_section">\n+ <conditional name="file_load_conditional">\n+ <param name="file_load_select" value="yes" />\n+ <param name="input" value="faahKO_reduce.zip" ftype="zip" />\n+ </conditional>\n+ </section>\n+ </xml>\n+\n+ <xml name="test_file_load_zip_sacuri">\n+ <section name="file_load_section">\n+ <conditional name="file_load_conditional">\n+ <param name="file_load_select" value="yes" />\n+ <param name="input" value="sacuri_dir_root.zip" ftype="zip" />\n+ </conditional>\n+ </section>\n+ </xml>\n+\n+ <xml name="test_file_load_single">\n+ <section name="file_load_section">\n+ <conditional name="file_load_conditional">\n+ <param name="file_load_select" value="yes" />\n+ <param name="input" value="wt15.CDF,ko16.CDF,ko15.CDF,wt16.CDF" ftype="netcdf" />\n+ </conditional>\n+ </section>\n+ </xml>\n+\n+ <xml name="test_file_load_single_ko15">\n+ <section name="file_load_section">\n+ <conditional name="file_load_conditional">\n+ <param name="file_load_select" value="yes" />\n+ <param name="input" value="ko15.CDF" ftype="netcdf" />\n+'..b'the m/z value at the peak apex and the m/z values left and right of it</option>\n+ <option value="meanApex3">mean of the m/z value of the peak apex and the m/z values left and right of it</option>\n+ </param>\n+ <param argument="integrate" type="select" label="Integration method" >\n+ <option value="1">peak limits are found through descent on the mexican hat filtered data (more robust, but less exact)</option>\n+ <option value="2">peak limits based on real data (more accurate but prone to noise)</option>\n+ </param>\n+ <param argument="mzdiff" type="float" value="-0.001" label="Minimum difference in m/z for peaks with overlapping retention times" help="can be negative to allow overlap" />\n+ <param argument="fitgauss" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="fitgauss" help="whether or not a Gaussian should be fitted to each peak" />\n+ <param argument="noise" type="integer" value="0" label="Noise filter" help="allowing to set a minimum intensity required for centroids to be considered in the first analysis step (centroids with intensity lower than \xe2\x80\x98noise\xe2\x80\x99 are omitted from ROI detection)." />\n+ <param argument="verboseColumns" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="verbose Columns" help="whether additional peak meta data columns should be returned" />\n+ </xml>\n+\n+ <token name="@COMMAND_CENTWAVEADVROI@">\n+ #if $sectionROI.roiList:\n+ roiList \'$sectionROI.roiList\'\n+ firstBaselineCheck $sectionROI.firstBaselineCheck\n+ #if $sectionROI.roiScales != "":\n+ roiScales "c($sectionROI.roiScales)"\n+ #end if\n+ #end if\n+ </token>\n+\n+ <xml name="input_centwaveAdvROI" token_optional="true">\n+ <param argument="roiList" type="data" format="tabular" optional="@OPTIONAL@" label="List of regions-of-interest (ROI) representing detected mass traces" help="If ROIs are submitted the first analysis step is omitted and chromatographic peak detection is performed on the submitted ROIs. Each ROI is expected to have the following elements specified: \xe2\x80\x98scmin\xe2\x80\x99 (start scan index), \xe2\x80\x98scmax\xe2\x80\x99 (end scan index), \xe2\x80\x98mzmin\xe2\x80\x99 (minimum m/z), \xe2\x80\x98mzmax\xe2\x80\x99 (maximum m/z), \xe2\x80\x98length\xe2\x80\x99 (number of scans), \xe2\x80\x98intensity\xe2\x80\x99 (summed intensity)." />\n+ <param argument="firstBaselineCheck" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Is continuous data within regions of interest is checked to be above the first baseline." />\n+ <param argument="roiScales" type="text" value="" optional="true" label="Numeric vector defining the scale for each region of interest in \xe2\x80\x98roiList\xe2\x80\x99" help="Length equal to \xe2\x80\x98roiList\xe2\x80\x99 - Should be used for the centWave-wavelets (format 0.9,1,0.2)">\n+ <expand macro="input_validator_range_float"/>\n+ </param>\n+ </xml>\n+\n+ <!-- MISC -->\n+ <token name="@HELP_AUTHORS@">\n+.. class:: infomark\n+\n+**Authors** Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu\n+\n+@HELP_AUTHORS_WRAPPERS@\n+\n+---------------------------------------------------\n+\n+ </token>\n+\n+ <token name="@HELP_XCMS_MANUAL@">\n+\n+For details and explanations concerning all the parameters and workflow of xcms_ package, see its manual_ and this example_\n+\n+.. _xcms: https://bioconductor.org/packages/release/bioc/html/xcms.html\n+.. _manual: http://www.bioconductor.org/packages/release/bioc/manuals/xcms/man/xcms.pdf\n+.. _example: https://bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcms.html\n+\n+ </token>\n+\n+ <xml name="citation">\n+ <citations>\n+ <citation type="doi">10.1021/ac051437y</citation>\n+ <expand macro="citation_w4m"/>\n+ </citations>\n+ </xml>\n+</macros>\n' |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 static/images/xcms_fillpeaks_workflow.png |
b |
Binary file static/images/xcms_fillpeaks_workflow.png has changed |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 test-data/faahKO-single.xset.merged.group.retcor.group.RData |
b |
Binary file test-data/faahKO-single.xset.merged.group.retcor.group.RData has changed |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 test-data/faahKO-single.xset.merged.group2.retcor2.group2.RData |
b |
Binary file test-data/faahKO-single.xset.merged.group2.retcor2.group2.RData has changed |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 test-data/faahKO.xset.group.retcor.group.RData |
b |
Binary file test-data/faahKO.xset.group.retcor.group.RData has changed |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.dataMatrix.NAless.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.dataMatrix.NAless.tsv Tue Sep 18 16:13:36 2018 -0400 |
b |
b'@@ -0,0 +1,6333 @@\n+name\tko15\tko16\twt15\twt16\n+M200T3488\t6029.94499999992\t1646.69331417609\t0\t0\n+M200T3544\t0\t0\t4586.52650000006\t0\n+M200T3882\t1144.01499999999\t1716.38461192716\t1449.84316738066\t0\n+M200T3822\t0\t0\t1018.81499999998\t0\n+M200T3184\t0\t4333.4849999999\t0\t0\n+M200T2867\t76879.3654931277\t506848.884266667\t53985.4351594335\t76607.9704340259\n+M200T3978\t1324.38867325921\t0\t495.468308772648\t1242.61000000004\n+M200T3681\t0\t645.622409362349\t5108.15999999988\t1576.85791107837\n+M201T3788\t0\t0\t1680.81000000006\t0\n+M201T3536\t0\t2863.6449999999\t0\t1106.33802122178\n+M201T4052\t318.548929605957\t205.380230930156\t1339.64000000005\t689.071631937096\n+M201T3276\t0\t1497.96219436021\t4090.91000000014\t1027.56552966783\n+M201T3630\t0\t0\t2121.84236212046\t2931.24499999993\n+M201T2590\t0\t14307.2299999999\t0\t0\n+M201T3985\t0\t0\t1657.33500000006\t0\n+M201T3138\t27830.0354581329\t254581.758476187\t63151.125622074\t28083.6051504647\n+M201T3693\t0\t0\t2906.20499999993\t0\n+M201T3511\t4023.61499999999\t694.250350240936\t0\t0\n+M201T3790\t446.184819684897\t1118.41040705157\t0\t3245.80999999992\n+M201T4047\t0\t0\t1275.47500000004\t1220.69999999998\n+M201T3925\t128.578946259232\t0\t1284.72816666668\t0\n+M201T3874\t886.610568446999\t1220.70000000004\t521.172821104497\t0\n+M201T4152\t0\t774.575999999962\t0\t0\n+M202T3859\t892.050000000031\t753.237186536855\t0\t0\n+M202T4007\t0\t0\t831.015000000029\t0\n+M202T3303\t2759.095\t3872.96250000005\t0\t791.36463944858\n+M202T3379\t9879.84499999977\t1320.19136751317\t0\t0\n+M202T3767\t0\t2564.84247599701\t1151.71733333335\t0\n+M202T3181\t7682.58500000004\t3806.07999999999\t0\t0\n+M202T4031\t389.407001047583\t688.600000000024\t754.233600000007\t0\n+M202T3886\t0\t841.96999999998\t0\t0\n+M202T4137\t0\t0\t0\t732.419999999983\n+M202T3931\t354.703176356038\t0\t1461.71\t0\n+M202T3271\t77227.3769090911\t7016.51333681604\t44589.8848371899\t7116.58518941033\n+M202T2891\t36435.3079999996\t6433.2631875585\t29664.6514201645\t2640.91263857081\n+M202T3285\t0\t0\t0\t3372.57500000002\n+M203T4040\t0\t0\t0\t978.124999999977\n+M203T3308\t0\t1694.89499999996\t0\t1136.19000000004\n+M203T3338\t3852.53759999981\t2974.74816666671\t0\t0\n+M203T4156\t0\t1020.37999999998\t0\t374.999685196314\n+M203T3714\t0\t0\t0\t3345.96999999992\n+M203T3787\t790.967612320259\t2690.23500000009\t1939.932414103\t955.908725789886\n+M203T2679\t0\t0\t0\t6346.07499999991\n+M203T3966\t1720.81523845536\t136.302197105375\t2796.65500000002\t1490.80528084004\n+M203T4059\t179.980340762509\t0\t0\t1550.91499999999\n+M204T3535\t0\t0\t967.169999999987\t0\n+M204T3666\t3002.85120000003\t0\t572.831482902373\t0\n+M204T4031\t1111.14999999999\t0\t0\t129.105921444997\n+M204T4126\t0\t0\t0\t793.455000000074\n+M204T3060\t3905.96266666662\t0\t0\t0\n+M204T3845\t0\t238.782610500926\t1676.11500000006\t0\n+M204T3395\t706.339294579149\t155.065526139688\t1687.9990131206\t1586.91\n+M204T2638\t0\t0\t3518.12000000012\t0\n+M204T4139\t0\t0\t0\t1089.24000000004\n+M204T4073\t0\t1062.63500000004\t0\t0\n+M204T3604\t0\t0\t0\t1032.90000000004\n+M204T3698\t0\t0\t0\t1446.05999999997\n+M205T3582\t0\t0\t964.383879177602\t2466.43999999994\n+M205T2582\t8805.94199999988\t0\t0\t9189.67999999988\n+M205T2789\t1924712.01585714\t1757150.9648\t2129885.09357143\t1634341.9855862\n+M205T3783\t2777.8750000001\t0\t5180.14999999997\t0\n+M205T3909\t0\t3392.55866666671\t0\t0\n+M205T4051\t2600.69759999987\t0\t1198.79000000004\t0\n+M206T4070\t0\t0\t793.454999999982\t0\n+M206T3084\t0\t0\t0\t4682.47999999989\n+M206T3353\t271.698957954148\t0\t641.649999999985\t0\n+M206T3285\t0\t0\t0\t1023.50999999998\n+M206T3192\t2337.7226842156\t10174.0649999999\t0\t531.384477548613\n+M206T4108\t1685.41525000004\t800.018271889045\t0\t280.678679423257\n+M206T2791\t213659.293920001\t272706.72055332\t253825.557279999\t241844.442068965\n+M206T3444\t1938.56022964102\t2400.20806107181\t4692.21741165203\t3090.62812500006\n+M206T3247\t1713.67500000006\t0\t0\t3137.82499999993\n+M206T3680\t0\t0\t0\t2237.94999999995\n+M206T3191\t1931.20999999997\t0\t0\t0\n+M206T3755\t510.0375381342\t0\t0\t2529.03999999997\n+M206T2570\t0\t0\t9324.27000000002\t924.940634138229\n+M206T3347\t0\t528.62804858849\t535.449055667051\t1536.82999999996\n+M206T3578\t256.653471117468\t1539.92082670481\t3048.62\t0\n+M206T4051\t552.778648243926\t0\t1059.11170758581\t1505.46128571426\n+M206T3428\t646.611502206307\t0\t0\t2558.77500000009'..b'0\t0\t4531.87800000008\t526.976445838407\n+M597T2574\t3938.68550000005\t3727.82999999995\t0\t4759.16500000003\n+M597T3077\t1341.43529729158\t722.49815518322\t7801.52500000005\t0\n+M597T3463\t0\t7109.79500000002\t0\t0\n+M597T3287\t4115.2105592385\t6108.19500000008\t0\t0\n+M597T3669\t3813.49883333338\t1542.97947676868\t0\t987.795272510788\n+M597T3874\t0\t0\t1399.11000000005\t0\n+M597T3799\t0\t0\t9477.64000000033\t0\n+M597T2920\t1034.24974715399\t0\t0\t3881.19999999991\n+M597T4080\t18556.9408188294\t8185.95298062284\t27582.3906250001\t12307.5901216578\n+M597T4135\t15187.814210526\t11262.4812687384\t3161.39825087393\t756.425882857505\n+M597T2791\t2459.83450887303\t1066.17398982618\t23087.5229375002\t1056.38098428999\n+M597T3016\t0\t8213.12000000029\t0\t0\n+M597T2530\t1406.71781818182\t0\t0\t4424.01941666667\n+M597T3805\t28480.3432782255\t1186500.84141178\t10606.0571955243\t34573.1746514789\n+M598T3855\t1539.85635358667\t0\t6475.97000000023\t0\n+M598T3997\t4690.30499999994\t0\t1288.07486775315\t305.764898642052\n+M598T2646\t0\t914.483039050997\t1991.89121724326\t5450.66280000004\n+M598T2895\t929.575110080356\t0\t0\t2579.12000000009\n+M598T3923\t2421.055\t0\t0\t5100.33500000001\n+M598T2839\t4328.7899999999\t0\t0\t0\n+M598T4225\t780.835199999962\t0\t0\t0\n+M598T3867\t0\t0\t923.232000000008\t0\n+M598T2736\t0\t0\t3392.92\t0\n+M598T2560\t0\t0\t3350.66499999992\t0\n+M598T3059\t1251.51527618732\t0\t3904.17600000003\t0\n+M598T3248\t0\t0\t11160.015\t0\n+M598T2590\t0\t0\t5259.96499999993\t0\n+M598T3570\t4893.75500000017\t0\t0\t0\n+M598T3155\t0\t791.797930803163\t0\t1547.78500000005\n+M598T3717\t6735.75999999984\t29323.4050000004\t0\t48876.8056363635\n+M598T3840\t990.400497127544\t19344.1924374998\t1705.49428412994\t18481.3189273045\n+M598T4210\t0\t0\t0\t852.92499999998\n+M598T2983\t3463.10662220332\t7907.94500000028\t4597.13130349332\t0\n+M598T3218\t0\t16185.5021250003\t8818.83384484759\t12536.1107384566\n+M598T2829\t5337.7886250001\t3464.81226746294\t2392.55846345708\t0\n+M598T3363\t0\t0\t0\t7501.04499999995\n+M598T3407\t3147.74550046427\t0\t4532.24000000016\t0\n+M598T3496\t0\t0\t9308.62000000032\t0\n+M598T3120\t3137.82499999993\t0\t0\t0\n+M598T4219\t1558.64039999994\t130.408333333329\t574.318299999979\t283.24689999999\n+M598T2675\t2139.08160000002\t2826.02880000002\t0\t0\n+M598T2759\t0\t5078.42499999999\t1225.70122914555\t436.47790863468\n+M598T2565\t0\t1600.99499999996\t0\t264.093749999994\n+M598T3816\t4056.74513901089\t126881.278714286\t2038.59965809119\t0\n+M598T4028\t4444.59999999997\t0\t0\t0\n+M598T3699\t21485.7955370261\t262005.048159626\t19097.5044463651\t65022.6200000009\n+M599T3177\t0\t2838.6076666667\t0\t2164.39499999999\n+M599T2937\t5756.0700000002\t2557.20999999994\t0\t0\n+M599T2856\t0\t0\t0\t3757.56499999997\n+M599T4215\t0\t0\t223.746998896449\t881.094999999979\n+M599T2629\t24597.6221333335\t2237.94999999995\t0\t0\n+M599T3087\t0\t0\t0\t5745.1150000002\n+M599T4161\t1370.93999999996\t8068.71033333314\t769.979999999982\t5823.36499999964\n+M599T3725\t22852.13\t8220.94499999976\t55051.9369090907\t5147.52485215715\n+M599T3846\t0\t0\t5238.05500000018\t0\n+M599T2884\t3106.80875823442\t3346.02697646104\t6247.93574186843\t3269.28500000002\n+M599T4044\t798856.451441174\t40631.1229886866\t897286.005000001\t49928.058471187\n+M599T3927\t30327.7176201825\t15327.6100000005\t37243.228306282\t2271127.28014893\n+M599T3455\t35592.8437333336\t0\t0\t6298.5500000001\n+M599T3741\t2472129.73859259\t0\t1909653.70493332\t11463.9494185942\n+M599T4124\t0\t354770.43852632\t0\t707685.939314288\n+M599T3815\t79625.6350000028\t12736.5568357265\t9836.53488085646\t4148.40133264837\n+M599T2837\t2295.00891881701\t5415.77280000005\t3360.28178830047\t0\n+M599T2984\t0\t5849.96999999986\t0\t12502.4521250001\n+M600T3611\t0\t0\t0\t5001.73999999997\n+M600T2728\t0\t0\t0\t1760.62499999996\n+M600T3412\t3353.79499999992\t1647.14222654083\t0\t0\n+M600T2595\t6022.12000000021\t2928.1150000001\t3209.81499999996\t2331.63714285708\n+M600T2782\t0\t0\t0\t2608.74386666668\n+M600T3443\t4671.52499999989\t8782.77999999999\t0\t0\n+M600T2847\t0\t0\t1920.87948584165\t1987.33833333336\n+M600T2963\t9211.58999999991\t0\t2898.28401908135\t5635.39317528082\n+M600T3070\t2056.42917003541\t0\t1251.24642515022\t3430.04160000003\n+M600T3353\t2327.15500000008\t0\t0\t2315.33491939702\n+M600T3212\t7784.31000000027\t2982.99537949918\t0\t0\n+M600T2573\t0\t3639.80233333338\t0\t0\n' |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.dataMatrix.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.dataMatrix.tsv Tue Sep 18 16:13:36 2018 -0400 |
b |
b'@@ -0,0 +1,6333 @@\n+name\tko15\tko16\twt15\twt16\n+M200T3488\t6029.94499999992\t1646.69331417609\tNA\tNA\n+M200T3544\tNA\tNA\t4586.52650000006\tNA\n+M200T3882\t1144.01499999999\t1716.38461192716\t1449.84316738066\tNA\n+M200T3822\tNA\tNA\t1018.81499999998\tNA\n+M200T3184\tNA\t4333.4849999999\tNA\tNA\n+M200T2867\t76879.3654931277\t506848.884266667\t53985.4351594335\t76607.9704340259\n+M200T3978\t1324.38867325921\tNA\t495.468308772648\t1242.61000000004\n+M200T3681\tNA\t645.622409362349\t5108.15999999988\t1576.85791107837\n+M201T3788\tNA\tNA\t1680.81000000006\tNA\n+M201T3536\tNA\t2863.6449999999\tNA\t1106.33802122178\n+M201T4052\t318.548929605957\t205.380230930156\t1339.64000000005\t689.071631937096\n+M201T3276\tNA\t1497.96219436021\t4090.91000000014\t1027.56552966783\n+M201T3630\tNA\tNA\t2121.84236212046\t2931.24499999993\n+M201T2590\tNA\t14307.2299999999\tNA\tNA\n+M201T3985\tNA\tNA\t1657.33500000006\tNA\n+M201T3138\t27830.0354581329\t254581.758476187\t63151.125622074\t28083.6051504647\n+M201T3693\tNA\tNA\t2906.20499999993\tNA\n+M201T3511\t4023.61499999999\t694.250350240936\tNA\tNA\n+M201T3790\t446.184819684897\t1118.41040705157\tNA\t3245.80999999992\n+M201T4047\tNA\tNA\t1275.47500000004\t1220.69999999998\n+M201T3925\t128.578946259232\tNA\t1284.72816666668\tNA\n+M201T3874\t886.610568446999\t1220.70000000004\t521.172821104497\tNA\n+M201T4152\tNA\t774.575999999962\tNA\tNA\n+M202T3859\t892.050000000031\t753.237186536855\tNA\tNA\n+M202T4007\tNA\tNA\t831.015000000029\tNA\n+M202T3303\t2759.095\t3872.96250000005\tNA\t791.36463944858\n+M202T3379\t9879.84499999977\t1320.19136751317\tNA\tNA\n+M202T3767\tNA\t2564.84247599701\t1151.71733333335\tNA\n+M202T3181\t7682.58500000004\t3806.07999999999\tNA\tNA\n+M202T4031\t389.407001047583\t688.600000000024\t754.233600000007\tNA\n+M202T3886\tNA\t841.96999999998\tNA\tNA\n+M202T4137\tNA\tNA\tNA\t732.419999999983\n+M202T3931\t354.703176356038\tNA\t1461.71\tNA\n+M202T3271\t77227.3769090911\t7016.51333681604\t44589.8848371899\t7116.58518941033\n+M202T2891\t36435.3079999996\t6433.2631875585\t29664.6514201645\t2640.91263857081\n+M202T3285\tNA\tNA\tNA\t3372.57500000002\n+M203T4040\tNA\tNA\tNA\t978.124999999977\n+M203T3308\tNA\t1694.89499999996\tNA\t1136.19000000004\n+M203T3338\t3852.53759999981\t2974.74816666671\tNA\tNA\n+M203T4156\tNA\t1020.37999999998\tNA\t374.999685196314\n+M203T3714\tNA\tNA\tNA\t3345.96999999992\n+M203T3787\t790.967612320259\t2690.23500000009\t1939.932414103\t955.908725789886\n+M203T2679\tNA\tNA\tNA\t6346.07499999991\n+M203T3966\t1720.81523845536\t136.302197105375\t2796.65500000002\t1490.80528084004\n+M203T4059\t179.980340762509\tNA\tNA\t1550.91499999999\n+M204T3535\tNA\tNA\t967.169999999987\tNA\n+M204T3666\t3002.85120000003\tNA\t572.831482902373\tNA\n+M204T4031\t1111.14999999999\tNA\tNA\t129.105921444997\n+M204T4126\tNA\tNA\tNA\t793.455000000074\n+M204T3060\t3905.96266666662\tNA\tNA\tNA\n+M204T3845\tNA\t238.782610500926\t1676.11500000006\tNA\n+M204T3395\t706.339294579149\t155.065526139688\t1687.9990131206\t1586.91\n+M204T2638\tNA\tNA\t3518.12000000012\tNA\n+M204T4139\tNA\tNA\tNA\t1089.24000000004\n+M204T4073\tNA\t1062.63500000004\tNA\tNA\n+M204T3604\tNA\tNA\tNA\t1032.90000000004\n+M204T3698\tNA\tNA\tNA\t1446.05999999997\n+M205T3582\tNA\tNA\t964.383879177602\t2466.43999999994\n+M205T2582\t8805.94199999988\tNA\tNA\t9189.67999999988\n+M205T2789\t1924712.01585714\t1757150.9648\t2129885.09357143\t1634341.9855862\n+M205T3783\t2777.8750000001\tNA\t5180.14999999997\tNA\n+M205T3909\tNA\t3392.55866666671\tNA\tNA\n+M205T4051\t2600.69759999987\tNA\t1198.79000000004\tNA\n+M206T4070\tNA\tNA\t793.454999999982\tNA\n+M206T3084\tNA\tNA\tNA\t4682.47999999989\n+M206T3353\t271.698957954148\tNA\t641.649999999985\tNA\n+M206T3285\tNA\tNA\tNA\t1023.50999999998\n+M206T3192\t2337.7226842156\t10174.0649999999\tNA\t531.384477548613\n+M206T4108\t1685.41525000004\t800.018271889045\tNA\t280.678679423257\n+M206T2791\t213659.293920001\t272706.72055332\t253825.557279999\t241844.442068965\n+M206T3444\t1938.56022964102\t2400.20806107181\t4692.21741165203\t3090.62812500006\n+M206T3247\t1713.67500000006\tNA\tNA\t3137.82499999993\n+M206T3680\tNA\tNA\tNA\t2237.94999999995\n+M206T3191\t1931.20999999997\tNA\tNA\tNA\n+M206T3755\t510.0375381342\tNA\tNA\t2529.03999999997\n+M206T2570\tNA\tNA\t9324.27000000002\t924.940634138229\n+M206T3347\tNA\t528.62804858849\t535.449055667051\t1536.82999999996\n+M206T3578\t256.65'..b'2.49815518322\t7801.52500000005\tNA\n+M597T3463\tNA\t7109.79500000002\tNA\tNA\n+M597T3287\t4115.2105592385\t6108.19500000008\tNA\tNA\n+M597T3669\t3813.49883333338\t1542.97947676868\tNA\t987.795272510788\n+M597T3874\tNA\tNA\t1399.11000000005\tNA\n+M597T3799\tNA\tNA\t9477.64000000033\tNA\n+M597T2920\t1034.24974715399\tNA\tNA\t3881.19999999991\n+M597T4080\t18556.9408188294\t8185.95298062284\t27582.3906250001\t12307.5901216578\n+M597T4135\t15187.814210526\t11262.4812687384\t3161.39825087393\t756.425882857505\n+M597T2791\t2459.83450887303\t1066.17398982618\t23087.5229375002\t1056.38098428999\n+M597T3016\tNA\t8213.12000000029\tNA\tNA\n+M597T2530\t1406.71781818182\tNA\tNA\t4424.01941666667\n+M597T3805\t28480.3432782255\t1186500.84141178\t10606.0571955243\t34573.1746514789\n+M598T3855\t1539.85635358667\tNA\t6475.97000000023\tNA\n+M598T3997\t4690.30499999994\tNA\t1288.07486775315\t305.764898642052\n+M598T2646\tNA\t914.483039050997\t1991.89121724326\t5450.66280000004\n+M598T2895\t929.575110080356\tNA\tNA\t2579.12000000009\n+M598T3923\t2421.055\tNA\tNA\t5100.33500000001\n+M598T2839\t4328.7899999999\tNA\tNA\tNA\n+M598T4225\t780.835199999962\tNA\tNA\tNA\n+M598T3867\tNA\tNA\t923.232000000008\tNA\n+M598T2736\tNA\tNA\t3392.92\tNA\n+M598T2560\tNA\tNA\t3350.66499999992\tNA\n+M598T3059\t1251.51527618732\tNA\t3904.17600000003\tNA\n+M598T3248\tNA\tNA\t11160.015\tNA\n+M598T2590\tNA\tNA\t5259.96499999993\tNA\n+M598T3570\t4893.75500000017\tNA\tNA\tNA\n+M598T3155\tNA\t791.797930803163\tNA\t1547.78500000005\n+M598T3717\t6735.75999999984\t29323.4050000004\tNA\t48876.8056363635\n+M598T3840\t990.400497127544\t19344.1924374998\t1705.49428412994\t18481.3189273045\n+M598T4210\tNA\tNA\tNA\t852.92499999998\n+M598T2983\t3463.10662220332\t7907.94500000028\t4597.13130349332\tNA\n+M598T3218\tNA\t16185.5021250003\t8818.83384484759\t12536.1107384566\n+M598T2829\t5337.7886250001\t3464.81226746294\t2392.55846345708\tNA\n+M598T3363\tNA\tNA\tNA\t7501.04499999995\n+M598T3407\t3147.74550046427\tNA\t4532.24000000016\tNA\n+M598T3496\tNA\tNA\t9308.62000000032\tNA\n+M598T3120\t3137.82499999993\tNA\tNA\tNA\n+M598T4219\t1558.64039999994\t130.408333333329\t574.318299999979\t283.24689999999\n+M598T2675\t2139.08160000002\t2826.02880000002\tNA\tNA\n+M598T2759\tNA\t5078.42499999999\t1225.70122914555\t436.47790863468\n+M598T2565\tNA\t1600.99499999996\tNA\t264.093749999994\n+M598T3816\t4056.74513901089\t126881.278714286\t2038.59965809119\tNA\n+M598T4028\t4444.59999999997\tNA\tNA\tNA\n+M598T3699\t21485.7955370261\t262005.048159626\t19097.5044463651\t65022.6200000009\n+M599T3177\tNA\t2838.6076666667\tNA\t2164.39499999999\n+M599T2937\t5756.0700000002\t2557.20999999994\tNA\tNA\n+M599T2856\tNA\tNA\tNA\t3757.56499999997\n+M599T4215\tNA\tNA\t223.746998896449\t881.094999999979\n+M599T2629\t24597.6221333335\t2237.94999999995\tNA\tNA\n+M599T3087\tNA\tNA\tNA\t5745.1150000002\n+M599T4161\t1370.93999999996\t8068.71033333314\t769.979999999982\t5823.36499999964\n+M599T3725\t22852.13\t8220.94499999976\t55051.9369090907\t5147.52485215715\n+M599T3846\tNA\tNA\t5238.05500000018\tNA\n+M599T2884\t3106.80875823442\t3346.02697646104\t6247.93574186843\t3269.28500000002\n+M599T4044\t798856.451441174\t40631.1229886866\t897286.005000001\t49928.058471187\n+M599T3927\t30327.7176201825\t15327.6100000005\t37243.228306282\t2271127.28014893\n+M599T3455\t35592.8437333336\tNA\tNA\t6298.5500000001\n+M599T3741\t2472129.73859259\tNA\t1909653.70493332\t11463.9494185942\n+M599T4124\tNA\t354770.43852632\tNA\t707685.939314288\n+M599T3815\t79625.6350000028\t12736.5568357265\t9836.53488085646\t4148.40133264837\n+M599T2837\t2295.00891881701\t5415.77280000005\t3360.28178830047\tNA\n+M599T2984\tNA\t5849.96999999986\tNA\t12502.4521250001\n+M600T3611\tNA\tNA\tNA\t5001.73999999997\n+M600T2728\tNA\tNA\tNA\t1760.62499999996\n+M600T3412\t3353.79499999992\t1647.14222654083\tNA\tNA\n+M600T2595\t6022.12000000021\t2928.1150000001\t3209.81499999996\t2331.63714285708\n+M600T2782\tNA\tNA\tNA\t2608.74386666668\n+M600T3443\t4671.52499999989\t8782.77999999999\tNA\tNA\n+M600T2847\tNA\tNA\t1920.87948584165\t1987.33833333336\n+M600T2963\t9211.58999999991\tNA\t2898.28401908135\t5635.39317528082\n+M600T3070\t2056.42917003541\tNA\t1251.24642515022\t3430.04160000003\n+M600T3353\t2327.15500000008\tNA\tNA\t2315.33491939702\n+M600T3212\t7784.31000000027\t2982.99537949918\tNA\tNA\n+M600T2573\tNA\t3639.80233333338\tNA\tNA\n' |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.variableMetadata.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/faahKO.xset.group2.retcor2.group2.fillPeaks2.variableMetadata.tsv Tue Sep 18 16:13:36 2018 -0400 |
b |
b'@@ -0,0 +1,6333 @@\n+name\tnamecustom\tmz\tmzmin\tmzmax\trt\trtmin\trtmax\tnpeaks\tKO\tWT\tpeakidx\n+M200T3488\tM200.2T3487.9\t200.199996948242\t200.199996948242\t200.199996948242\t3487.93057473838\t3487.93057473838\t3487.93057473838\t1\t1\t0\tc(1089, 10810)\n+M200T3544\tM200.2T3544\t200.199996948242\t200.199996948242\t200.199996948242\t3543.97068061107\t3543.97068061107\t3543.97068061107\t1\t0\t1\t5859\n+M200T3882\tM200.2T3881.9\t200.199996948242\t200.199996948242\t200.199996948242\t3881.90389692078\t3881.90389692078\t3881.90389692078\t1\t1\t0\tc(1677, 10811, 12248)\n+M200T3822\tM200.3T3822.3\t200.300003051758\t200.300003051758\t200.300003051758\t3822.28128580992\t3822.28128580992\t3822.28128580992\t1\t0\t1\t6249\n+M200T3184\tM200.2T3184.4\t200.199996948242\t200.199996948242\t200.199996948242\t3184.37136447847\t3184.37136447847\t3184.37136447847\t1\t1\t0\t3054\n+M200T2867\tM200.1T2866.7\t200.100006103516\t200.100006103516\t200.100006103516\t2866.7414142519\t2866.7414142519\t2866.7414142519\t1\t1\t0\tc(2697, 9252, 12249, 13693)\n+M200T3978\tM200.3T3978.3\t200.300003051758\t200.300003051758\t200.300003051758\t3978.28977826224\t3978.28977826224\t3978.28977826224\t1\t0\t1\tc(8804, 9253, 12250)\n+M200T3681\tM200.2T3680.7\t200.199996948242\t200.199996948242\t200.199996948242\t3680.7462381127\t3680.7462381127\t3680.7462381127\t1\t0\t1\tc(6014, 10812, 13694)\n+M201T3788\tM200.8T3787.9\t200.800003051758\t200.800003051758\t200.800003051758\t3787.9288861147\t3787.9288861147\t3787.9288861147\t1\t0\t1\t6185\n+M201T3536\tM200.8T3536.3\t200.800003051758\t200.800003051758\t200.800003051758\t3536.32508690196\t3536.32508690196\t3536.32508690196\t1\t1\t0\tc(3594, 13695)\n+M201T4052\tM200.8T4052.2\t200.800003051758\t200.800003051758\t200.800003051758\t4052.17447695121\t4052.17447695121\t4052.17447695121\t1\t0\t1\tc(6585, 9254, 10813, 13696)\n+M201T3276\tM200.9T3275.7\t200.900009155273\t200.900009155273\t200.900009155273\t3275.65396470411\t3275.65396470411\t3275.65396470411\t1\t0\t1\tc(5484, 10814, 13697)\n+M201T3630\tM200.9T3630\t200.900009155273\t200.900009155273\t200.900009155273\t3630.01725751236\t3630.01725751236\t3630.01725751236\t1\t0\t1\tc(8310, 12251)\n+M201T2590\tM200.9T2590.4\t200.900009155273\t200.900009155273\t200.900009155273\t2590.41928114403\t2590.41928114403\t2590.41928114403\t1\t1\t0\t2311\n+M201T3985\tM201.2T3984.7\t201.199996948242\t201.199996948242\t201.199996948242\t3984.68436009228\t3984.68436009228\t3984.68436009228\t1\t0\t1\t6528\n+M201T3138\tM201.1T3138.3\t201.100006103516\t201.100006103516\t201.100006103516\t3138.33722162086\t3138.33722162086\t3138.33722162086\t1\t1\t0\tc(3007, 9255, 12252, 13698)\n+M201T3693\tM201.2T3692.9\t201.199996948242\t201.199996948242\t201.199996948242\t3692.85206506005\t3692.85206506005\t3692.85206506005\t1\t0\t1\t6034\n+M201T3511\tM201.2T3511.4\t201.199996948242\t201.199996948242\t201.199996948242\t3511.35144568473\t3511.35144568473\t3511.35144568473\t1\t1\t0\tc(1133, 10815)\n+M201T3790\tM201.2T3790.4\t201.199996948242\t201.199996948242\t201.199996948242\t3790.4165467897\t3790.4165467897\t3790.4165467897\t1\t0\t1\tc(8577, 9256, 10816)\n+M201T4047\tM201.25T4047\t201.25\t201.199996948242\t201.300003051758\t4046.95580392094\t4038.3973615976\t4055.51424624428\t2\t0\t2\tc(6593, 8870)\n+M201T3925\tM201.3T3925.4\t201.300003051758\t201.300003051758\t201.300003051758\t3925.37800474332\t3925.37800474332\t3925.37800474332\t1\t0\t1\tc(6439, 9257)\n+M201T3874\tM201.3T3873.7\t201.300003051758\t201.300003051758\t201.300003051758\t3873.7193118679\t3873.7193118679\t3873.7193118679\t1\t1\t0\tc(4093, 9258, 12253)\n+M201T4152\tM201.3T4151.9\t201.300003051758\t201.300003051758\t201.300003051758\t4151.90542332133\t4151.90542332133\t4151.90542332133\t1\t1\t0\t4557\n+M202T3859\tM201.7T3858.6\t201.699996948242\t201.699996948242\t201.699996948242\t3858.55965341576\t3858.55965341576\t3858.55965341576\t1\t1\t0\tc(1623, 10817)\n+M202T4007\tM201.7T4007.1\t201.699996948242\t201.699996948242\t201.699996948242\t4007.10710644807\t4007.10710644807\t4007.10710644807\t1\t0\t1\t6548\n+M202T3303\tM201.8T3302.8\t201.800003051758\t201.800003051758\t201.800003051758\t3302.77044400531\t3280.42548897946\t3323.17839760963\t3\t2\t0\tc(832, 863, 3177, 13699)\n+M202T3379\tM201.8T3379.5\t201.800003051758\t201.800003051758\t201.800003051758\t3379.47079983551\t3379.4'..b'550018310547\t598.5\t598.600036621094\t3176.78545767921\t3176.69436542801\t3176.8765499304\t2\t1\t1\tc(3049, 7731)\n+M599T2937\tM598.6T2937.1\t598.600006103516\t598.5\t598.700012207031\t2937.14778765624\t2925.60373992196\t2948.69183539052\t2\t2\t0\tc(443, 2779)\n+M599T2856\tM598.7T2855.7\t598.700012207031\t598.700012207031\t598.700012207031\t2855.71169237942\t2855.71169237942\t2855.71169237942\t1\t0\t1\t7398\n+M599T4215\tM598.6T4215.2\t598.600036621094\t598.600036621094\t598.600036621094\t4215.18249648629\t4215.18249648629\t4215.18249648629\t1\t0\t1\tc(9189, 13685)\n+M599T2629\tM598.85T2629.4\t598.850006103516\t598.799987792969\t598.900024414062\t2629.3508289462\t2613.25902864715\t2645.44262924524\t2\t2\t0\tc(93, 2375)\n+M599T3087\tM598.9T3086.6\t598.900024414062\t598.900024414062\t598.900024414062\t3086.62936563167\t3086.62936563167\t3086.62936563167\t1\t0\t1\t7627\n+M599T4161\tM599.2T4161\t599.200012207031\t599\t599.200012207031\t4161.00538865596\t4128.56231615845\t4191.53881358356\t5\t2\t2\tc(2190, 4567, 6764, 6828, 9114)\n+M599T3725\tM599.2T3724.6\t599.200012207031\t599.100036621094\t599.200012207031\t3724.56855941687\t3708.0501254822\t3738.56847525617\t3\t2\t1\tc(1427, 3887, 6075, 15225)\n+M599T3846\tM599.2T3845.6\t599.200012207031\t599.200012207031\t599.200012207031\t3845.6001475967\t3845.6001475967\t3845.6001475967\t1\t0\t1\t6302\n+M599T2884\tM599.1T2884\t599.100036621094\t599.100036621094\t599.100036621094\t2884.0322651969\t2884.0322651969\t2884.0322651969\t1\t0\t1\tc(7424, 10806, 12243, 13686)\n+M599T4044\tM599.3T4043.7\t599.299987792969\t599.299987792969\t599.299987792969\t4043.74524093865\t4043.74524093865\t4066.10087588419\t3\t1\t1\tc(1980, 6571, 6597, 12244, 15226)\n+M599T3927\tM599.3T3927.1\t599.299987792969\t599.200012207031\t599.299987792969\t3927.1105659975\t3927.1105659975\t3973.23317972754\t3\t1\t1\tc(4253, 8717, 8748, 10807, 13687)\n+M599T3455\tM599.25T3455.1\t599.25\t599.200012207031\t599.299987792969\t3455.13028638717\t3436.14286573441\t3474.11770703993\t2\t1\t1\tc(1028, 8116)\n+M599T3741\tM599.3T3740.9\t599.299987792969\t599.299987792969\t599.400024414062\t3740.91057539316\t3733.31872427639\t3748.72918614711\t3\t1\t1\tc(1481, 6112, 6133, 15227)\n+M599T4124\tM599.35T4123.8\t599.350006103516\t599.299987792969\t599.400024414062\t4123.8352786937\t4122.9412474863\t4124.72930990111\t2\t1\t1\tc(4466, 9058)\n+M599T3815\tM599.4T3815.4\t599.400024414062\t599.400024414062\t599.400024414062\t3815.41745314142\t3815.41745314142\t3815.41745314142\t1\t1\t0\tc(1552, 12245, 13688, 15228)\n+M599T2837\tM599.4T2837.3\t599.400024414062\t599.400024414062\t599.400024414062\t2837.32876796317\t2837.32876796317\t2837.32876796317\t1\t1\t0\tc(2616, 10808, 13689)\n+M599T2984\tM599.45T2984.4\t599.450012207031\t599.400024414062\t599.5\t2984.36512439418\t2969.43152576515\t2999.29872302321\t2\t1\t1\tc(2885, 7528)\n+M600T3611\tM599.5T3611.3\t599.5\t599.5\t599.5\t3611.27081973131\t3611.27081973131\t3611.27081973131\t1\t0\t1\t8294\n+M600T2728\tM599.5T2728.4\t599.5\t599.5\t599.5\t2728.42534632355\t2728.42534632355\t2728.42534632355\t1\t0\t1\t7235\n+M600T3412\tM599.5T3412.5\t599.5\t599.5\t599.5\t3412.49713875326\t3412.49713875326\t3412.49713875326\t1\t1\t0\tc(999, 12246)\n+M600T2595\tM599.85T2594.7\t599.850006103516\t599.799987792969\t599.900024414062\t2594.74502674603\t2557.12926551055\t2601.08568100398\t4\t2\t2\tc(75, 2316, 4673, 7054)\n+M600T2782\tM599.9T2782.4\t599.900024414062\t599.900024414062\t599.900024414062\t2782.43037673\t2782.43037673\t2782.43037673\t1\t0\t1\t7290\n+M600T3443\tM600T3443.3\t600\t600\t600\t3443.33609503605\t3428.56063072458\t3458.11155934752\t2\t2\t0\tc(1049, 3394)\n+M600T2847\tM600T2846.8\t600\t600\t600\t2846.75746804785\t2846.75746804785\t2846.75746804785\t1\t0\t1\tc(7388, 13690)\n+M600T2963\tM600T2963.2\t600\t600\t600\t2963.21691026891\t2963.21691026891\t2963.21691026891\t1\t1\t0\tc(455, 13691, 15229)\n+M600T3070\tM600T3070\t600\t600\t600\t3069.97823403078\t3069.97823403078\t3069.97823403078\t1\t0\t1\tc(7609, 10809, 13692)\n+M600T3353\tM600T3352.9\t600\t600\t600\t3352.93056227251\t3352.93056227251\t3352.93056227251\t1\t1\t0\tc(903, 15230)\n+M600T3212\tM600T3212.3\t600\t600\t600\t3212.26402887262\t3212.26402887262\t3212.26402887262\t1\t1\t0\tc(705, 12247)\n+M600T2573\tM600T2573.2\t600\t600\t600\t2573.20528114403\t2573.20528114403\t2573.20528114403\t1\t1\t0\t2295\n' |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 xcms.r --- a/xcms.r Wed Nov 29 09:47:20 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
@@ -1,229 +0,0 @@ -#!/usr/bin/env Rscript -# xcms.r version="2.2.0" -#Authors ABIMS TEAM -#BPC Addition from Y.guitton - - -# ----- LOG FILE ----- -log_file=file("log.txt", open = "wt") -sink(log_file) -sink(log_file, type = "output") - - -# ----- PACKAGE ----- -cat("\tPACKAGE INFO\n") -#pkgs=c("xcms","batch") -pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "xcms","snow","batch") -for(pkg in pkgs) { - suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE))) - cat(pkg,"\t",as.character(packageVersion(pkg)),"\n",sep="") -} -source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } -cat("\n\n"); - - - - - -# ----- ARGUMENTS ----- -cat("\tARGUMENTS INFO\n") -listArguments = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects -write.table(as.matrix(listArguments), col.names=F, quote=F, sep='\t') - -cat("\n\n"); - - -# ----- ARGUMENTS PROCESSING ----- -cat("\tINFILE PROCESSING INFO\n") - -#image is an .RData file necessary to use xset variable given by previous tools -if (!is.null(listArguments[["image"]])){ - load(listArguments[["image"]]); listArguments[["image"]]=NULL -} - -#Import the different functions -source_local("lib.r") - -cat("\n\n") - -#Import the different functions - -# ----- PROCESSING INFILE ----- -cat("\tARGUMENTS PROCESSING INFO\n") - -# Save arguments to generate a report -if (!exists("listOFlistArguments")) listOFlistArguments=list() -listOFlistArguments[[paste(format(Sys.time(), "%y%m%d-%H:%M:%S_"),listArguments[["xfunction"]],sep="")]] = listArguments - - -#saving the commun parameters -thefunction = listArguments[["xfunction"]]; listArguments[["xfunction"]]=NULL #delete from the list of arguments - -xsetRdataOutput = paste(thefunction,"RData",sep=".") -if (!is.null(listArguments[["xsetRdataOutput"]])){ - xsetRdataOutput = listArguments[["xsetRdataOutput"]]; listArguments[["xsetRdataOutput"]]=NULL -} - -#saving the specific parameters -rplotspdf = "Rplots.pdf" -if (!is.null(listArguments[["rplotspdf"]])){ - rplotspdf = listArguments[["rplotspdf"]]; listArguments[["rplotspdf"]]=NULL -} -sampleMetadataOutput = "sampleMetadata.tsv" -if (!is.null(listArguments[["sampleMetadataOutput"]])){ - sampleMetadataOutput = listArguments[["sampleMetadataOutput"]]; listArguments[["sampleMetadataOutput"]]=NULL -} -variableMetadataOutput = "variableMetadata.tsv" -if (!is.null(listArguments[["variableMetadataOutput"]])){ - variableMetadataOutput = listArguments[["variableMetadataOutput"]]; listArguments[["variableMetadataOutput"]]=NULL -} -dataMatrixOutput = "dataMatrix.tsv" -if (!is.null(listArguments[["dataMatrixOutput"]])){ - dataMatrixOutput = listArguments[["dataMatrixOutput"]]; listArguments[["dataMatrixOutput"]]=NULL -} -if (!is.null(listArguments[["convertRTMinute"]])){ - convertRTMinute = listArguments[["convertRTMinute"]]; listArguments[["convertRTMinute"]]=NULL -} -if (!is.null(listArguments[["numDigitsMZ"]])){ - numDigitsMZ = listArguments[["numDigitsMZ"]]; listArguments[["numDigitsMZ"]]=NULL -} -if (!is.null(listArguments[["numDigitsRT"]])){ - numDigitsRT = listArguments[["numDigitsRT"]]; listArguments[["numDigitsRT"]]=NULL -} -if (!is.null(listArguments[["intval"]])){ - intval = listArguments[["intval"]]; listArguments[["intval"]]=NULL -} - -if (thefunction %in% c("xcmsSet","retcor")) { - ticspdf = listArguments[["ticspdf"]]; listArguments[["ticspdf"]]=NULL - bicspdf = listArguments[["bicspdf"]]; listArguments[["bicspdf"]]=NULL -} - - -if (thefunction %in% c("xcmsSet","retcor","fillPeaks")) { - if (!exists("singlefile")) singlefile=NULL - if (!exists("zipfile")) zipfile=NULL - rawFilePath = getRawfilePathFromArguments(singlefile, zipfile, listArguments) - zipfile = rawFilePath$zipfile - singlefile = rawFilePath$singlefile - listArguments = rawFilePath$listArguments - directory = retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) - md5sumList=list("origin"=getMd5sum(directory)) -} - -#addition of the directory to the list of arguments in the first position -if (thefunction == "xcmsSet") { - checkXmlStructure(directory) - checkFilesCompatibilityWithXcms(directory) - listArguments=append(directory, listArguments) -} - - -#addition of xset object to the list of arguments in the first position -if (exists("xset")){ - listArguments=append(list(xset), listArguments) -} - -cat("\n\n") - - - - -# ----- MAIN PROCESSING INFO ----- -cat("\tMAIN PROCESSING INFO\n") - - -#Verification of a group step before doing the fillpeaks job. - -if (thefunction == "fillPeaks") { - res=try(is.null(groupnames(xset))) - if (class(res) == "try-error"){ - error<-geterrmessage() - write(error, stderr()) - stop("You must always do a group step after a retcor. Otherwise it won't work for the fillpeaks step") - } - -} - -#change the default display settings -#dev.new(file="Rplots.pdf", width=16, height=12) -pdf(file=rplotspdf, width=16, height=12) -if (thefunction == "group") { - par(mfrow=c(2,2)) -} -#else if (thefunction == "retcor") { -#try to change the legend display -# par(xpd=NA) -# par(xpd=T, mar=par()$mar+c(0,0,0,4)) -#} - - -#execution of the function "thefunction" with the parameters given in "listArguments" - -cat("\t\tCOMPUTE\n") -xset = do.call(thefunction, listArguments) - -# check if there are no peaks -if (nrow(peaks(xset)) == 0) { - stop("No peaks were detected. You should review your settings") -} - - -cat("\n\n") - -dev.off() #dev.new(file="Rplots.pdf", width=16, height=12) - -if (thefunction == "xcmsSet") { - - #transform the files absolute pathways into relative pathways - xset@filepaths<-sub(paste(getwd(),"/",sep="") ,"", xset@filepaths) - if(exists("zipfile") && !is.null(zipfile) && (zipfile!="")) { - - #Modify the samples names (erase the path) - for(i in 1:length(sampnames(xset))){ - - sample_name=unlist(strsplit(sampnames(xset)[i], "/")) - sample_name=sample_name[length(sample_name)] - sample_name= unlist(strsplit(sample_name,"[.]"))[1] - sampnames(xset)[i]=sample_name - - } - - } - -} - -# -- TIC -- -if (thefunction == "xcmsSet") { - cat("\t\tGET TIC GRAPH\n") - sampleNamesList = getSampleMetadata(xcmsSet=xset, sampleMetadataOutput=sampleMetadataOutput) - getTICs(xcmsSet=xset, pdfname=ticspdf,rt="raw") - getBPCs(xcmsSet=xset,rt="raw",pdfname=bicspdf) -} else if (thefunction == "retcor") { - cat("\t\tGET TIC GRAPH\n") - getTICs(xcmsSet=xset, pdfname=ticspdf,rt="corrected") - getBPCs(xcmsSet=xset,rt="corrected",pdfname=bicspdf) -} - -if ((thefunction == "group" || thefunction == "fillPeaks") && exists("intval")) { - getPeaklistW4M(xset,intval,convertRTMinute,numDigitsMZ,numDigitsRT,variableMetadataOutput,dataMatrixOutput) -} - - -cat("\n\n") - -# ----- EXPORT ----- - -cat("\tXSET OBJECT INFO\n") -print(xset) -#delete the parameters to avoid the passage to the next tool in .RData image - - -#saving R data in .Rdata file to save the variables used in the present tool -objects2save = c("xset","zipfile","singlefile","listOFlistArguments","md5sumList","sampleNamesList") -save(list=objects2save[objects2save %in% ls()], file=xsetRdataOutput) - -cat("\n\n") - - -cat("\tDONE\n") |
b |
diff -r dcb9041cb9ea -r 91c71f3808f3 xcms_fillpeaks.r --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xcms_fillpeaks.r Tue Sep 18 16:13:36 2018 -0400 |
[ |
@@ -0,0 +1,110 @@ +#!/usr/bin/env Rscript + +# ----- LOG FILE ----- +log_file=file("log.txt", open = "wt") +sink(log_file) +sink(log_file, type = "output") + + +# ----- PACKAGE ----- +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("lib.r") +source_local("lib-xcms3.x.x.r") + +pkgs <- c("xcms","batch") +loadAndDisplayPackages(pkgs) +cat("\n\n"); + + +# ----- 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') + +cat("\n\n") + +# ----- PROCESSING INFILE ----- +cat("\tARGUMENTS PROCESSING INFO\n") + +#saving the specific parameters +method <- "FillChromPeaks" + +if (!is.null(args$convertRTMinute)) convertRTMinute <- args$convertRTMinute +if (!is.null(args$numDigitsMZ)) numDigitsMZ <- args$numDigitsMZ +if (!is.null(args$numDigitsRT)) numDigitsRT <- args$numDigitsRT +if (!is.null(args$intval)) intval <- args$intval +if (!is.null(args$naTOzero)) naTOzero <- args$naTOzero + +cat("\n\n") + + +# ----- ARGUMENTS PROCESSING ----- +cat("\tINFILE PROCESSING INFO\n") + +#image is an .RData file necessary to use xset variable given by previous tools +load(args$image) +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.*") + +#Verification of a group step before doing the fillpeaks job. +if (!hasFeatures(xdata)) stop("You must always do a group step after a retcor. Otherwise it won't work for the fillpeaks step") + +# Handle infiles +if (!exists("singlefile")) singlefile <- NULL +if (!exists("zipfile")) zipfile <- NULL +rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args) +zipfile <- rawFilePath$zipfile +singlefile <- rawFilePath$singlefile +directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) + +# Check some character issues +md5sumList <- list("origin" = getMd5sum(directory)) +checkXmlStructure(directory) +checkFilesCompatibilityWithXcms(directory) + + +cat("\n\n") + + +# ----- MAIN PROCESSING INFO ----- +cat("\tMAIN PROCESSING INFO\n") + + +cat("\t\tCOMPUTE\n") + +cat("\t\t\tFilling missing peaks using default settings\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()))] + +fillChromPeaksParam <- do.call(paste0(method,"Param"), args) +print(fillChromPeaksParam) +xdata <- fillChromPeaks(xdata, param=fillChromPeaksParam) + +if (exists("intval")) { + getPeaklistW4M(xdata, intval, convertRTMinute, numDigitsMZ, numDigitsRT, naTOzero, "variableMetadata.tsv", "dataMatrix.tsv") +} + +cat("\n\n") + +# ----- EXPORT ----- + +cat("\tXCMSnExp OBJECT INFO\n") +print(xdata) +cat("\n\n") + +cat("\txcmsSet OBJECT INFO\n") +# Get the legacy xcmsSet object +xset <- getxcmsSetObject(xdata) +print(xset) +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", "chromTIC_adjusted", "chromBPI_adjusted") +save(list=objects2save[objects2save %in% ls()], file="fillpeaks.RData") + +cat("\n\n") + + +cat("\tDONE\n") |