# HG changeset patch # User recetox # Date 1643963486 0 # Node ID 69e0da4703b587b944011cf11e22e158ab2ebd70 # Parent 211cd88b51483a8c941ab7d3230f82f73fb29f77 "planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ramclustr commit b514d9bf91b62bb06d39e6ceee21d8f18876e12b" diff -r 211cd88b5148 -r 69e0da4703b5 macros.xml --- a/macros.xml Fri Jan 28 16:25:33 2022 +0000 +++ b/macros.xml Fri Feb 04 08:31:26 2022 +0000 @@ -158,21 +158,7 @@ help="CSV with sample names (or indices, currently not handled) on rows and columns with: batch number ('batch'), position in sequence ('order') and whether it is a qc sample or not ('qc' with true/false OR 'sampleType' with 'sample/qc/blank')."/> - - - - - -
- - - - - - - - +
@@ -224,11 +210,13 @@ For documentation on the tool see https://github.com/cbroeckl/RAMClustR/blob/master/vignettes/RAMClustR.Rmd Upstream Tools - +-------+----------------------+----------------------+------------+ - | Name | Output File | Format | Parameter | - +=======+======================+======================+============+ - | xcms | xset.fillPeaks.RData | rdata.xcms.fillpeaks | xcmsObj | - +-------+----------------------+----------------------+------------+ + +------------------------------+-------------------------------+----------------------+---------------------+ + | Name | Output File | Format | Parameter | + +==============================+===============================+======================+=====================+ + | xcms | xset.fillPeaks.RData | rdata.xcms.fillpeaks | xcmsObj | + +------------------------------+-------------------------------+----------------------+---------------------+ + | RAMClustR define experiment | Table with experiment details | csv | Experimental design | + +------------------------------+-------------------------------+----------------------+---------------------+ The tool takes an **xcmsSet** object as input and extracts all relevant information. @@ -302,4 +290,18 @@ is poisitive or negative ionization mode, EI or ESI, LC-MS GC-MS or CE-MS, in-source fragment or complex adduction event, and predictable or unpredictable signals. + + + + diff -r 211cd88b5148 -r 69e0da4703b5 ramclustr.xml --- a/ramclustr.xml Fri Jan 28 16:25:33 2022 +0000 +++ b/ramclustr.xml Fri Feb 04 08:31:26 2022 +0000 @@ -1,4 +1,4 @@ - + macros.xml @@ -60,6 +60,9 @@ #if $filetype.metadata.batch_order_qc metadata_file = "${filetype.metadata.batch_order_qc}", #end if + #if $filetype.metadata.ExpDes + exp_design = "${filetype.metadata.ExpDes}" + #end if ), "$result", "$method_metadata", $filetype.required.merge_msp, "$spec_abundance") @@ -96,9 +99,10 @@ + - + diff -r 211cd88b5148 -r 69e0da4703b5 ramclustr_wrapper.R --- a/ramclustr_wrapper.R Fri Jan 28 16:25:33 2022 +0000 +++ b/ramclustr_wrapper.R Fri Feb 04 08:31:26 2022 +0000 @@ -10,6 +10,11 @@ write.csv(ramclustr_obj$SpecAbund, file = output_spec_abundance, row.names = TRUE) } +load_experiment_definition <- function(filename) { + experiment <- RAMClustR::defineExperiment(csv = filename) + return(experiment) +} + read_metadata <- function(filename) { data <- read.csv(filename, header = TRUE, stringsAsFactors = FALSE) @@ -48,7 +53,8 @@ st = NULL, maxt = NULL, fftempdir = NULL, - metadata_file = NULL + metadata_file = NULL, + exp_design = NULL ) { obj <- load(input_xcms) @@ -63,6 +69,12 @@ qc <- metadata$qc } + experiment <- NULL + + if (!is.null(exp_design)) { + experiment <- load_experiment_definition(exp_design) + } + x <- RAMClustR::ramclustR( xcmsObj = xdata, st = st, @@ -86,7 +98,8 @@ replace.zeros = replace_zeros, batch = batch, order = order, - qc = qc + qc = qc, + ExpDes = experiment ) return(x) } @@ -115,7 +128,8 @@ st = NULL, maxt = NULL, fftempdir = NULL, - metadata_file = NULL + metadata_file = NULL, + exp_design = NULL ) { if (!file.exists(idmsms)) idmsms <- NULL @@ -131,6 +145,12 @@ qc <- metadata$qc } + experiment <- NULL + + if (!is.null(exp_design)) { + experiment <- load_experiment_definition(exp_design) + } + x <- RAMClustR::ramclustR( ms = ms, idmsms = idmsms, @@ -158,7 +178,8 @@ replace.zeros = replace_zeros, batch = batch, order = order, - qc = qc + qc = qc, + ExpDes = experiment ) return(x) } diff -r 211cd88b5148 -r 69e0da4703b5 test-data/gc-ramclustr-define-experiment.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/gc-ramclustr-define-experiment.csv Fri Feb 04 08:31:26 2022 +0000 @@ -0,0 +1,38 @@ +parameter,Value,Description +,, +Experimental Design,, +Experiment,experiment_gc,"Experiment name, no spaces." +Species,mus musculus,Genus species from which samples are derived. +Sample,serum,"Type of sample (e.g., serum, leaf)." +Contributer,recetox,Your or your PI's name. +platform,GC-MS,Either GC-MS or LC-MS. +,, +GC-MS,, +chrominst,ISQ 7000,Model of LC/GC instrument. +msinst,ISQ7K-VPI,Model of MS instrument. +column,These columns enable analysis of ppm levels of amines without column priming,Column description. +InletTemp,33,Temperature of inlet. +TransferTemp,23,Temperature of GC to MS transfer line. +mstype,QTOF,"Type of mass spectrometer (one of QQQ, TOF, QTOF, Orbi, Q)." +msmode,positive,Positive or negative ion mode. +ionization,AP,"Ionization (EI, AP, or CI)." +msscanrange,100,Scan range used for acquisition. +scantime,0.2,Time for each full scan spectrum (e.g. 0.2 seconds). +deriv,TMS,"Derivitization (TMS, TBDMS, or None)." +MSlevs,1.0,Number of levels of energy acquired - 1 typically. +,, +LC-MS,, +chrominst,fill,Model of LC/GC instrument. +msinst,fill,Model of MS instrument. +column,fill,Column description. +solvA,fill,Solvent A composition. +solvB,fill,Solvent B composition. +CE1,fill,Collision energy of acquisition of MS data. +CE2,fill,Collision energy of acquisition for MSe/idMSMS data (when applicable). +mstype,fill,"Type of mass spectrometer (one of QQQ, TOF, QTOF, Orbi, Q)." +msmode,fill,Positive or negative ion mode. +ionization,fill,"Ionization (EI, AP, or CI)." +colgas,fill,Gas used for collisional dissociation. +msscanrange,fill,Scan range used for acquisition. +conevol,fill,Cone voltage used for acquisition. +MSlevs,fill,Number of levels of energy acquired - 1 typically. diff -r 211cd88b5148 -r 69e0da4703b5 test-data/lc-ramclustr-define-experiment.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/lc-ramclustr-define-experiment.csv Fri Feb 04 08:31:26 2022 +0000 @@ -0,0 +1,38 @@ +parameter,Value,Description +,, +Experimental Design,, +Experiment,experiment_lc,"Experiment name, no spaces." +Species,mus musculus,Genus species from which samples are derived. +Sample,serum,"Type of sample (e.g., serum, leaf)." +Contributer,recetox,Your or your PI's name. +platform,LC-MS,Either GC-MS or LC-MS. +,, +GC-MS,, +chrominst,fill,Model of LC/GC instrument. +msinst,fill,Model of MS instrument. +column,fill,Column description. +InletTemp,fill,Temperature of inlet. +TransferTemp,fill,Temperature of GC to MS transfer line. +mstype,fill,"Type of mass spectrometer (one of QQQ, TOF, QTOF, Orbi, Q)." +msmode,fill,Positive or negative ion mode. +ionization,fill,"Ionization (EI, AP, or CI)." +msscanrange,fill,Scan range used for acquisition. +scantime,fill,Time for each full scan spectrum (e.g. 0.2 seconds). +deriv,fill,"Derivitization (TMS, TBDMS, or None)." +MSlevs,fill,Number of levels of energy acquired - 1 typically. +,, +LC-MS,, +chrominst,UltiMateX 3000 BioRS System,Model of LC/GC instrument. +msinst,FSN04-10000,Model of MS instrument. +column,These columns enable analysis of ppm levels of amines without column priming,Column description. +solvA,H20,Solvent A composition. +solvB,CO2,Solvent B composition. +CE1,50,Collision energy of acquisition of MS data. +CE2,100,Collision energy of acquisition for MSe/idMSMS data (when applicable). +mstype,Q,"Type of mass spectrometer (one of QQQ, TOF, QTOF, Orbi, Q)." +msmode,negative,Positive or negative ion mode. +ionization,ESI,"Ionization (EI, AP, or CI)." +colgas,He,Gas used for collisional dissociation. +msscanrange,1000,Scan range used for acquisition. +conevol,12,Cone voltage used for acquisition. +MSlevs,1.0,Number of levels of energy acquired - 1 typically. diff -r 211cd88b5148 -r 69e0da4703b5 test-data/test1_ramclustObj_xcms_1.rdata Binary file test-data/test1_ramclustObj_xcms_1.rdata has changed