Mercurial > repos > lecorguille > xcms_group
comparison xcms_group.r @ 32:68282292acc4 draft
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
author | lecorguille |
---|---|
date | Tue, 03 Apr 2018 11:39:07 -0400 |
parents | 020d065edd9e |
children | 59943e24684b |
comparison
equal
deleted
inserted
replaced
31:f248fd3b89d6 | 32:68282292acc4 |
---|---|
27 | 27 |
28 # ----- PROCESSING INFILE ----- | 28 # ----- PROCESSING INFILE ----- |
29 cat("\tARGUMENTS PROCESSING INFO\n") | 29 cat("\tARGUMENTS PROCESSING INFO\n") |
30 | 30 |
31 #saving the specific parameters | 31 #saving the specific parameters |
32 method <- args$method; args$method <- NULL | 32 method <- args$method |
33 | 33 |
34 if (!is.null(args$convertRTMinute)){ | 34 if (!is.null(args$convertRTMinute)) convertRTMinute <- args$convertRTMinute |
35 convertRTMinute <- args$convertRTMinute; args$convertRTMinute <- NULL | 35 if (!is.null(args$numDigitsMZ)) numDigitsMZ <- args$numDigitsMZ |
36 } | 36 if (!is.null(args$numDigitsRT)) numDigitsRT <- args$numDigitsRT |
37 if (!is.null(args$numDigitsMZ)){ | 37 if (!is.null(args$intval)) intval <- args$intval |
38 numDigitsMZ <- args$numDigitsMZ; args$numDigitsMZ <- NULL | |
39 } | |
40 if (!is.null(args$numDigitsRT)){ | |
41 numDigitsRT <- args$numDigitsRT; args$numDigitsRT <- NULL | |
42 } | |
43 if (!is.null(args$intval)){ | |
44 intval <- args$intval; args$intval <- NULL | |
45 } | |
46 | 38 |
47 cat("\n\n") | 39 cat("\n\n") |
48 | 40 |
49 | 41 |
50 # ----- ARGUMENTS PROCESSING ----- | 42 # ----- ARGUMENTS PROCESSING ----- |
51 cat("\tINFILE PROCESSING INFO\n") | 43 cat("\tINFILE PROCESSING INFO\n") |
52 | 44 |
53 #image is an .RData file necessary to use xset variable given by previous tools | 45 #image is an .RData file necessary to use xset variable given by previous tools |
54 load(args$image); args$image=NULL | 46 load(args$image) |
55 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.*") | 47 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.*") |
56 | 48 |
57 # Handle infiles | 49 # Handle infiles |
58 if (!exists("singlefile")) singlefile <- NULL | 50 if (!exists("singlefile")) singlefile <- NULL |
59 if (!exists("zipfile")) zipfile <- NULL | 51 if (!exists("zipfile")) zipfile <- NULL |
60 rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args) | 52 rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args) |
61 zipfile <- rawFilePath$zipfile | 53 zipfile <- rawFilePath$zipfile |
62 singlefile <- rawFilePath$singlefile | 54 singlefile <- rawFilePath$singlefile |
63 args <- rawFilePath$args | |
64 directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) | 55 directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) |
65 | 56 |
66 # Check some character issues | 57 # Check some character issues |
67 md5sumList <- list("origin" = getMd5sum(directory)) | 58 md5sumList <- list("origin" = getMd5sum(directory)) |
68 checkXmlStructure(directory) | 59 checkXmlStructure(directory) |
79 cat("\t\tCOMPUTE\n") | 70 cat("\t\tCOMPUTE\n") |
80 | 71 |
81 | 72 |
82 cat("\t\t\tPerform the correspondence\n") | 73 cat("\t\t\tPerform the correspondence\n") |
83 args$sampleGroups = xdata$sample_group | 74 args$sampleGroups = xdata$sample_group |
75 | |
76 # clear the arguement list to remove unexpected key/value as singlefile_galaxyPath or method ... | |
77 args <- args[names(args) %in% slotNames(do.call(paste0(method,"Param"), list(sampleGroups=c(1,2))))] | |
78 | |
84 groupChromPeaksParam <- do.call(paste0(method,"Param"), args) | 79 groupChromPeaksParam <- do.call(paste0(method,"Param"), args) |
85 print(groupChromPeaksParam) | 80 print(groupChromPeaksParam) |
86 xdata <- groupChromPeaks(xdata, param = groupChromPeaksParam) | 81 xdata <- groupChromPeaks(xdata, param = groupChromPeaksParam) |
87 | 82 |
88 | 83 |