# HG changeset patch # User iuc # Date 1689692332 0 # Node ID 9a882d10883384d83c23f311b538fd6c4827aaa1 # Parent 8fe98f7094de6f77701c831692e05c009a359467 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/deseq2 commit 469558ddf5bc6249874fe5826637fd6ee81588cf diff -r 8fe98f7094de -r 9a882d108833 deseq2.R --- a/deseq2.R Fri Aug 26 11:16:15 2022 +0000 +++ b/deseq2.R Tue Jul 18 14:58:52 2023 +0000 @@ -36,9 +36,6 @@ q("no", 1, FALSE) }) -# we need that to not crash galaxy with an UTF8 error on German LC settings. -loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") - library("getopt") library("tools") options(stringAsFactors = FALSE, useFancyQuotes = FALSE) @@ -69,7 +66,7 @@ "outlier_replace_off", "a", 0, "logical", "outlier_filter_off", "b", 0, "logical", "auto_mean_filter_off", "c", 0, "logical", - "beta_prior_off", "d", 0, "logical", + "use_beta_priors", "d", 0, "logical", "alpha_ma", "A", 1, "numeric", "prefilter", "P", 0, "logical", "prefilter_value", "V", 1, "numeric" @@ -217,11 +214,27 @@ } dds <- get_deseq_dataset(sample_table, header = opt$header, design_formula = design_formula, tximport = opt$tximport, txtype = opt$txtype, tx2gene = opt$tx2gene) -# estimate size factors for the chosen method + +# use/estimate size factors with the chosen method if (!is.null(opt$esf)) { - dds <- estimateSizeFactors(dds, type = opt$esf) + if (opt$esf %in% list("ratio", "poscounts", "iterate")) { + cat("Calculating size factors de novo\n") + dds <- estimateSizeFactors(dds, type = opt$esf) + } else { + sf_table <- read.table(opt$esf) + # Sort the provided size factors just in case the order differs from the input file order. + merged_table <- merge(sample_table, sf_table, by.x = 0, by.y = 1, sort = FALSE) + sf_values <- as.numeric(unlist(merged_table[5])) + "sizeFactors"(dds) <- sf_values + + cat("Using user-provided size factors:\n") + print(sf_values) + } +} else { + cat("No size factor was used\n") } + # estimate size factors for each sample # - https://support.bioconductor.org/p/97676/ if (!is.null(opt$sizefactorsfile)) { @@ -312,12 +325,15 @@ } # shrinkage of LFCs -if (is.null(opt$beta_prior_off)) { - beta_prior <- TRUE +if (is.null(opt$use_beta_priors)) { + beta_prior <- FALSE + if (verbose) + cat("Applied default - beta prior off\n") } else { - beta_prior <- FALSE - if (verbose) cat("beta prior off\n") + beta_prior <- opt$use_beta_priors } +sprintf("use_beta_prior is set to %s", beta_prior) + # dispersion fit type if (is.null(opt$fit_type)) { diff -r 8fe98f7094de -r 9a882d108833 deseq2.xml --- a/deseq2.xml Fri Aug 26 11:16:15 2022 +0000 +++ b/deseq2.xml Tue Jul 18 14:58:52 2023 +0000 @@ -1,24 +1,24 @@ - + Determines differentially expressed features from count tables - deseq2_macros.xml + macros.xml + + - - + 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: ") @@ -85,8 +85,12 @@ -f '#echo json.dumps(temp_factor_names)#' -l '#echo json.dumps(filename_to_element_identifiers)#' - #if $advanced_options.esf: - -e $advanced_options.esf + #if $advanced_options.esf_cond.esf: + #if $advanced_options.esf_cond.esf == "user": + -e $advanced_options.esf_cond.size_factor_input + #else: + -e $advanced_options.esf_cond.esf + #end if #end if -t $advanced_options.fit_type #if $batch_factors: @@ -96,15 +100,12 @@ $advanced_options.prefilter_conditional.prefilter -V $advanced_options.prefilter_conditional.prefilter_value #end if - #if $advanced_options.outlier_replace_off: - -a - #end if - #if $advanced_options.outlier_filter_off: - -b - #end if - #if $advanced_options.auto_mean_filter_off: - -c - #end if + + $advanced_options.outlier_replace_off + $advanced_options.outlier_filter_off + $advanced_options.auto_mean_filter_off + $advanced_options.use_beta_priors + #if 'many_contrasts' in $output_options.output_selector -m #end if @@ -116,7 +117,6 @@ #else: -x mapping.txt #end if - #end if ]]> @@ -139,7 +139,7 @@ - + @@ -165,39 +165,49 @@ - +
- - - - - - + + + + + + + + + + + + + + + + - - + - + + help=" DESeq2 performs independent filtering by default using the mean of normalized counts as a filter statistic"/> Disabled - + +
- + - +
'many_contrasts' not in output_options['output_selector'] - + @@ -265,30 +278,33 @@ +
+ +
- - + + - - + + - - + + - + @@ -307,12 +323,41 @@ +
+ +
- + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + +
@@ -330,30 +375,33 @@ +
+ +
- - + + - - + + - - + + - + @@ -370,6 +418,9 @@ +
+ +
@@ -379,7 +430,7 @@ - + @@ -396,6 +447,9 @@ +
+ +
@@ -405,7 +459,7 @@ - + @@ -422,6 +476,9 @@ +
+ +
@@ -431,7 +488,7 @@ - + @@ -459,6 +516,9 @@ +
+ +
@@ -496,6 +556,9 @@ +
+ +
@@ -524,6 +587,9 @@ +
+ +
@@ -534,7 +600,7 @@ - + @@ -561,8 +627,42 @@ - - + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + +
+ + + + + + +
@@ -580,7 +680,7 @@
- +
@@ -592,8 +692,8 @@ - - + + @@ -636,7 +736,7 @@ **What it does** -Estimate variance-mean dependence in count data from high-throughput sequencing assays and test for differential expression based on a model using the negative binomial distribution +Uses DESeq2 version @DESEQ2_VERSION@ to estimate variance-mean dependence in count data from high-throughput sequencing assays and test for differential expression based on a model using the negative binomial distribution. ----- @@ -732,5 +832,5 @@ .. _DESeq2: http://master.bioconductor.org/packages/release/bioc/html/DESeq2.html .. _tximport: https://bioconductor.org/packages/devel/bioc/vignettes/tximport/inst/doc/tximport.html ]]> - + diff -r 8fe98f7094de -r 9a882d108833 deseq2_macros.xml --- a/deseq2_macros.xml Fri Aug 26 11:16:15 2022 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - bioconductor-deseq2 - - bioconductor-rhdf5 - bioconductor-tximport - bioconductor-genomicfeatures - r-getopt - r-ggrepel - r-gplots - r-pheatmap - r-rjson - - - 2.11.40.7 - 2 - - - topic_3308 - - - operation_3800 - - - - - 10.1186/s13059-014-0550-8 - - - - - DESeq2 - - - \ No newline at end of file diff -r 8fe98f7094de -r 9a882d108833 macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Tue Jul 18 14:58:52 2023 +0000 @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + bioconductor-deseq2 + + bioconductor-rhdf5 + bioconductor-tximport + bioconductor-genomicfeatures + r-getopt + r-ggrepel + r-gplots + r-pheatmap + r-rjson + + + 2.11.40.8 + 1.40.2 + 0 + 22.01 + + + topic_3308 + + + operation_3800 + + + + + 10.1186/s13059-014-0550-8 + + + + + DESeq2 + deseq2 + + + diff -r 8fe98f7094de -r 9a882d108833 test-data/size_factors_out.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/size_factors_out.tsv Tue Jul 18 14:58:52 2023 +0000 @@ -0,0 +1,6 @@ +sailfish_quant.sf4.tab 0.84800690799672 +sailfish_quant.sf5.tab 1.10790786350701 +sailfish_quant.sf6.tab 1.21319523337605 +sailfish_quant.sf1.tab 1.19061589081921 +sailfish_quant.sf2.tab 0.712203801356132 +sailfish_quant.sf3.tab 1.03464248515867