Mercurial > repos > lecorguille > xcms_plot_chromatogram
comparison lib.r @ 12:10315a095169 draft
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit a5136bfc124956893f4f0c91808d1c0d78c4ea01
author | lecorguille |
---|---|
date | Mon, 29 Apr 2019 06:09:00 -0400 |
parents | 5f0327d6f474 |
children | 9a5b4a1b9880 |
comparison
equal
deleted
inserted
replaced
11:5f0327d6f474 | 12:10315a095169 |
---|---|
67 chromBPI_merged <- chromBPI | 67 chromBPI_merged <- chromBPI |
68 chromTIC_adjusted_merged <- chromTIC_adjusted | 68 chromTIC_adjusted_merged <- chromTIC_adjusted |
69 chromBPI_adjusted_merged <- chromBPI_adjusted | 69 chromBPI_adjusted_merged <- chromBPI_adjusted |
70 } else { | 70 } else { |
71 if (is(xdata, "XCMSnExp")) xdata_merged <- c(xdata_merged,xdata) | 71 if (is(xdata, "XCMSnExp")) xdata_merged <- c(xdata_merged,xdata) |
72 else if (is(xdata, "OnDiskMSnExp")) xdata_merged <- .concatenate_OnDiskMSnExp(xdata_merged,xdata) | 72 else if (is(xdata, "OnDiskMSnExp")) xdata_merged <- xcms:::.concatenate_OnDiskMSnExp(xdata_merged,xdata) |
73 else stop("\n\nERROR: The RData either a OnDiskMSnExp object called raw_data or a XCMSnExp object called xdata") | 73 else stop("\n\nERROR: The RData either a OnDiskMSnExp object called raw_data or a XCMSnExp object called xdata") |
74 | 74 |
75 singlefile_merged <- c(singlefile_merged,singlefile) | 75 singlefile_merged <- c(singlefile_merged,singlefile) |
76 md5sumList_merged$origin <- rbind(md5sumList_merged$origin,md5sumList$origin) | 76 md5sumList_merged$origin <- rbind(md5sumList_merged$origin,md5sumList$origin) |
77 sampleNamesList_merged$sampleNamesOrigin <- c(sampleNamesList_merged$sampleNamesOrigin,sampleNamesList$sampleNamesOrigin) | 77 sampleNamesList_merged$sampleNamesOrigin <- c(sampleNamesList_merged$sampleNamesOrigin,sampleNamesList$sampleNamesOrigin) |
331 exists <- file.exists(files_abs) | 331 exists <- file.exists(files_abs) |
332 files[exists] <- files_abs[exists] | 332 files[exists] <- files_abs[exists] |
333 files[exists] <- sub("//","/",files[exists]) | 333 files[exists] <- sub("//","/",files[exists]) |
334 | 334 |
335 # WHAT IS ON THE FILESYSTEM | 335 # WHAT IS ON THE FILESYSTEM |
336 filesystem_filepaths <- system(paste0("find \"$PWD/",directory,"\" -not -name '\\.*' -not -path '*conda-env*' -type f -name \"*\""), intern=T) | 336 filesystem_filepaths <- system(paste0("find \"",getwd(),"/",directory,"\" -not -name '\\.*' -not -path '*conda-env*' -type f -name \"*\""), intern=T) |
337 filesystem_filepaths <- filesystem_filepaths[grep(filepattern, filesystem_filepaths, perl=T)] | 337 filesystem_filepaths <- filesystem_filepaths[grep(filepattern, filesystem_filepaths, perl=T)] |
338 | 338 |
339 # COMPARISON | 339 # COMPARISON |
340 if (!is.na(table(filesystem_filepaths %in% files)["FALSE"])) { | 340 if (!is.na(table(filesystem_filepaths %in% files)["FALSE"])) { |
341 write("\n\nERROR: List of the files which will not be imported by xcmsSet",stderr()) | 341 write("\n\nERROR: List of the files which will not be imported by xcmsSet",stderr()) |