Mercurial > repos > computational-metabolomics > mspurity_puritya
comparison purityX.R @ 9:10e56e53668c draft
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 20a48a1862267264f98b7c514287f9a5cba1143f
| author | computational-metabolomics |
|---|---|
| date | Thu, 13 Jun 2024 11:41:39 +0000 |
| parents | 33d733850e85 |
| children | 50abb1833b42 |
comparison
equal
deleted
inserted
replaced
| 8:33d733850e85 | 9:10e56e53668c |
|---|---|
| 72 | 72 |
| 73 | 73 |
| 74 | 74 |
| 75 getxcmsSetObject <- function(xobject) { | 75 getxcmsSetObject <- function(xobject) { |
| 76 # XCMS 1.x | 76 # XCMS 1.x |
| 77 if (class(xobject) == "xcmsSet") { | 77 if (class(xobject) == "xcmsSet"){ |
| 78 return(xobject) | 78 return(xobject) |
| 79 } | 79 } |
| 80 # XCMS 3.x | 80 # XCMS 3.x |
| 81 if (class(xobject) == "XCMSnExp") { | 81 if (class(xobject) == "XCMSnExp") { |
| 82 # Get the legacy xcmsSet object | 82 # Get the legacy xcmsSet object |
| 83 suppressWarnings(xset <- as(xobject, "xcmsSet")) | 83 suppressWarnings(xset <- as(xobject, "xcmsSet")) |
| 84 sampclass(xset) <- xset@phenoData$sample_group | 84 if (!is.null(xset@phenoData$sample_group)){ |
| 85 xcms::sampclass(xset) <- xset@phenoData$sample_group | |
| 86 }else{ | |
| 87 xcms::sampclass(xset) <- "." | |
| 88 } | |
| 85 return(xset) | 89 return(xset) |
| 86 } | 90 } |
| 87 } | 91 } |
| 88 | 92 |
| 89 target_obj <- loadRData(opt$xset_path, opt$rdata_name) | 93 target_obj <- loadRData(opt$xset_path, opt$rdata_name) |
