Repository 'edger'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/edger

Changeset 12:a8305cf0c951 (2023-09-21)
Previous changeset 11:f2843df56434 (2021-12-18) Next changeset 13:0cb907a2a810 (2023-09-27)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/edger commit 4955aeed800ea8e45057b7e8578dc878a07f9cfc
modified:
edger.R
edger.xml
b
diff -r f2843df56434 -r a8305cf0c951 edger.R
--- a/edger.R Sat Dec 18 16:15:09 2021 +0000
+++ b/edger.R Thu Sep 21 10:01:55 2023 +0000
[
@@ -40,9 +40,9 @@
 time_start <- as.character(Sys.time())
 
 # setup R error handling to go to stderr
-options(show.error.messages = F, error = function() {
+options(show.error.messages = FALSE, error = function() {
   cat(geterrmessage(), file = stderr())
-  q("no", 1, F)
+  q("no", 1, FALSE)
 })
 
 # we need that to not crash galaxy with an UTF8 error on German LC settings.
@@ -105,8 +105,7 @@
     } else if (substring(file, 1L, 1L) == "|") {
       file <- pipe(substring(file, 2L), "w")
       on.exit(close(file))
-    }
-    else {
+    } else {
       file <- file(file, ifelse(append, "a", "w"))
       on.exit(close(file))
     }
@@ -181,7 +180,7 @@
 opt <- getopt(spec)
 
 
-if (is.null(opt$matrixPath) & is.null(opt$filesPath)) {
+if (is.null(opt$matrixPath) && is.null(opt$filesPath)) {
   cat("A counts matrix (or a set of counts files) is required.\n")
   q(status = 1)
 }
@@ -387,7 +386,7 @@
 
 # Name rows of factors according to their sample
 row.names(factors) <- names(data$counts)
-factor_list <- sapply(names(factors), paste_listname)
+factor_list <- names(factors)
 
 # Generating the DGEList object "data"
 samplenames <- colnames(data$counts)
@@ -405,7 +404,7 @@
 }
 
 formula <- formula(formula)
-design <- model.matrix(formula)
+design <- model.matrix(formula, factors)
 
 for (i in seq_along(factor_list)) {
   colnames(design) <- gsub(factor_list[i], "", colnames(design), fixed = TRUE)
b
diff -r f2843df56434 -r a8305cf0c951 edger.xml
--- a/edger.xml Sat Dec 18 16:15:09 2021 +0000
+++ b/edger.xml Thu Sep 21 10:01:55 2023 +0000
[
b'@@ -4,11 +4,8 @@\n     </description>\n     <macros>\n         <token name="@TOOL_VERSION@">3.36.0</token>\n-        <token name="@VERSION_SUFFIX@">0</token>\n+        <token name="@VERSION_SUFFIX@">1</token>\n     </macros>\n-    <xrefs>\n-        <xref type="bio.tools">edger</xref>\n-    </xrefs>\n     <edam_topics>\n         <edam_topic>topic_3308</edam_topic>\n     </edam_topics>\n@@ -16,7 +13,10 @@\n         <edam_operation>operation_3563</edam_operation>\n         <edam_operation>operation_3223</edam_operation>\n     </edam_operations>\n-\n+    <xrefs>\n+        <xref type="bio.tools">edger</xref>\n+        <xref type="bioconductor">edger</xref>\n+    </xrefs>\n     <requirements>\n         <requirement type="package" version="@TOOL_VERSION@">bioconductor-edger</requirement>\n         <requirement type="package" version="3.50.0">bioconductor-limma</requirement>\n@@ -26,11 +26,9 @@\n         <!-- required for alpha function used with plotMD -->\n         <requirement type="package" version="1.1.1">r-scales</requirement>\n     </requirements>\n-\n     <version_command><![CDATA[\n echo $(R --version | grep version | grep -v GNU)", edgeR version" $(R --vanilla --slave -e "library(edgeR); cat(sessionInfo()\\$otherPkgs\\$edgeR\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", limma version" $(R --vanilla --slave -e "library(limma); cat(sessionInfo()\\$otherPkgs\\$limma\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", scales version" $(R --vanilla --slave -e "library(scales); cat(sessionInfo()\\$otherPkgs\\$scales\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", rjson version" $(R --vanilla --slave -e "library(rjson); cat(sessionInfo()\\$otherPkgs\\$rjson\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", getopt version" $(R --vanilla --slave -e "library(getopt); cat(sessionInfo()\\$otherPkgs\\$getopt\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")\n     ]]></version_command>\n-\n     <command detect_errors="exit_code"><![CDATA[\n #import json\n Rscript \'$__tool_directory__/edger.R\'\n@@ -114,58 +112,52 @@\n     && cp \'$__tool_directory__/edger.R\' \'$rscript\'\n #end if\n     ]]></command>\n-\n     <inputs>\n-\n         <!-- Counts and Factors -->\n         <conditional name="input">\n-            <param name="format" type="select" label="Count Files or Matrix?"\n-                help="You can choose to input either separate count files (one per sample) or a single count matrix">\n+            <param name="format" type="select" label="Count Files or Matrix?" help="You can choose to input either separate count files (one per sample) or a single count matrix">\n                 <option value="files">Separate Count Files</option>\n                 <option value="matrix">Single Count Matrix</option>\n             </param>\n-\n             <when value="files">\n                 <repeat name="rep_factor" title="Factor" min="1">\n                     <param name="factorName" type="text" label="Name" help="Name of experiment factor of interest (e.g. Genotype). One factor must be entered and there must be two or more groups per factor. Optional additional factors (e.g. Batch) can be entered using the Insert Factor button below, see Help section for more information. NOTE: Please only use letters, numbers or underscores, and the first character of each factor must be a letter">\n-                    <sanitizer>\n-                        <valid initial="string.letters,string.digits"><add value="_" /></valid>\n-                    </sanitizer>\n+                        <sanitizer>\n+                            <valid initial="string.letters,string.digits">\n+                                <add value="_"/>\n+                            </valid>\n+                        </sanitizer>\n                     </param>\n                     <repeat name="rep_group" title="Group" min="2" default="2">\n-                        <param name="groupName" type="text" label="Name"\n-                        help="Name of group that the counts files belong to (e.g. WT or Mut). NOTE: Please only use letters, numbers or und'..b'>\n-            <output_collection name="outTables" count="1" >\n-                <element name="edgeR_Mut-WT" ftype="tabular" >\n+            <output_collection name="outTables" count="1">\n+                <element name="edgeR_Mut-WT" ftype="tabular">\n                     <assert_contents>\n-                        <has_text_matching expression="GeneID.*logFC.*logCPM.*F.*PValue.*FDR" />\n-                        <has_text_matching expression="11304.*0.4568" />\n-                        <not_has_text text="-0.0682" />\n-                   </assert_contents>\n-               </element>\n-\n+                        <has_text_matching expression="GeneID.*logFC.*logCPM.*F.*PValue.*FDR"/>\n+                        <has_text_matching expression="11304.*0.4568"/>\n+                        <not_has_text text="-0.0682"/>\n+                    </assert_contents>\n+                </element>\n             </output_collection>\n         </test>\n         <!-- Ensure filtering on Total Count works -->\n-        <test>\n-            <param name="format" value="matrix" />\n-            <param name="counts" value="matrix.txt" />\n+        <test expect_num_outputs="2">\n+            <param name="format" value="matrix"/>\n+            <param name="counts" value="matrix.txt"/>\n             <repeat name="rep_factor">\n                 <param name="factorName" value="Genotype"/>\n-                <param name="groupNames" value="Mut,Mut,Mut,WT,WT,WT" />\n+                <param name="groupNames" value="Mut,Mut,Mut,WT,WT,WT"/>\n             </repeat>\n             <repeat name="rep_contrast">\n-                <param name="contrast" value="Mut-WT" />\n+                <param name="contrast" value="Mut-WT"/>\n             </repeat>\n-            <param name="normalisationOption" value="TMM" />\n-            <param name="filt_select" value="yes" />\n-            <param name="format_select" value="counts" />\n+            <param name="normalisationOption" value="TMM"/>\n+            <param name="filt_select" value="yes"/>\n+            <param name="format_select" value="counts"/>\n             <!-- real cntReq values would be a lot lower\n                  this is just for this tiny test dataset -->\n-            <param name="cntReq" value="1000" />\n-            <param name="count_select" value="total" />\n-            <param name="totReq" value="true" />\n-            <output name="outReport" >\n+            <param name="cntReq" value="1000"/>\n+            <param name="count_select" value="total"/>\n+            <output name="outReport">\n                 <assert_contents>\n-                    <has_text text="after summing counts for all samples" />\n-                    <not_has_text text="counts in at least" />\n-                    <not_has_text text="CPM in at least" />\n+                    <has_text text="after summing counts for all samples"/>\n+                    <not_has_text text="counts in at least"/>\n+                    <not_has_text text="CPM in at least"/>\n                 </assert_contents>\n             </output>\n-            <output_collection name="outTables" count="1" >\n-                <element name="edgeR_Mut-WT" ftype="tabular" >\n+            <output_collection name="outTables" count="1">\n+                <element name="edgeR_Mut-WT" ftype="tabular">\n                     <assert_contents>\n-                        <has_text_matching expression="GeneID.*logFC.*logCPM.*F.*PValue.*FDR" />\n-                        <has_text_matching expression="11304.*0.4568" />\n-                        <not_has_text text="-0.0682" />\n-                   </assert_contents>\n-               </element>\n+                        <has_text_matching expression="GeneID.*logFC.*logCPM.*F.*PValue.*FDR"/>\n+                        <has_text_matching expression="11304.*0.4568"/>\n+                        <not_has_text text="-0.0682"/>\n+                    </assert_contents>\n+                </element>\n             </output_collection>\n         </test>\n     </tests>\n-\n     <help><![CDATA[\n .. class:: infomark\n \n'