changeset 12:74ec758e63a4 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dexseq commit ed4091f895ae0f46323534ca42da290c6e103598
author iuc
date Fri, 31 Jan 2025 18:00:45 +0000
parents 9a7c5b6d8f1e
children
files macros.xml plotdexseq.R plotdexseq.xml test-data/plotdexseq.pdf test-data/plotdexseq_multi.pdf test-data/plotdexseq_multi_custom_dim.pdf
diffstat 6 files changed, 41 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Tue Apr 02 12:59:54 2024 +0000
+++ b/macros.xml	Fri Jan 31 18:00:45 2025 +0000
@@ -1,7 +1,7 @@
 <macros>
     <token name="@TOOL_VERSION@">1.48.0</token>
-    <token name="@VERSION_SUFFIX@">0</token>
-    <token name="@PROFILE@">22.01</token>
+    <token name="@VERSION_SUFFIX@">1</token>
+    <token name="@PROFILE@">23.0</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">bioconductor-dexseq</requirement>
--- a/plotdexseq.R	Tue Apr 02 12:59:54 2024 +0000
+++ b/plotdexseq.R	Fri Jan 31 18:00:45 2025 +0000
@@ -25,7 +25,9 @@
     "transcripts", "t", 1, "logical",
     "names", "a", 1, "logical",
     "normcounts", "n", 1, "logical",
-    "splicing", "s", 1, "logical"
+    "splicing", "s", 1, "logical",
+    "pl_width", "w", 2, "integer",
+    "pl_height", "h", 2, "integer"
 ), byrow = TRUE, ncol = 4)
 opt <- getopt(spec)
 
@@ -38,8 +40,12 @@
     genes <- opt$geneid
 }
 
-pdf("plot.pdf")
+pl_width <- pl_height <- 7
+if (!is.null(opt$pl_width)) pl_width <- opt$pl_width
+if (!is.null(opt$pl_height)) pl_height <- opt$pl_height
+pdf("plot.pdf", width = pl_width, height = pl_height)
 for (i in genes) {
+    par(oma = c(pl_height * 0.2, pl_width * 0.2, pl_height * 0.2, pl_width * 0.2))
     plotDEXSeq(res, i,
         FDR = opt$fdr, fitExpToVar = opt$primaryfactor,
         norCounts = opt$normcounts, expression = TRUE, splicing = opt$splicing,
--- a/plotdexseq.xml	Tue Apr 02 12:59:54 2024 +0000
+++ b/plotdexseq.xml	Fri Jan 31 18:00:45 2025 +0000
@@ -22,9 +22,15 @@
     -a $names
     -n $normcounts
     -s $splicing
+    #if $pl_width:
+    -w $pl_width
+    #end if
+    #if $pl_height:
+    -h $pl_height
+    #end if
     ]]></command>
     <inputs>
-        <param name="rdata" type="data" format="rdata" label="DEXSeqResults object" help="A DEXSeqResults object in RDS format. This can be output from the DEXSeq tool"/>
+        <param name="rdata" type="data" format="rds" label="DEXSeqResults object" help="A DEXSeqResults object in RDS format. This can be output from the DEXSeq tool"/>
         <param name="primaryfactor" type="text" value="FactorName" label="Specify the primary factor name in the DEXSeqResults object" help="Only letters, numbers and underscores will be retained in this field">
             <sanitizer>
                 <valid initial="string.letters,string.digits"><add value="_" /></valid>
@@ -38,7 +44,7 @@
             <when value="single">
                 <param name="geneid" type="text" label="Gene identifier" help="Gene identifier to visualize">
                     <sanitizer>
-                        <valid initial="string.letters,string.digits"><add value="_" /></valid>
+                        <valid initial="string.letters,string.digits,string.punctuation"><add value="_" /></valid>
                     </sanitizer>
                 </param>
             </when>
@@ -51,6 +57,8 @@
         <param name="names" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Display transcript names" help="If Yes, the names of the transcripts are shown. Default: No"/>
         <param name="normcounts" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Plot count values from the individual samples" help="If yes, provides a plot of the counts normalized by the size factors. Default: No"/>
         <param name="splicing" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Plot exon usage" help="If yes, the samples gene expression effects are averaged out, leaving only exon usage coefficients. Default: No" />
+        <param name="pl_width" type="integer" optional="true" value="" label="Width of the plot" help="In inches, Default: 7" />
+        <param name="pl_height" type="integer" optional="true" value="" label="Height of the plot" help="In inches, Default: 7" />
     </inputs>
 
     <outputs>
@@ -61,7 +69,10 @@
         <test expect_num_outputs="1">
             <param name="rdata" ftype="rdata" value="dexseq.rds"/>
             <param name="primaryfactor" value="condition"/>
-            <param name="geneid" value="FBgn0000053"/>
+            <conditional name="genes">
+                <param name="genes_select" value="single" />
+                <param name="geneid" value="FBgn0000053"/>
+            </conditional>
             <param name="fdr_cutoff" value="1"/>
             <output name="dexseq_plot" ftype="pdf" file="plotdexseq.pdf" compare="sim_size"/>
         </test>
@@ -69,10 +80,26 @@
         <test expect_num_outputs="1">
             <param name="rdata" ftype="rdata" value="dexseq.rds"/>
             <param name="primaryfactor" value="condition"/>
-            <param name="genefile" ftype="tabular" value="plotdexseq_genes.tab"/>
+            <conditional name="genes">
+                <param name="genes_select" value="list" />
+                <param name="genefile" ftype="tabular" value="plotdexseq_genes.tab"/>
+            </conditional>
             <param name="fdr_cutoff" value="1"/>
             <output name="dexseq_plot" ftype="pdf" file="plotdexseq_multi.pdf" compare="sim_size"/>
         </test>
+        <!-- Ensure plotting with non-default dimensions works-->
+        <test expect_num_outputs="1">
+            <param name="rdata" ftype="rdata" value="dexseq.rds"/>
+            <param name="primaryfactor" value="condition"/>
+            <conditional name="genes">
+                <param name="genes_select" value="list" />
+                <param name="genefile" ftype="tabular" value="plotdexseq_genes.tab"/>
+            </conditional>
+            <param name="fdr_cutoff" value="1"/>
+            <param name="pl_width" value="5"/>
+            <param name="pl_height" value="3"/>
+            <output name="dexseq_plot" ftype="pdf" file="plotdexseq_multi_custom_dim.pdf" compare="sim_size"/>
+        </test>
     </tests>
     <help><![CDATA[
 .. class:: infomark
Binary file test-data/plotdexseq.pdf has changed
Binary file test-data/plotdexseq_multi.pdf has changed
Binary file test-data/plotdexseq_multi_custom_dim.pdf has changed