# HG changeset patch
# User iuc
# Date 1686138450 0
# Node ID d3e447dd52c8310283f3cb947e129fb65e40889b
# Parent 5f1cb4c28d73684825e3cabe0b8d0de997bd4e3f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 6fbf73689708cfbdf3d9d783af4988bad7137f93
diff -r 5f1cb4c28d73 -r d3e447dd52c8 macros.xml
--- a/macros.xml Thu Jun 01 07:56:00 2023 +0000
+++ b/macros.xml Wed Jun 07 11:47:30 2023 +0000
@@ -8,7 +8,7 @@
0.30.1
- 0
+ 1
20.01
diff -r 5f1cb4c28d73 -r d3e447dd52c8 sleuth.R
--- a/sleuth.R Thu Jun 01 07:56:00 2023 +0000
+++ b/sleuth.R Wed Jun 07 11:47:30 2023 +0000
@@ -26,39 +26,67 @@
# Collect arguments from command line
parser <- ArgumentParser(description = "Sleuth R script")
-parser$add_argument("--factorLevel", action = "append", required = TRUE)
+parser$add_argument("--factorLevel", action = "append", required = FALSE)
parser$add_argument("--factorLevel_counts",
action = "append",
- required = TRUE)
-parser$add_argument("--factorLevel_n", action = "append", required = TRUE)
-parser$add_argument("--cores", type = "integer", required = TRUE)
+ required = FALSE)
+parser$add_argument("--factorLevel_n", action = "append", required = FALSE)
+parser$add_argument("--cores", type = "integer", required = FALSE)
parser$add_argument("--normalize", action = "store_true", required = FALSE)
-parser$add_argument("--nbins", type = "integer", required = TRUE)
-parser$add_argument("--lwr", type = "numeric", required = TRUE)
-parser$add_argument("--upr", type = "numeric", required = TRUE)
+parser$add_argument("--nbins", type = "integer", required = FALSE)
+parser$add_argument("--lwr", type = "numeric", required = FALSE)
+parser$add_argument("--upr", type = "numeric", required = FALSE)
+parser$add_argument("--metadata_file",
+ action = "append",
+ required = FALSE)
+parser$add_argument("--experiment_design", required = FALSE)
args <- parser$parse_args()
-all_files <- args$factorLevel_counts
+if (args$experiment_design == "complex") {
+ ## Complex experiment design
+ ############################
-conditions <- c()
-for (x in seq_along(args$factorLevel)) {
- temp <- append(conditions, rep(args$factorLevel[[x]]))
- conditions <- temp
-}
+ s2c <-
+ read.table(file = args$metadata_file,
+ header = TRUE,
+ sep = "\t")
+ paths <- c()
+ for (x in s2c$data_filename) {
+ paths <- c(paths, paste("./kallisto_outputs/", x, sep = ""))
+ }
+ for (f in paths) {
+ file.rename(f, gsub(".fastq.*", "", f))
+ file.rename(f, paste(gsub(".fastq.*", "", f), ".h5", sep = ""))
+ }
+ s2c$path <- paste(gsub(".fastq.*", ".h5", paths), ".h5", sep = "")
+
+ so <- sleuth_prep(s2c, full_model = ~ condition, num_cores = 1)
+ so <- sleuth_fit(so)
-sample_names <- all_files %>%
- str_replace(pattern = "\\.tab", "")
+} else {
+ ## Simple experiment design
+ ###########################
+
+ conditions <- c()
+ for (x in seq_along(args$factorLevel)) {
+ temp <- append(conditions, rep(args$factorLevel[[x]]))
+ conditions <- temp
+ }
-design <-
- data.frame(list(
- sample = sample_names,
- condition = conditions,
- path = all_files
- ))
-so <- sleuth_prep(design,
- cores = args$cores,
- normalize = args$normalize)
+ sample_names <-
+ gsub(".fastq.+", "", basename(args$factorLevel_counts))
+
+ design <-
+ data.frame(list(
+ sample = sample_names,
+ condition = conditions,
+ path = args$factorLevel_counts
+ ))
+ so <- sleuth_prep(design,
+ cores = args$cores,
+ normalize = args$normalize)
+}
so <- sleuth_fit(
so,
diff -r 5f1cb4c28d73 -r d3e447dd52c8 sleuth.xml
--- a/sleuth.xml Thu Jun 01 07:56:00 2023 +0000
+++ b/sleuth.xml Wed Jun 07 11:47:30 2023 +0000
@@ -21,23 +21,38 @@
/dev/null | grep -v -i "WARNING: ")]]>
-
-
-
-
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -104,6 +133,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 5f1cb4c28d73 -r d3e447dd52c8 test-data/design.tab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/design.tab Wed Jun 07 11:47:30 2023 +0000
@@ -0,0 +1,5 @@
+sample condition data_filename
+CAM_01 CAM kallisto_output_01.h5
+CAM_02 CAM kallisto_output_02.h5
+reC3_01 reC3 kallisto_output_03.h5
+reC3_02 reC3 kallisto_output_04.h5
diff -r 5f1cb4c28d73 -r d3e447dd52c8 test-data/test02_density.pdf
Binary file test-data/test02_density.pdf has changed
diff -r 5f1cb4c28d73 -r d3e447dd52c8 test-data/test02_pca.pdf
Binary file test-data/test02_pca.pdf has changed