comparison deseq2.xml @ 0:a903407e3ca0 draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/deseq2 commit f95b47ed1a09ce14d3b565e8ea56d8bf12c35814-dirty
author mvdbeek
date Sat, 05 Mar 2016 07:05:06 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a903407e3ca0
1 <tool id="DESeq2" name="DESeq2 Profiling" version="1.0.2" hidden="true">
2 <description>of readcount lists</description>
3 <requirements>
4 <requirement type="package" version="3.1.2">R</requirement>
5 <requirement type="package" version="2.14">biocbasics</requirement>
6 </requirements>
7 <command>Rscript $DESeq2 </command>
8 <inputs>
9 <param name="input" type="data" format="tabular" label="miR hit lists, more thant 2 samples"/>
10 <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"/>
11 </inputs>
12 <outputs>
13 <data name="output" format="tabular" label="DESeq2 differential calling" />
14 </outputs>
15 <tests>
16 <test>
17 <param name="input" value="counts.tab" ftype="tabular"/>
18 <param name="expPlan" value="CCTTT"/>
19 <output name="output" file="dge.tab.re_match.modified" ftype="tabular" compare="re_match" lines_diff="50"/>
20 </test>
21 </tests>
22 <configfiles>
23 <configfile name="DESeq2">
24 ## Setup R error handling to go to stderr
25 options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
26 suppressMessages(require(DESeq2))
27 ## suppressMessages(require(ReportingTools))
28 countData = read.delim("${input}", header=TRUE, check.names=FALSE)
29 rownames( countData )= countData[,1]
30 countData= countData[ , -1 ]
31 stringconds = "${expPlan}"
32 conds = unlist(strsplit(stringconds, split=""))
33 colData=data.frame(row.names=colnames(countData), condition=conds)
34 dds = DESeqDataSetFromMatrix(countData = countData, colData = colData, design = ~ condition)
35 colData(dds)\$condition = factor(colData(dds)\$condition, levels=c("C","T"))
36 dds = DESeq(dds, quiet=TRUE)
37 res = results(dds)
38 res = res[order(res\$padj),]
39 baseMeanA = rowMeans(counts(dds, normalized=TRUE)[rownames(res),colData(dds)\$condition== "C"])
40 baseMeanB = rowMeans(counts(dds, normalized=TRUE)[rownames(res),colData(dds)\$condition== "T"])
41 res2 = data.frame (gene=rownames(res), baseMeanA=baseMeanA, baseMeanB=baseMeanB, res)
42 ## resNA = res[-which(is.na(res[,8])),] ## omit the NA lignes
43 write.table ( res2, file = "${output}", row.names=FALSE, col.names=TRUE, quote= FALSE, dec = ".", sep = "\t", eol = "\n")
44 ## write.csv(as.data.frame(res), file="${output}")
45 </configfile>
46 </configfiles>
47 <help>
48
49 **What it does**
50
51 DESeq2 differential calling (order by padj, ascending).
52 Still in development and testing for replicates/no replicates
53
54
55 </help>
56 </tool>