Mercurial > repos > mvdbeek > deseq2
view 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 |
line wrap: on
line source
<tool id="DESeq2" name="DESeq2 Profiling" version="1.0.2" hidden="true"> <description>of readcount lists</description> <requirements> <requirement type="package" version="3.1.2">R</requirement> <requirement type="package" version="2.14">biocbasics</requirement> </requirements> <command>Rscript $DESeq2 </command> <inputs> <param name="input" type="data" format="tabular" label="miR hit lists, more thant 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="DESeq2 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="50"/> </test> </tests> <configfiles> <configfile name="DESeq2"> ## 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)) ## suppressMessages(require(ReportingTools)) countData = read.delim("${input}", header=TRUE, check.names=FALSE) rownames( countData )= countData[,1] countData= countData[ , -1 ] stringconds = "${expPlan}" conds = unlist(strsplit(stringconds, split="")) colData=data.frame(row.names=colnames(countData), condition=conds) dds = DESeqDataSetFromMatrix(countData = countData, colData = colData, design = ~ condition) colData(dds)\$condition = factor(colData(dds)\$condition, levels=c("C","T")) dds = DESeq(dds, quiet=TRUE) res = results(dds) res = res[order(res\$padj),] baseMeanA = rowMeans(counts(dds, normalized=TRUE)[rownames(res),colData(dds)\$condition== "C"]) baseMeanB = rowMeans(counts(dds, normalized=TRUE)[rownames(res),colData(dds)\$condition== "T"]) res2 = data.frame (gene=rownames(res), baseMeanA=baseMeanA, baseMeanB=baseMeanB, res) ## resNA = res[-which(is.na(res[,8])),] ## omit the NA lignes write.table ( res2, file = "${output}", row.names=FALSE, col.names=TRUE, quote= FALSE, dec = ".", sep = "\t", eol = "\n") ## write.csv(as.data.frame(res), file="${output}") </configfile> </configfiles> <help> **What it does** DESeq2 differential calling (order by padj, ascending). Still in development and testing for replicates/no replicates </help> </tool>