# HG changeset patch
# User iuc
# Date 1682086138 0
# Node ID 557362ddaf9e82fc6bae83e1bb3e4afede4de08f
# Parent 6d7a31ff056f63b325237b4f67721c64ceffd0bf
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ruvseq commit 30117fce22f3771c9c0c13e70c3ad14b694de6e2
diff -r 6d7a31ff056f -r 557362ddaf9e get_deseq_dataset.R
--- a/get_deseq_dataset.R Wed Sep 01 08:22:16 2021 +0000
+++ b/get_deseq_dataset.R Fri Apr 21 14:08:58 2023 +0000
@@ -14,7 +14,7 @@
}
}
- if (!use_txi & has_header) {
+ if (!use_txi && has_header) {
countfiles <- lapply(as.character(sample_table$filename), read.delim, row.names = 1)
tbl <- do.call("cbind", countfiles)
colnames(tbl) <- rownames(sample_table) # take sample ids from header
@@ -35,7 +35,7 @@
colData = subset(sample_table, select = -filename),
design = design_formula
)
- } else if (!use_txi & !has_header) {
+ } else if (!use_txi && !has_header) {
# construct the object from HTSeq files
dds <- DESeqDataSetFromHTSeqCount(
diff -r 6d7a31ff056f -r 557362ddaf9e ruvseq.R
--- a/ruvseq.R Wed Sep 01 08:22:16 2021 +0000
+++ b/ruvseq.R Fri Apr 21 14:08:58 2023 +0000
@@ -1,7 +1,8 @@
# setup R error handling to go to stderr
library("getopt")
-options(show.error.messages = F, error = function() {
- cat(geterrmessage(), file = stderr()); q("no", 1, F)
+options(show.error.messages = FALSE, error = function() {
+ cat(geterrmessage(), file = stderr())
+ q("no", 1, FALSE)
})
options(stringAsFactors = FALSE, useFancyQuotes = FALSE)
@@ -17,7 +18,8 @@
"plots", "p", 1, "character",
"header", "H", 0, "logical",
"txtype", "y", 1, "character",
- "tx2gene", "x", 1, "character"), # a space-sep tx-to-gene map or GTF file (auto detect .gtf/.GTF)
+ "tx2gene", "x", 1, "character", # a space-sep tx-to-gene map or GTF file (auto detect .gtf/.GTF)
+ "ruv_ncounts", "ruv_ncounts", 0, "logical"),
byrow = TRUE, ncol = 4)
opt <- getopt(spec)
@@ -155,6 +157,7 @@
min_k <- opt$min_k
max_k <- opt$max_k
min_c <- opt$min_mean_count
+ruv_ncounts <- ifelse(is.null(opt$ruv_ncounts), FALSE, TRUE)
sample_json <- fromJSON(opt$sample_json)
sample_paths <- sample_json$path
sample_names <- sample_json$label
@@ -183,8 +186,14 @@
df <- data.frame(identifier = rownames(unwanted_variation))
df <- cbind(df, unwanted_variation)
colnames(df)[2] <- "condition"
- write.table(df, file = paste0("batch_effects_", name, ".tabular"), sep = "\t", quote = F, row.names = F)
+ write.table(df, file = paste0("uv_batch_effects_", name, ".tabular"), sep = "\t", quote = FALSE, row.names = FALSE)
+ if (ruv_ncounts) {
+ ruvnorm_counts <- normCounts(set)
+ ruvnorm_df <- data.frame(geneID = rownames(ruvnorm_counts), ruvnorm_counts)
+ write.table(ruvnorm_df, file = paste0("ruv_norm_counts_", name, ".tabular"), sep = "\t", quote = FALSE, row.names = FALSE)
+ }
}
+
}
# close the plot device
diff -r 6d7a31ff056f -r 557362ddaf9e ruvseq.xml
--- a/ruvseq.xml Wed Sep 01 08:22:16 2021 +0000
+++ b/ruvseq.xml Fri Apr 21 14:08:58 2023 +0000
@@ -2,10 +2,11 @@
from RNA-seq data
ruvseq
+ ruvseq
1.26.0
- 0
+ 1
bioconductor-ruvseq
@@ -63,6 +64,10 @@
--tx2gene mapping.txt
#end if
#end if
+
+#if $ruv_ncounts == 1:
+ --ruv_ncounts
+#end if
]]>
@@ -120,10 +125,17 @@
+
-
+
+
+
+ ruv_ncounts == True
+
pdf == True
@@ -235,6 +247,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 6d7a31ff056f -r 557362ddaf9e ruvseq.xml.orig
--- a/ruvseq.xml.orig Wed Sep 01 08:22:16 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,320 +0,0 @@
-
- from RNA-seq data
-<<<<<<< HEAD
-
- 1.16.0
- 1
-
-=======
-
- ruvseq
-
->>>>>>> 0851b8679 (add tools up until R)
-
- bioconductor-ruvseq
- bioconductor-deseq2
- bioconductor-tximport
- bioconductor-genomicfeatures
- r-ggrepel
- r-getopt
-
-
-
-
-
-
- /dev/null | grep -v -i "WARNING: ")
- ]]>
-
-
-
-#import json
-#set sample_table = []
-#for $level in $rep_factorLevel:
- #for $file in $level.countsFile:
- #silent $sample_table.append({"path": str($file), "label": str($file.element_identifier), "condition": str($level.factorLevel)})
- #end for
-#end for
-#echo json.dumps($sample_table)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pdf == True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 10.1038/nbt.2931
-
-