# HG changeset patch
# User recetox
# Date 1697023146 0
# Node ID e2dc815e1b2cca918f44d84399384946437f5753
# Parent 481d769e2f7ab50491a9179aa9c359030ca285c1
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox_aplcms commit 97249a1af94ac5c387e1ede274dec5364f71cde9
diff -r 481d769e2f7a -r e2dc815e1b2c macros.xml
--- a/macros.xml Wed Jul 19 00:26:15 2023 +0000
+++ b/macros.xml Wed Oct 11 11:19:06 2023 +0000
@@ -13,6 +13,9 @@
topic_0091
topic_3520
+
+
+
recetox-aplcms
@@ -81,14 +84,18 @@
help="The upper limit of the ratio range between the left-standard deviation and the right-standard deviation of the bi-Gaussian function to fit the data." />
-
+
+
+
+
+
+
diff -r 481d769e2f7a -r e2dc815e1b2c recetox_aplcms_compute_template.xml
--- a/recetox_aplcms_compute_template.xml Wed Jul 19 00:26:15 2023 +0000
+++ b/recetox_aplcms_compute_template.xml Wed Oct 11 11:19:06 2023 +0000
@@ -1,13 +1,14 @@
-
+
compute retention time correction template feature table
macros.xml
help.xml
+
operation_3936
-
+
@@ -35,9 +36,9 @@
-
+
-
+
0) {
- return(tables[[index]])
- } else {
- stop(sprintf("Mismatch - sample name '%s' not present in %s",
- sample_name, paste(sample_names, collapse = ", ")))
- }
+ sample_names <- lapply(tables, load_sample_name)
+ index <- which(sample_names == sample_name)
+ if (length(index) > 0) {
+ return(tables[[index]])
+ } else {
+ stop(sprintf(
+ "Mismatch - sample name '%s' not present in %s",
+ sample_name, paste(sample_names, collapse = ", ")
+ ))
+ }
}
select_adjusted <- function(recovered_features) {
- return(recovered_features$adjusted_features)
+ return(recovered_features$adjusted_features)
}
known_table_columns <- function() {
- c("chemical_formula", "HMDB_ID", "KEGG_compound_ID", "mass", "ion.type",
+ c(
+ "chemical_formula", "HMDB_ID", "KEGG_compound_ID", "mass", "ion.type",
"m.z", "Number_profiles_processed", "Percent_found", "mz_min", "mz_max",
"RT_mean", "RT_sd", "RT_min", "RT_max", "int_mean(log)", "int_sd(log)",
- "int_min(log)", "int_max(log)")
+ "int_min(log)", "int_max(log)"
+ )
}
save_known_table <- function(table, filename) {
@@ -101,7 +105,9 @@
}
save_pairing <- function(table, filename) {
- df <- table$pairing %>% as_tibble() %>% setNames(c("new", "old"))
+ df <- table$pairing %>%
+ as_tibble() %>%
+ setNames(c("new", "old"))
arrow::write_parquet(df, filename)
}
@@ -114,18 +120,20 @@
}
validate_sample_names <- function(sample_names) {
- if ((any(is.na(sample_names))) || (length(unique(sample_names)) != length(sample_names))) {
- stop(sprintf("Sample names absent or not unique - provided sample names: %s",
- paste(sample_names, collapse = ", ")))
- }
+ if ((any(is.na(sample_names))) || (length(unique(sample_names)) != length(sample_names))) {
+ stop(sprintf(
+ "Sample names absent or not unique - provided sample names: %s",
+ paste(sample_names, collapse = ", ")
+ ))
+ }
}
determine_sigma_ratios <- function(sigma_ratio_lim_min = NA, sigma_ratio_lim_max = NA) {
- if (is.na(sigma_ratio_lim_min)) {
- sigma_ratio_lim_min <- 0
- }
- if (is.na(sigma_ratio_lim_max)) {
- sigma_ratio_lim_max <- Inf
- }
- return(c(sigma_ratio_lim_min, sigma_ratio_lim_max))
+ if (is.na(sigma_ratio_lim_min)) {
+ sigma_ratio_lim_min <- 0
+ }
+ if (is.na(sigma_ratio_lim_max)) {
+ sigma_ratio_lim_max <- Inf
+ }
+ return(c(sigma_ratio_lim_min, sigma_ratio_lim_max))
}