# HG changeset patch # User artbio # Date 1697306434 0 # Node ID 8faa01102fbc6a7cfe19c427ca9c43e923784993 # Parent ca845e480c89cf24594e45746e79c7df989e0094 planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/deseq2_normalization commit 770f615298b9314baec54a539adcb2c3d0e729a7 diff -r ca845e480c89 -r 8faa01102fbc deseq2_normalization.xml --- a/deseq2_normalization.xml Mon Jan 08 04:32:10 2018 -0500 +++ b/deseq2_normalization.xml Sat Oct 14 18:00:34 2023 +0000 @@ -1,7 +1,7 @@ - + of hit lists (geometric method) - bioconductor-deseq2 + bioconductor-deseq2 @@ -10,19 +10,25 @@ ## Setup R error handling to go to stderr - 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) + } + ) suppressMessages(require(DESeq2)) - countsTable = read.delim("${input}", header=TRUE, check.names=FALSE) - rownames( countsTable )= countsTable[,1] - countsTable= countsTable[ , -1 ] - conds = factor(c(rep ("C", length(countsTable[1,])-1 ), "T")) + countsTable = read.delim("${input}", header = TRUE, check.names = FALSE) + rownames(countsTable ) = countsTable[,1] + countsTable = countsTable[, -1] + conds = factor(c(rep("C", length(countsTable[1, ]) - 1), "T")) cds = DESeqDataSetFromMatrix(countsTable, DataFrame(conds), ~ conds) cds = estimateSizeFactors( cds ) - write.table (as.data.frame(sizeFactors(cds)), file="${output_factors}", row.names=TRUE, col.names=TRUE, quote= FALSE, dec = ".", sep = "\t", eol = "\n") + write.table(as.data.frame(sizeFactors(cds)), file = "${output_factors}", row.names = TRUE, + col.names = TRUE, quote = FALSE, dec = ".", sep = "\t", eol = "\n") norm_table = as.data.frame(counts( cds, normalized=TRUE )) norm_table = cbind(rownames(norm_table), norm_table) - colnames(norm_table) = c("gene", colnames(countsTable) ) - write.table (norm_table, file="${norm_hit_table}", row.names=FALSE, col.names=TRUE, quote= FALSE, dec = ".", sep = "\t", eol = "\n") + colnames(norm_table) = c("gene", colnames(countsTable)) + write.table(norm_table, file = "${norm_hit_table}", row.names = FALSE, col.names = TRUE, + quote = FALSE, dec = ".", sep = "\t", eol = "\n")