# HG changeset patch # User iuc # Date 1697022787 0 # Node ID 070900306913bc3f2c8520fccd24129ce72c4399 # Parent 0cb907a2a8101d0347d42b5a3134c494d841e198 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/edger commit 0c79416d9612d0ebdcb7c3c0543d510e11bb0774 diff -r 0cb907a2a810 -r 070900306913 edger.R --- a/edger.R Wed Sep 27 19:53:04 2023 +0000 +++ b/edger.R Wed Oct 11 11:13:07 2023 +0000 @@ -8,6 +8,7 @@ # matrixPath", "m", 2, "character" -Path to count matrix # factFile", "f", 2, "character" -Path to factor information file # factInput", "i", 2, "character" -String containing factors if manually input +# formula", "F", 2, "character". -String containing a formula to override default use of factInput # annoPath", "a", 2, "character" -Path to input containing gene annotations # contrastData", "C", 1, "character" -String containing contrasts of interest # cpmReq", "c", 2, "double" -Float specifying cpm requirement @@ -159,6 +160,7 @@ "filesPath", "j", 2, "character", "matrixPath", "m", 2, "character", "factFile", "f", 2, "character", + "formula", "F", 2, "character", "factInput", "i", 2, "character", "annoPath", "a", 2, "character", "contrastData", "C", 1, "character", @@ -312,8 +314,13 @@ out_path <- opt$outPath dir.create(out_path, showWarnings = FALSE) -# Split up contrasts separated by comma into a vector then sanitise -contrast_data <- unlist(strsplit(opt$contrastData, split = ",")) +# Check if contrastData is a file or not +if (file.exists(opt$contrastData)) { + contrast_data <- unlist(read.table(opt$contrastData, sep = "\t", header = TRUE)[[1]]) +} else { + # Split up contrasts separated by comma into a vector then sanitise + contrast_data <- unlist(strsplit(opt$contrastData, split = ",")) +} contrast_data <- sanitise_equation(contrast_data) contrast_data <- gsub(" ", ".", contrast_data, fixed = TRUE) @@ -397,10 +404,17 @@ data$genes <- genes - -formula <- "~0" -for (i in seq_along(factor_list)) { - formula <- paste(formula, factor_list[i], sep = "+") +if (!is.null(opt$formula)) { + formula <- opt$formula + # sanitisation can be getting rid of the "~" + if (!startsWith(formula, "~")) { + formula <- paste0("~", formula) + } +} else { + formula <- "~0" + for (i in seq_along(factor_list)) { + formula <- paste(formula, factor_list[i], sep = "+") + } } formula <- formula(formula) diff -r 0cb907a2a810 -r 070900306913 edger.xml --- a/edger.xml Wed Sep 27 19:53:04 2023 +0000 +++ b/edger.xml Wed Oct 11 11:13:07 2023 +0000 @@ -4,7 +4,7 @@ 3.36.0 - 2 + 3 topic_3308 @@ -68,7 +68,15 @@ -a '$anno.geneanno' #end if --C '${ ','.join( ['%s' % $x.contrast for x in $rep_contrast] ) }' +#if $formula: + -F '$formula' +#end if + +#if $contrasts.contrastOpt == 'file': + -C '$contrasts.cinfo' +#else: + -C '${ ','.join( ['%s' % $x.contrast for x in $contrasts.rep_contrast] ) }' +#end if #if $f.filt.filt_select == 'yes': #if $f.filt.cformat.format_select == 'cpm': @@ -176,13 +184,45 @@ + + + + + + + + + + + + + + + + + + + + + - - - - ^[\w\-()]+$ + + + + - + + + + + ^[\w\-()]+$ + + + + + + +
@@ -264,6 +304,7 @@ + @@ -302,6 +343,7 @@ + @@ -333,6 +375,7 @@ + @@ -356,6 +399,7 @@ + @@ -383,6 +427,7 @@ + @@ -402,6 +447,7 @@ + @@ -424,6 +470,7 @@ + @@ -451,6 +498,7 @@ + @@ -494,6 +542,7 @@ + @@ -530,6 +579,7 @@ + @@ -565,6 +615,7 @@ + @@ -599,6 +650,7 @@ + @@ -626,6 +678,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +