Mercurial > repos > artbio > deseq2_normalization
view deseq2_normalization.xml @ 3:71a9c73d989a draft default tip
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/deseq2_normalization commit a4201d38a9ceba983fa0b800dff981bd3a626866
author | artbio |
---|---|
date | Thu, 07 Nov 2024 17:54:47 +0000 |
parents | 8faa01102fbc |
children |
line wrap: on
line source
<tool id="deseq2_normalization" name="DESeq2 normalization" version="1.40.2+galaxy1" profile="22.01"> <description>of hit lists (geometric method)</description> <requirements> <requirement type="package" version="1.40.2">bioconductor-deseq2</requirement> </requirements> <stdio> <exit_code range="1:" level="fatal" description="Tool exception" /> </stdio> <command detect_errors="exit_code"><![CDATA[ Rscript $normalizationDESeq ]]></command> <configfiles> <configfile name="normalizationDESeq"> ## Setup R error handling to go to stderr 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")) 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") 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") </configfile> </configfiles> <inputs> <param name="input" type="data" format="tabular" label="Hit lists of items"/> </inputs> <outputs> <data name="output_factors" format="tabular" label="Normalization Factors (Geometric mean method)" /> <data name="norm_hit_table" format="tabular" label="Normalized Hit Table (Geometric mean method)" /> </outputs> <tests> <test> <param name="input" value="counts.tab" ftype="tabular"/> <output name="output_factors" file="norm_factors.tab" ftype="tabular"/> <output name="norm_hit_table" file="norm_table.tab" ftype="tabular"/> </test> </tests> <help> **What it does** DESeq2_normalization takes a tabular table of raw read counts (integers), each column corresponding to a sample count, and returns (1) the DESeq2 Size Factors (geometic mean method) and (2) a normalized table (floatting number) of counts. **Inputs** The following table gives an example of the tabular input that has to be provided to the tool: <![CDATA[ Geneid Oocyte 1 Oocyte 2 Pronuclei 1 pronuclei 2 NM_001195025 0 0 0 0 NM_028778 0 0 0 0 NM_001290393 0 0 0 0 NM_008922 3133 2276 2288 2659 NM_175370 4 22 7 16 NM_001290390 0 0 0 0 NM_175642 977 1711 1013 459 NM_001290392 0 0 0 0 NM_027671 0 0 0 0 NM_178884 0 0 0 2 NM_199021 332 413 1436 836 NM_198680 0 0 0 0 NM_011465 0 4 0 0 NM_130890 0 0 0 0 NM_001113393 0 0 0 0 NM_001113392 0 0 0 0 NM_001113391 19 3 88 15 NM_031162 0 0 0 0 NR_103716 0 0 0 0 NM_001160371 0 0 0 0 NM_177834 1 3 2 0 NM_145381 606 445 367 306 ]]> </help> <citations> <citation type="doi">10.1186/s13059-014-0550-8</citation> </citations> </tool>