Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Remove r-btach dependencies version numebering cleanin #52

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tools/macros/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@

<xml name="requirements">
<requirements>
<requirement type=”package” version=”4.2.1”>r-base</requirement>
<requirement type="package" version="@TOOL_VERSION@">bioconductor-metams</requirement>
<requirement type="package" version="1.1_5">r-batch</requirement>
<yield />
</requirements>
</xml>

Expand Down
21 changes: 18 additions & 3 deletions tools/metaMS_plot/metaMS_plot.r
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env Rscript
# metaMS_plot.r version="1.0.0"
# metaMS_plot.r version="1.0.1"
#created by Yann GUITTON and updated by Julien SAINT-VANNE


Expand All @@ -18,9 +18,24 @@ source_local <- function(fname) {
base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
source(paste(base_dir, fname, sep="/"))
}

#This function is made to replace r-batch package dependencie
#@author L. Pavot
parse_args <- function() {
args <- commandArgs()
start <- which(args == "--args")[1] + 1
if (is.na(start)) {
return(list())
}
seq_by2 <- seq(start, length(args), by = 2)
result <- as.list(args[seq_by2 + 1])
names(result) <- args[seq_by2]
return(result)
}

source_local("lib_metams.r")

pkgs <- c("metaMS","batch") #"batch" necessary for parseCommandArgs function
pkgs <- c("metaMS") #remove "batch" dependencies
loadAndDisplayPackages(pkgs)

cat("\n")
Expand All @@ -32,7 +47,7 @@ cat("\nStart of the '", modNamC, "' Galaxy module call: ", format(Sys.time(), "%

# ----- ARGUMENTS -----
cat("\tARGUMENTS INFO\n\n")
args = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
args <- parse_args() #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\t')
print(cbind(value = unlist(args)))

Expand Down
6 changes: 5 additions & 1 deletion tools/metaMS_plot/metaMS_plot.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="metams_plot" name="metaMS.plot" version="@TOOL_VERSION@+galaxy0">
<tool id="metams_plot" name="metaMS.plot" version="1.0.1+@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">

<description>GC-MS data preprocessing using metaMS package</description>

Expand Down Expand Up @@ -231,6 +231,10 @@ Output files

Changelog/News
--------------
**Version 1.0.1 - 22/09/2022**

- Remove r-batch package dependencie

**Version 1.0 - 20/05/2019**

- NEW: new tool extract from previous metaMS_runGC tool
Expand Down
24 changes: 19 additions & 5 deletions tools/metaMS_runGC/metaMS_runGC.r
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env Rscript
# metaMS_runGC.r version="3.0.0"
# metaMS_runGC.r version="3.0.1"
#created by Yann GUITTON and updated by Julien SAINT-VANNE
#use RI options + add try on plotUnknown add session Info
#use make.names in sampleMetadata to avoid issues with files names
#remove batch dependence


# ----- LOG FILE -----
Expand All @@ -20,9 +19,24 @@ source_local <- function(fname) {
base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
source(paste(base_dir, fname, sep="/"))
}

#This function is made to replace r-batch package dependencie
#@author L. Pavot
parse_args <- function() {
args <- commandArgs()
start <- which(args == "--args")[1] + 1
if (is.na(start)) {
return(list())
}
seq_by2 <- seq(start, length(args), by = 2)
result <- as.list(args[seq_by2 + 1])
names(result) <- args[seq_by2]
return(result)
}

source_local("lib_metams.r")

pkgs <- c("metaMS","stringr","batch","CAMERA") #"batch" necessary for parseCommandArgs function
pkgs <- c("metaMS","stringr","CAMERA") # removed batch
loadAndDisplayPackages(pkgs)

cat("\n\n")
Expand All @@ -33,7 +47,7 @@ cat("\nStart of the '", modNamC, "' Galaxy module call: ", format(Sys.time(), "%

# ----- PROCESSING INFILE -----
cat("\n\n\tARGUMENTS PROCESSING INFO\n\n")
args = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
args <- parse_args() #interpretation of arguments given in command line as an R list of objects modified after r-batch removal
#write.table(as.matrix(args), col.names=F, quote=F, sep='\t\t')
print(cbind(value = unlist(args)))

Expand Down
7 changes: 5 additions & 2 deletions tools/metaMS_runGC/metams_runGC.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="metams_runGC" name="metaMS.runGC" version="3.0.0+metaMS@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
<tool id="metams_runGC" name="metaMS.runGC" version="3.0.1+metaMS@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">

<description>GC-MS data preprocessing using metaMS package</description>

Expand Down Expand Up @@ -203,7 +203,7 @@ metaMS.runGC
Description
-----------
metaMS.runGC is a function dedicated to GCMS data processing from converted files to the generation of pseudospectra (compounds) table.
Current version for metaMS R package: 1.18.1
Current version for metaMS R package: @TOOL_VERSION@

**Process:**
Each of the converted data (cdf, mzML...) is profiled by a combination of xcms and CAMERA functions. Then all the mass spectra of detected peaks are compared and clustered.
Expand Down Expand Up @@ -322,6 +322,9 @@ Output files

Changelog/News
--------------
**Version 3.0.1 - 22/09/2022**

- Remove r-batch package dependencie

**Version 3.0 - 20/05/2019**

Expand Down
5 changes: 3 additions & 2 deletions tools/scripts/lib_metams.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# lib_metams.r version 2.1.1
# lib_metams.r version 2.1.2
# R function for metaMS runGC under W4M
# author Yann GUITTON CNRS IRISA/LINA Idealg project 2014-2015
# author Yann GUITTON Oniris Laberca 2015-2017
# author Yann GUITTON Oniris Laberca 2015-2021
# author Yann GUITTON Oniris INRAE Laberca 2021-2022


#@author G. Le Corguille
Expand Down