# HG changeset patch
# User iuc
# Date 1748899882 0
# Node ID 2c3d294dbe425c5a9d0742d2eb11168ca8f9abe2
# Parent d6b5fc94062ca5488cd08c26bb4cce078b8affc2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sleuth commit 4adb19064a6973121680119529444286c24c1ac1
diff -r d6b5fc94062c -r 2c3d294dbe42 macros.xml
--- a/macros.xml Thu Jun 08 19:57:53 2023 +0000
+++ b/macros.xml Mon Jun 02 21:31:22 2025 +0000
@@ -3,13 +3,13 @@
r-sleuth
r-annotables
- r-argparse
+ r-argparse
r-tidyverse
- 0.30.1
- 2
- 20.01
+ 0.30.2
+ 0
+ 23.2
10.1038/nmeth.4324
diff -r d6b5fc94062c -r 2c3d294dbe42 sleuth.R
--- a/sleuth.R Thu Jun 08 19:57:53 2023 +0000
+++ b/sleuth.R Mon Jun 02 21:31:22 2025 +0000
@@ -1,6 +1,7 @@
library(sleuth,
- quietly = TRUE,
- warn.conflicts = FALSE)
+ quietly = TRUE,
+ warn.conflicts = FALSE
+)
library(annotables, quietly = TRUE, warn.conflicts = FALSE)
library(argparse, quietly = TRUE, warn.conflicts = FALSE)
library(tidyverse)
@@ -8,11 +9,11 @@
# setup R error handling to go to stderr
options(
- show.error.messages = FALSE,
- error = function() {
- cat(geterrmessage(), file = stderr())
- q("no", 1, FALSE)
- }
+ show.error.messages = FALSE,
+ error = function() {
+ cat(geterrmessage(), file = stderr())
+ q("no", 1, FALSE)
+ }
)
# we need that to not crash galaxy with an UTF8 error on German LC settings.
@@ -28,113 +29,123 @@
parser$add_argument("--factorLevel", action = "append", required = FALSE)
parser$add_argument("--factorLevel_counts",
- action = "append",
- required = FALSE)
-parser$add_argument("--factorLevel_n", action = "append", required = FALSE)
-parser$add_argument("--cores", type = "integer", required = FALSE)
+ action = "append",
+ 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 = 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)
+ action = "append",
+ required = FALSE
+)
parser$add_argument("--experiment_design", required = FALSE)
args <- parser$parse_args()
if (args$experiment_design == "complex") {
- ## Complex experiment design
- ############################
-
- s2c <-
- read.table(file = args$metadata_file,
- header = TRUE,
- sep = "\t")
+ ## Complex experiment design
+ ############################
- s2c$path <- file.path("./kallisto_outputs/", paste(s2c$path, ".h5", sep = ""))
- for (f in args$factorLevel_counts) {
- file.rename(f, paste(f, ".h5", sep = ""))
- }
+ s2c <-
+ read.table(
+ file = args$metadata_file,
+ header = TRUE,
+ sep = "\t"
+ )
- so <- sleuth_prep(s2c, full_model = ~ condition, num_cores = 1)
- so <- sleuth_fit(so)
+ s2c$path <- file.path("./kallisto_outputs/", paste(s2c$path, ".h5", sep = ""))
+ for (f in args$factorLevel_counts) {
+ file.rename(f, paste(f, ".h5", sep = ""))
+ }
+ so <- sleuth_prep(s2c, full_model = ~condition, num_cores = 1)
+ so <- sleuth_fit(so)
} else {
- ## Simple experiment design
- ###########################
+ ## Simple experiment design
+ ###########################
- conditions <- c()
- for (x in seq_along(args$factorLevel)) {
- temp <- append(conditions, rep(args$factorLevel[[x]]))
- conditions <- temp
- }
+ conditions <- c()
+ for (x in seq_along(args$factorLevel)) {
+ temp <- append(conditions, rep(args$factorLevel[[x]]))
+ conditions <- temp
+ }
- sample_names <-
- gsub(".fastq.+", "", basename(args$factorLevel_counts))
+ 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)
+ 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,
- ~ condition,
- "full",
- n_bins = args$nbins,
- lwr = args$lwr,
- upr = args$upr
+ so,
+ ~condition,
+ "full",
+ n_bins = args$nbins,
+ lwr = args$lwr,
+ upr = args$upr
)
so <- sleuth_fit(
- so,
- ~ 1,
- "reduced",
- n_bins = args$nbins,
- lwr = args$lwr,
- upr = args$upr
+ so,
+ ~1,
+ "reduced",
+ n_bins = args$nbins,
+ lwr = args$lwr,
+ upr = args$upr
)
so <- sleuth_lrt(so, "reduced", "full")
sleuth_table <-
- sleuth_results(so, "reduced:full", "lrt", show_all = FALSE)
+ sleuth_results(so, "reduced:full", "lrt", show_all = FALSE)
write.table(
- sleuth_table,
- file = "sleuth_table.tab",
- quote = FALSE,
- sep = "\t",
- col.names = TRUE,
- row.names = FALSE
+ sleuth_table,
+ file = "sleuth_table.tab",
+ quote = FALSE,
+ sep = "\t",
+ col.names = TRUE,
+ row.names = FALSE
)
outputFile <- file.path(getwd(), "pca_plot.pdf")
-pdf(file = outputFile,
+pdf(
+ file = outputFile,
height = 6,
- width = 9)
+ width = 9
+)
plot_pca(so, color_by = "condition")
dev.off()
outputFile <- file.path(getwd(), "group_density.pdf")
-pdf(file = outputFile,
+pdf(
+ file = outputFile,
height = 6,
- width = 9)
+ width = 9
+)
plot_group_density(
- so,
- use_filtered = TRUE,
- units = "est_counts",
- trans = "log",
- grouping = setdiff(colnames(so$sample_to_covariates),
- "sample"),
- offset = 1
+ so,
+ use_filtered = TRUE,
+ units = "est_counts",
+ trans = "log",
+ grouping = setdiff(
+ colnames(so$sample_to_covariates),
+ "sample"
+ ),
+ offset = 1
)
dev.off()
diff -r d6b5fc94062c -r 2c3d294dbe42 sleuth.xml
--- a/sleuth.xml Thu Jun 08 19:57:53 2023 +0000
+++ b/sleuth.xml Mon Jun 02 21:31:22 2025 +0000
@@ -1,5 +1,5 @@
- differential expression analysis
+ Differential expression analysis
macros.xml
@@ -9,15 +9,15 @@
+ description="Execution halted."/>
+ description="An undefined error occurred, please check your input carefully and contact your administrator."/>
+ description="An undefined error occurred, please check your input carefully and contact your administrator."/>
/dev/null | grep -v -i "WARNING: ")]]>
-
+
@@ -82,26 +82,26 @@
-
+
+ only be set to false if one desires to do a quick check of the raw data. "/>
+ split for the sliding window shrinkage using the mean-variance curve."/>
+ bin that should be included for the shrinkage procedure. "/>
+ bin that should be included for the shrinkage procedure."/>
-
+
@@ -154,7 +154,7 @@