Mercurial > repos > iuc > limma_voom
changeset 13:d5a940112511 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/limma_voom commit 8560b34a261fde200bd77dc2e817d55d386ac811
author | iuc |
---|---|
date | Sun, 30 Sep 2018 10:51:29 -0400 |
parents | 81796eb60bd0 |
children | 3133e833b3ce |
files | limma_voom.R limma_voom.xml |
diffstat | 2 files changed, 42 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/limma_voom.R Sun Aug 05 05:13:12 2018 -0400 +++ b/limma_voom.R Sun Sep 30 10:51:29 2018 -0400 @@ -371,8 +371,8 @@ topOut[i] <- makeOut(paste0(deMethod, "_", con, ".tsv")) glimmaOut[i] <- makeOut(paste0("glimma_", con, "/MD-Plot.html")) } -filtOut <- makeOut(paste0(deMethod, "_filtcounts.tsv")) -normOut <- makeOut(paste0(deMethod, "_normcounts.tsv")) +filtOut <- makeOut(paste0(deMethod, "_", "filtcounts")) +normOut <- makeOut(paste0(deMethod, "_", "normcounts")) rdaOut <- makeOut(paste0(deMethod, "_analysis.RData")) sessionOut <- makeOut("session_info.txt") @@ -451,7 +451,7 @@ print("Outputting filtered counts") filt_counts <- data.frame(data$genes, data$counts) write.table(filt_counts, file=filtOut, row.names=FALSE, sep="\t", quote=FALSE) - linkData <- rbind(linkData, data.frame(Label=paste0(deMethod, "_", "filtcounts.tsv"), Link=paste0(deMethod, "_", "filtcounts.tsv"), stringsAsFactors=FALSE)) + linkData <- rbind(linkData, data.frame(Label=paste0(deMethod, "_", "filtcounts.tsv"), Link=paste0(deMethod, "_", "filtcounts"), stringsAsFactors=FALSE)) } # Plot Density @@ -723,7 +723,7 @@ # Save normalised counts (log2cpm) if (wantNorm) { write.table(logCPM, file=normOut, row.names=TRUE, sep="\t", quote=FALSE) - linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts.tsv")))) + linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts")))) } } else { # limma-voom approach @@ -774,7 +774,7 @@ if (wantNorm) { norm_counts <- data.frame(vData$genes, vData$E) write.table(norm_counts, file=normOut, row.names=FALSE, sep="\t", quote=FALSE) - linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts.tsv")))) + linkData <- rbind(linkData, c((paste0(deMethod, "_", "normcounts.tsv")), (paste0(deMethod, "_", "normcounts")))) } # Fit linear model and estimate dispersion with eBayes @@ -1052,7 +1052,9 @@ cata("<h4>Tables:</h4>\n") for (i in 1:nrow(linkData)) { - if (grepl(".tsv", linkData$Link[i])) { + if (grepl("counts$", linkData$Link[i])) { + HtmlLink(linkData$Link[i], linkData$Label[i]) + } else if (grepl(".tsv", linkData$Link[i])) { HtmlLink(linkData$Link[i], linkData$Label[i]) } }
--- a/limma_voom.xml Sun Aug 05 05:13:12 2018 -0400 +++ b/limma_voom.xml Sun Sep 30 10:51:29 2018 -0400 @@ -1,4 +1,4 @@ -<tool id="limma_voom" name="limma" version="3.34.9.8"> +<tool id="limma_voom" name="limma" version="3.34.9.9"> <description> Perform differential expression with limma-voom or limma-trend </description> @@ -123,8 +123,13 @@ #if $anno.annoOpt=='yes': cp -r ./glimma* '$outReport.files_path' && #end if + cp '$outReport.files_path'/*tsv output_dir/ +#if $out.filtCounts or $out.normCounts: + && cp '$outReport.files_path'/*counts output_dir/ +#end if + #if $out.rscript: && cp '$__tool_directory__/limma_voom.R' '$rscript' #end if @@ -328,9 +333,15 @@ <outputs> <data name="outReport" format="html" label="${tool.name} on ${on_string}: Report" /> - <collection name="outTables" type="list" label="${tool.name} on ${on_string}: Tables"> + <collection name="outTables" type="list" label="${tool.name} on ${on_string}: DE tables"> <discover_datasets pattern="(?P<name>.+)\.tsv$" format="tabular" directory="output_dir" visible="false" /> </collection> + <data name="outFilt" format="tabular" from_work_dir="output_dir/*_filtcounts" label="${tool.name} on ${on_string}: Filtered counts"> + <filter>out['filtCounts']</filter> + </data> + <data name="outNorm" format="tabular" from_work_dir="output_dir/*_normcounts" label="${tool.name} on ${on_string}: Normalised counts"> + <filter>out['normCounts']</filter> + </data> <data name="rscript" format="txt" label="${tool.name} on ${on_string}: Rscript"> <filter>out['rscript']</filter> </data> @@ -493,27 +504,27 @@ <param name="cntSampleReq" value="3"/> <param name="normalisationOption" value="TMM" /> <param name="topgenes" value="6" /> - <output_collection name="outTables" count="3"> + <output_collection name="outTables" count="1"> <element name="limma-voom_Mut-WT" ftype="tabular" > <assert_contents> <has_text_matching expression="GeneID.*logFC.*AveExpr.*t.*P.Value.*adj.P.Val.*B" /> <has_text_matching expression="11304.*0.45.*15.52.*4.94.*7.74.*0.0001.*5.27" /> </assert_contents> </element> - <element name="limma-voom_normcounts" ftype="tabular" > - <assert_contents> - <has_text_matching expression="GeneID.*Mut1.*Mut2.*Mut3.*WT1.*WT2.*WT3" /> - <has_text_matching expression="11304.*15.7.*15.8.*15.6.*15.3.*15.2.*15.2" /> - </assert_contents> - </element> - <element name="limma-voom_filtcounts" ftype="tabular" > - <assert_contents> - <has_text_matching expression="GeneID.*Mut1.*Mut2.*Mut3.*WT1.*WT2.*WT3" /> - <has_text_matching expression="11304.*361.*397.*346.*356.*312.*337" /> - <not_has_text text="11302"/> - </assert_contents> - </element> </output_collection> + <output name="outNorm" ftype="tabular" > + <assert_contents> + <has_text_matching expression="GeneID.*Mut1.*Mut2.*Mut3.*WT1.*WT2.*WT3" /> + <has_text_matching expression="11304.*15.7.*15.8.*15.6.*15.3.*15.2.*15.2" /> + </assert_contents> + </output> + <output name="outFilt" ftype="tabular" > + <assert_contents> + <has_text_matching expression="GeneID.*Mut1.*Mut2.*Mut3.*WT1.*WT2.*WT3" /> + <has_text_matching expression="11304.*361.*397.*346.*356.*312.*337" /> + <not_has_text text="11302"/> + </assert_contents> + </output> </test> <!-- Ensure multiple counts files input works --> <test> @@ -554,7 +565,7 @@ </repeat> <param name="topgenes" value="6" /> <param name="normCounts" value="true" /> - <output_collection name="outTables" count="3"> + <output_collection name="outTables" count="2"> <element name="limma-voom_Mut-WT" ftype="tabular" > <assert_contents> <has_text_matching expression="logFC.*AveExpr.*t.*P.Value.*adj.P.Val.*B" /> @@ -567,13 +578,13 @@ <has_text_matching expression="11304.*Abca4.*-0.4590" /> </assert_contents> </element> - <element name="limma-voom_normcounts" ftype="tabular" > - <assert_contents> - <has_text_matching expression="EntrezID.*Symbol.*Mut1.*Mut2.*Mut3.*WT1.*WT2.*WT3" /> - <has_text_matching expression="11304.*Abca4.*15.7545" /> - </assert_contents> - </element> </output_collection> + <output name="outNorm" ftype="tabular" > + <assert_contents> + <has_text_matching expression="EntrezID.*Symbol.*Mut1.*Mut2.*Mut3.*WT1.*WT2.*WT3" /> + <has_text_matching expression="11304.*Abca4.*15.7545" /> + </assert_contents> + </output> </test> <!-- Ensure limma-trend option works --> <test>