# HG changeset patch # User iuc # Date 1542397639 18000 # Node ID 3bf1b3ec1ddf3962b56bd99f4d0c4d033418ce6b # Parent d9e5cadc7f0bb7603a294a9990ab286fbc243b8e planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/deseq2 commit 448dccb0c02aba00d8301247b0f0f406ab3d4fa2 diff -r d9e5cadc7f0b -r 3bf1b3ec1ddf deseq2.R --- a/deseq2.R Wed Sep 05 15:54:03 2018 -0400 +++ b/deseq2.R Fri Nov 16 14:47:19 2018 -0500 @@ -49,6 +49,8 @@ "batch_factors", "", 1, "character", "outfile", "o", 1, "character", "countsfile", "n", 1, "character", + "rlogfile", "r", 1, "character", + "vstfile", "v", 1, "character", "header", "H", 0, "logical", "factors", "f", 1, "character", "files_to_labels", "l", 1, "character", @@ -56,6 +58,7 @@ "tximport", "i", 0, "logical", "txtype", "y", 1, "character", "tx2gene", "x", 1, "character", # a space-sep tx-to-gene map or GTF file (auto detect .gtf/.GTF) + "esf", "e", 1, "character", "fit_type", "t", 1, "integer", "many_contrasts", "m", 0, "logical", "outlier_replace_off" , "a", 0, "logical", @@ -188,7 +191,10 @@ } dds <- get_deseq_dataset(sampleTable, header=opt$header, designFormula=designFormula, tximport=opt$tximport, txtype=opt$txtype, tx2gene=opt$tx2gene) - +# estimate size factors for the chosen method +if(!is.null(opt$esf)){ + dds <- estimateSizeFactors(dds, type=opt$esf) +} apply_batch_factors <- function (dds, batch_factors) { rownames(batch_factors) <- batch_factors$identifier batch_factors <- subset(batch_factors, select = -c(identifier, condition)) @@ -284,6 +290,19 @@ write.table(normalizedCounts, file=opt$countsfile, sep="\t", col.names=NA, quote=FALSE) } +if (!is.null(opt$rlogfile)) { + rLogNormalized <-rlogTransformation(dds) + rLogNormalizedMat <- assay(rLogNormalized) + write.table(rLogNormalizedMat, file=opt$rlogfile, sep="\t", col.names=NA, quote=FALSE) +} + +if (!is.null(opt$vstfile)) { + vstNormalized<-varianceStabilizingTransformation(dds) + vstNormalizedMat <- assay(vstNormalized) + write.table(vstNormalizedMat, file=opt$vstfile, sep="\t", col.names=NA, quote=FALSE) +} + + if (is.null(opt$many_contrasts)) { # only contrast the first and second level of the primary factor ref <- allLevels[1] diff -r d9e5cadc7f0b -r 3bf1b3ec1ddf deseq2.xml --- a/deseq2.xml Wed Sep 05 15:54:03 2018 -0400 +++ b/deseq2.xml Fri Nov 16 14:47:19 2018 -0500 @@ -1,4 +1,4 @@ - + Determines differentially expressed features from count tables bioconductor-deseq2 @@ -43,6 +43,12 @@ #if $normCounts: -n '$counts_out' #end if + #if $normRLog: + -r '$rlog_out' + #end if + #if $normVST: + -v '$vst_out' + #end if #set $filename_to_element_identifiers = {} #set $temp_factor_names = list() #for $factor in $rep_factorName: @@ -63,8 +69,11 @@ -f '#echo json.dumps(temp_factor_names)#' -l '#echo json.dumps(filename_to_element_identifiers)#' + #if $esf: + -e $esf + #end if -t $fit_type - #if $batch_factors + #if $batch_factors: --batch_factors '$batch_factors' #end if #if $outlier_replace_off: @@ -142,9 +151,26 @@ help="output an additional PDF files" /> + + + + + + + + @@ -180,10 +206,16 @@ normCounts == True + + normRLog == True + + + normVST == True + - + @@ -197,12 +229,26 @@ + + + + + + + + + + + + + + @@ -232,7 +278,7 @@ - + @@ -247,12 +293,26 @@ + + + + + + + + + + + + + +