changeset 11:9a7c5b6d8f1e draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dexseq commit 0ccfadf8ac4bc6514836c4efe6f605973a08d1ed
author iuc
date Tue, 02 Apr 2024 12:59:54 +0000
parents df929f257179
children
files dexseq.R dexseq_count.xml macros.xml plotdexseq.R
diffstat 4 files changed, 23 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/dexseq.R	Tue Apr 04 08:25:51 2023 +0000
+++ b/dexseq.R	Tue Apr 02 12:59:54 2024 +0000
@@ -16,8 +16,8 @@
 options(stringAsfactors = FALSE, useFancyQuotes = FALSE)
 args <- commandArgs(trailingOnly = TRUE)
 
-#get options, using the spec as defined by the enclosed list.
-#we read the options from the default: commandArgs(TRUE).
+# get options, using the spec as defined by the enclosed list.
+# we read the options from the default: commandArgs(TRUE).
 spec <- matrix(c(
     "verbose", "v", 2, "integer",
     "help", "h", 0, "logical",
@@ -109,7 +109,7 @@
 export_table <- as.data.frame(res_sorted)
 last_column <- ncol(export_table)
 for (i in seq_len(nrow(export_table))) {
-  export_table[i, last_column] <- paste(export_table[i, last_column][[1]], collapse = ", ")
+    export_table[i, last_column] <- paste(export_table[i, last_column][[1]], collapse = ", ")
 }
 export_table[, c(last_column)] <- sapply(export_table[, c(last_column)], as.character)
 write.table(export_table, file = opt$outfile, sep = "\t", quote = FALSE, row.names = FALSE, col.names = FALSE)
--- a/dexseq_count.xml	Tue Apr 04 08:25:51 2023 +0000
+++ b/dexseq_count.xml	Tue Apr 02 12:59:54 2024 +0000
@@ -16,18 +16,20 @@
     <command><![CDATA[
 #if $mode.mode_select == "prepare":
     dexseq_prepare_annotation.py
-        -r $mode.aggregate
-        '$mode.gtffile'
+        -r '${mode.aggregate}'
+        '${mode.gtffile}'
         '$flattened_gtf_out'
 #elif $mode.mode_select == "count":
+    ln -s -f '${mode.bamfile}' 'input.bam' &&
+    ln -s -f '${mode.bamfile.metadata.bam_index}' 'input.bam.bai' &&
     dexseq_count.py
         --format bam
-        --paired $mode.paired
-        --stranded $mode.stranded
-        --minaqual $mode.qual
-        --order $mode.order
-        $mode.flattened_gtf_in
-        '$mode.bamfile'
+        --paired '${mode.paired}'
+        --stranded '${mode.stranded}'
+        --minaqual '${mode.qual}'
+        --order '${mode.order}'
+        '${mode.flattened_gtf_in}'
+        'input.bam'
         '$counts_file'
     &&
     sed -i 's/\"//g' '$counts_file'
@@ -73,14 +75,14 @@
     </outputs>
 
     <tests>
-        <test>
+        <test expect_num_outputs="1">
             <param name="mode_select" value="prepare" />
             <param name="gtffile" ftype="gff" value="original.gtf"/>
             <param name="aggregate" value="True"/>
             <output name="flattened_gtf_out" ftype="gtf" compare="sim_size" file="flattened.gtf"/>
         </test>
         <!-- Ensure count mode works -->
-        <test>
+        <test expect_num_outputs="1">
             <param name="mode_select" value="count" />
             <param name="bamfile" ftype="bam" value="in.bam" />
             <param name="flattened_gtf_in" ftype="gff" value="flattened.gtf"/>
--- a/macros.xml	Tue Apr 04 08:25:51 2023 +0000
+++ b/macros.xml	Tue Apr 02 12:59:54 2024 +0000
@@ -1,12 +1,11 @@
-<?xml version="1.0"?>
 <macros>
-    <token name="@TOOL_VERSION@">1.44</token>
+    <token name="@TOOL_VERSION@">1.48.0</token>
     <token name="@VERSION_SUFFIX@">0</token>
     <token name="@PROFILE@">22.01</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">bioconductor-dexseq</requirement>
-            <requirement type="package" version="1.20.3">r-getopt</requirement>
+            <requirement type="package" version="1.20.4">r-getopt</requirement>
             <requirement type="package" version="0.2.21">r-rjson</requirement>
         </requirements>
     </xml>
--- a/plotdexseq.R	Tue Apr 04 08:25:51 2023 +0000
+++ b/plotdexseq.R	Tue Apr 02 12:59:54 2024 +0000
@@ -14,8 +14,8 @@
 options(stringAsfactors = FALSE, useFancyQuotes = FALSE)
 args <- commandArgs(trailingOnly = TRUE)
 
-#get options, using the spec as defined by the enclosed list.
-#we read the options from the default: commandArgs(TRUE).
+# get options, using the spec as defined by the enclosed list.
+# we read the options from the default: commandArgs(TRUE).
 spec <- matrix(c(
     "rdata", "r", 1, "character",
     "primaryfactor", "p", 1, "character",
@@ -40,10 +40,12 @@
 
 pdf("plot.pdf")
 for (i in genes) {
-    plotDEXSeq(res, i, FDR = opt$fdr, fitExpToVar = opt$primaryfactor,
+    plotDEXSeq(res, i,
+        FDR = opt$fdr, fitExpToVar = opt$primaryfactor,
         norCounts = opt$normcounts, expression = TRUE, splicing = opt$splicing,
         displayTranscripts = opt$transcripts, names = opt$names, legend = TRUE,
-        color = NULL, color.samples = NULL, transcriptDb = NULL)
+        color = NULL, color.samples = NULL, transcriptDb = NULL
+    )
 }
 dev.off()