diff deseq2_normalization.xml @ 0:6b990f6c6ba9 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/deseq2_normalization commit 9dfb5a5331b87d213f495febbfccff0f54becb73
author artbio
date Mon, 08 Jan 2018 04:21:24 -0500
parents
children ca845e480c89
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deseq2_normalization.xml	Mon Jan 08 04:21:24 2018 -0500
@@ -0,0 +1,109 @@
+<tool id="deseq2_normalization" name="DESeq2 normalization" version="1.0.0">
+	<description>of hit lists (geometric method)</description>
+    <requirements>
+      <requirement type="package" version="1.8.2gx=r3.2.1_0">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=F,  error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
+      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>