# HG changeset patch # User pavanvidem # Date 1441109948 14400 # Node ID b7e9bf50295c81c9dc227669aa7bb5c6726a5cb8 # Parent a6949dd64d9c6925b852ba51dd93670878e5157d Uploaded diff -r a6949dd64d9c -r b7e9bf50295c dexseq.R --- a/dexseq.R Mon Aug 31 09:51:13 2015 -0400 +++ b/dexseq.R Tue Sep 01 08:19:08 2015 -0400 @@ -18,14 +18,20 @@ 'help', 'h', 0, "logical", 'gtf', 'a', 1, "character", 'outfile', 'o', 1, "character", - 'report', 'r', 1, "character", + 'reportdir', 'r', 1, "character", + 'htmlfile', 'x', 1, "character", 'factors', 'f', 1, "character", 'threads', 'p', 1, "integer", - 'fdr', 'c', 1, "double", + 'fdr', 'c', 1, "double" ), byrow=TRUE, ncol=4); opt = getopt(spec); -setwd(opt$report) + +#reportdir <- gsub(".dat", "_files", opt$outfile) + +dir.create(file.path(opt$reportdir)) +setwd(opt$reportdir) +getwd() # if help was asked for print a friendly message # and exit with a non-zero error code @@ -79,8 +85,9 @@ formulaReducedModel primaryFactor countFiles -opt$report -file.path(opt$report,"DEXSeq_analysis.RData") +opt$reportdir +opt$htmlfile +opt$threads getwd() dxd = DEXSeqDataSetFromHTSeq(countFiles, sampleData=sampleTable, design= formulaFullModel, flattenedfile=opt$gtf) @@ -97,12 +104,14 @@ resSorted <- res[order(res$padj),] head(resSorted) -write.csv(as.data.frame(resSorted), file=opt$outfile) +write.table(as.data.frame(resSorted), file = opt$outfile, sep="\t", quote = FALSE, col.names = FALSE) -if ( !is.null(opt$report) ) { - save(dxd, resSorted, file = file.path(opt$report,"DEXSeq_analysis.RData")) +if ( !is.null(opt$reportdir) ) { + save(dxd, resSorted, file = file.path(opt$reportdir,"DEXSeq_analysis.RData")) save.image() - DEXSeqHTML(res, FDR=opt$fdr, color=c("#C3EEE7","#B7FEA0","#F1E7A1","#CEAEFF","#FF8F43","#EDC3C5","#AAA8AA","#FF0000","#637EE9","#FBFBFB"), BPPARAM=BPPARAM) - unlink(file.path(opt$report,"DEXSeq_analysis.RData")) + DEXSeqHTML(res, path=opt$reportdir, FDR=opt$fdr, color=c("#C3EEE7","#B7FEA0","#F1E7A1","#CEAEFF","#FF8F43","#EDC3C5","#AAA8AA","#FF0000","#637EE9","#FBFBFB")) + unlink(file.path(opt$reportdir,"DEXSeq_analysis.RData")) } +file.remove(opt$htmlfile) +file.symlink(file.path(opt$reportdir,"testForDEU.html"), opt$htmlfile) sessionInfo() diff -r a6949dd64d9c -r b7e9bf50295c dexseq.xml --- a/dexseq.xml Mon Aug 31 09:51:13 2015 -0400 +++ b/dexseq.xml Tue Sep 01 08:19:08 2015 -0400 @@ -1,5 +1,5 @@ - Determines differentially expressed features from count tables + Determines differential exon usage from count tables R Rscript @@ -9,7 +9,7 @@ #import json Rscript /usr/local/galaxy/shed_tools/testtoolshed.g2.bx.psu.edu/repos/pavanvidem/dexseq/cbd118202fd1/dexseq/dexseq.R - #set $reportdir = $dexseq_out.files_path + #set $reportdir = str($dexseq_out).replace('.dat','_files') -o "$dexseq_out" -p 12 #set $temp_factor_names = list() @@ -27,9 +27,12 @@ -f '#echo json.dumps(temp_factor_names)#' -a $gtf #if $report: - -p "$reportdir" + -x "$htmlreport" + -r "$reportdir" #end if - -c $fdr_cutoff + -c $fdr_cutoff; + +## cp #echo os.path.join($reportdir, 'testForDEU.html')# $htmlreport; - - - pdf == True + + + report == True diff -r a6949dd64d9c -r b7e9bf50295c tool_dependencies.xml --- a/tool_dependencies.xml Mon Aug 31 09:51:13 2015 -0400 +++ b/tool_dependencies.xml Tue Sep 01 08:19:08 2015 -0400 @@ -10,6 +10,7 @@ + https://github.com/bgruening/download_store/raw/master/DEXSeq_1.14.2/Cairo_1.5-8.tar.gz https://github.com/bgruening/download_store/raw/master/DEXSeq_1.14.2/rjson_0.2.15.tar.gz https://github.com/bgruening/download_store/raw/master/DEXSeq_1.14.2/getopt_1.20.0.tar.gz https://github.com/bgruening/download_store/raw/master/DEXSeq_1.14.2/lambda.r_1.1.7.tar.gz