view replicateDESeq.xml @ 0:da2dbe13adc2 draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/deseq1_with_replicates commit f95b47ed1a09ce14d3b565e8ea56d8bf12c35814-dirty
author mvdbeek
date Sat, 05 Mar 2016 07:02:52 -0500
parents
children
line wrap: on
line source

<tool id="replicateDESeq" name="DESeq1 Profiling (replicates)" version="1.0.1">
	<description>with sample replicates</description>
        <requirements>
          <requirement type="package" version="3.1.2">R</requirement>
          <requirement type="package" version="2.14">biocbasics</requirement>
        </requirements>
	<command>Rscript $replicateDESeq </command>
	<inputs>
		<param name="input" type="data" format="tabular" label="gene readcount list, more than 2 samples"/>
                <param name="expPlan" type="text" label="experimental plan" help="Use a string of Cs and Ts. exemple: CCCTTT means 3 control samples versus 3 test samples"/>
	</inputs>
	<outputs>
		<data name="output" format="tabular" label="DESeq differential calling" />
	</outputs>
        <tests>
            <test>
                <param name="input" value="counts.tab" ftype="tabular"/>
                <param name="expPlan" value="CCTTT"/>
                <output name="output" file="dge.tab.re_match.modified" ftype="tabular" compare="re_match" lines_diff="5"/>
            </test>
        </tests>
  <configfiles>
    <configfile name="replicateDESeq">
      ## 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(DESeq))
      countsTable = read.delim("${input}", header=TRUE, check.names=FALSE)
      rownames( countsTable )= countsTable[,1]
      countsTable= countsTable[ , -1 ]
      stringconds = "${expPlan}"
      conds = unlist(strsplit(stringconds, split=""))
      cds = newCountDataSet( countsTable, conds )
      cds = estimateSizeFactors( cds )
      cds = estimateDispersions( cds, method="per-condition", sharingMode="maximum") ## was fit-only before 9-12-2013 !! tried for RNAseq - Actually does not change anything !
      ## Attention: fitType="local" is added when parametricDispersionFit fails. remove after use !
      res = nbinomTest( cds, "C", "T" )
      # resNA = res[-which(is.na(res[,8])),] ## omitted the NA lignes, but this was causing a full delete of the table completely devoid of NA !! (not logical but true)
      write.table ( res[order(res[,8]), ], file = "${output}", row.names=FALSE, col.names=TRUE, quote= FALSE, dec = ".", sep = "\t", eol = "\n")
    </configfile>
  </configfiles>
	<help>

**What it does**

DESeq differential calling (order by padj, ascending), on more than two samples, with replicates.


	</help>
</tool>