Mercurial > repos > fubar > differential_count_models
diff rgedgeR/rgedgeRpaired.xml @ 7:8c0405de0695 draft
Uploaded
author | fubar |
---|---|
date | Sat, 27 Jul 2013 01:25:20 -0400 |
parents | f1e6a5f8a611 |
children | a4edc1360ea9 |
line wrap: on
line diff
--- a/rgedgeR/rgedgeRpaired.xml Sat Jul 27 01:07:52 2013 -0400 +++ b/rgedgeR/rgedgeRpaired.xml Sat Jul 27 01:25:20 2013 -0400 @@ -93,7 +93,15 @@ </param> </inputs> <outputs> - <data format="tabular" name="outtab" label="${title}.xls"/> + <data format="tabular" name="out_edgeR" label="${title}_topTable_edgeR.xls"> + <filter>edgeR.doedgeR == "T"</filter> + </data> + <data format="tabular" name="out_DESeq2" label="${title}_topTable_DESeq2.xls"> + <filter>DESeq2.doDESeq2 == "T"</filter> + </data> + <data format="tabular" name="out_VOOM" label="${title}_topTable_VOOM.xls"> + <filter>doVoom == "T"</filter> + </data> <data format="html" name="html_file" label="${title}.html"/> </outputs> <stdio> @@ -367,7 +375,7 @@ -edgeIt = function (Count_Matrix,group,outputfilename,fdrtype='fdr',priordf=5, +edgeIt = function (Count_Matrix,group,out_edgeR=F,out_VOOM=F,out_DESeq2=F,fdrtype='fdr',priordf=5, fdrthresh=0.05,outputdir='.', myTitle='Differential Counts',libSize=c(),useNDF=F, filterquantile=0.2, subjects=c(),mydesign=NULL, doDESeq2=T,doVoom=T,doCamera=T,doedgeR=T,org='hg19', @@ -504,7 +512,7 @@ print(paste('Raw sample read totals',paste(colSums(nonzerod,na.rm=T),collapse=','))) nzd = data.frame(log(nonzerod + 1e-2,10)) boxPlot(rawrs=nzd,cleanrs=log(normData,10),maint='TMM Normalisation',myTitle=myTitle,pdfname="edgeR_raw_norm_counts_box.pdf") - write.table(soutput,outputfilename, quote=FALSE, sep="\t",row.names=F) + write.table(soutput,out_edgeR, quote=FALSE, sep="\t",row.names=F) tt = cbind( Name=as.character(rownames(DGEList\$counts)), DE\$table, @@ -559,7 +567,7 @@ qqPlot(descr=paste(myTitle,'DESeq2 qqplot'),pvector=rDESeq\$pvalue,outpdf='DESeq2_qqplot.pdf') cat("# DESeq top 50\n") print.noquote(srDESeq[1:50,]) - write.table(srDESeq,paste(mt,'DESeq2_TopTable.xls',sep='_'), quote=FALSE, sep="\t",row.names=F) + write.table(srDESeq,out_DESeq2, quote=FALSE, sep="\t",row.names=F) topresults.DESeq = rDESeq[which(rDESeq\$padj < fdrthresh), ] DESeqcountsindex = which(allgenes %in% rownames(topresults.DESeq)) DESeqcounts = rep(0, length(allgenes)) @@ -605,7 +613,7 @@ rownames(rvoom) = rownames(workCM) rvoom = cbind(rvoom,NReads=cmrowsums,URL=contigurls) srvoom = rvoom[order(rvoom\$P.Value),] - write.table(srvoom,paste(mt,'VOOM_topTable.xls',sep='_'), quote=FALSE, sep="\t",row.names=F) + write.table(srvoom,out_VOOM, quote=FALSE, sep="\t",row.names=F) # Use an FDR cutoff to find interesting samples for edgeR, DESeq and voom/limma topresults.voom = srvoom[which(rvoom\$adj.P.Val < fdrthresh), ] voomcountsindex = which(allgenes %in% topresults.voom\$ID) @@ -651,6 +659,9 @@ ###sink(stdout(),append=T,type="message") builtin_gmt="" history_gmt="" +out_edgeR = F +out_DESeq2 = F +out_VOOM = F doDESeq2 = $DESeq2.doDESeq2 # make these T or F doVoom = $doVoom doCamera = F @@ -658,12 +669,16 @@ edgeR_priordf = 0 #if $DESeq2.doDESeq2 == "T" + out_DESeq2 = "$out_DESeq2" DESeq_fitType = "$DESeq2.DESeq_fitType" #end if #if $edgeR.doedgeR == "T" -edgeR_priordf = $edgeR.edgeR_priordf + out_edgeR = "$out_edgeR" + edgeR_priordf = $edgeR.edgeR_priordf #end if - +#if $doVoom == "T" + out_VOOM = "$out_VOOM" +#end if Out_Dir = "$html_file.files_path" Input = "$input1" @@ -716,7 +731,7 @@ group = c(rep(TreatmentName,length(TCols)), rep(ControlName,length(CCols)) ) #Build a group descriptor group = factor(group, levels=c(ControlName,TreatmentName)) colnames(Count_Matrix) = paste(group,colnames(Count_Matrix),sep="_") #Relable columns -results = edgeIt(Count_Matrix=Count_Matrix,group=group,outputfilename=outputfilename, +results = edgeIt(Count_Matrix=Count_Matrix,group=group,out_edgeR=out_edgeR, out_VOOM=out_VOOM, out_DESeq2=out_DESeq2, fdrtype='BH',priordf=edgeR_priordf,fdrthresh=0.05,outputdir='.', myTitle=myTitle,useNDF=F,libSize=c(),filterquantile=fQ,subjects=c(), doDESeq2=doDESeq2,doVoom=doVoom,doCamera=doCamera,doedgeR=doedgeR,org=org,