changeset 1:e25d81465c23 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ribowaltz commit 416063685092b818a398e00d5027f7fe742230f1
author iuc
date Mon, 23 Oct 2023 12:10:37 +0000
parents 8e903cb3f919
children
files macros.xml ribowaltz.R ribowaltz_plot.R ribowaltz_plot.xml
diffstat 4 files changed, 27 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Thu Sep 22 20:30:20 2022 +0000
+++ b/macros.xml	Mon Oct 23 12:10:37 2023 +0000
@@ -6,6 +6,7 @@
         </requirements>
     </xml>
     <token name="@TOOL_VERSION@">1.2.0</token>
+    <token name="@VERSION_SUFFIX@">0</token>
     <token name="@PROFILE@">21.05</token>
     <xml name="edam_ontology">
         <edam_topics>                                                                                  
--- a/ribowaltz.R	Thu Sep 22 20:30:20 2022 +0000
+++ b/ribowaltz.R	Mon Oct 23 12:10:37 2023 +0000
@@ -21,6 +21,7 @@
   "cds_coverage_info", "Z", 1, "character",
   "psite_info_rdata", "O", 0, "character",
   "refseq_sep", "s", 0, "character",
+  "indel_threshold", "t", 0, "integer",
   "params_duplicate_filterting", "d", 0, "character",
   "params_peridiocity_filterting", "l", 0, "character",
   "params_custom_filterting", "c", 0, "character",
@@ -48,7 +49,7 @@
   sep <- NULL
 }
 # convert alignments in BAM files into list of data tables
-reads_list <- bamtolist(bamfolder = opt$bamdir, annotation = annotation_dt, refseq_sep = sep)
+reads_list <- bamtolist(bamfolder = opt$bamdir, annotation = annotation_dt, refseq_sep = sep, indel_threshold = opt$indel_threshold)
 
 library("jsonlite")
 # remove duplicate reads
@@ -63,21 +64,21 @@
 
 # selection of read lengths - periodicity filtering
 if (!is.null(opt$params_peridiocity_filterting)) {
-    json_peridiocity_filterting <- fromJSON(opt$params_peridiocity_filterting)
-    reads_list <- length_filter(
-      data = reads_list,
-      length_filter_mode = "periodicity",
-      periodicity_threshold = json_peridiocity_filterting$periodicity_threshold
-    )
+  json_peridiocity_filterting <- fromJSON(opt$params_peridiocity_filterting)
+  reads_list <- length_filter(
+    data = reads_list,
+    length_filter_mode = "periodicity",
+    periodicity_threshold = json_peridiocity_filterting$periodicity_threshold
+  )
 }
 # selection of read lengths - length range filtering
 if (!is.null(opt$params_custom_filterting)) {
-    json_custom_filterting <- fromJSON(opt$params_custom_filterting)
-    reads_list <- length_filter(
-      data = reads_list,
-      length_filter_mode = "custom",
-      length_range = json_custom_filterting$length_range
-    )
+  json_custom_filterting <- fromJSON(opt$params_custom_filterting)
+  reads_list <- length_filter(
+    data = reads_list,
+    length_filter_mode = "custom",
+    length_range = json_custom_filterting$length_range
+  )
 }
 
 # compute P-site offset
--- a/ribowaltz_plot.R	Thu Sep 22 20:30:20 2022 +0000
+++ b/ribowaltz_plot.R	Mon Oct 23 12:10:37 2023 +0000
@@ -118,7 +118,7 @@
   print(metaprofile)
   sample_list <- list()
   for (sample_name in names(reads_psite_list)) {
-  sample_list[[sample_name]] <- c(sample_name)
+    sample_list[[sample_name]] <- c(sample_name)
   }
   metaheatmap <- metaheatmap_psite(
     reads_psite_list,
@@ -138,15 +138,15 @@
   pdf("codon_usage.pdf", height = 6, width = 16)
   json_codon_usage_psite <- fromJSON(opt$params_codon_usage_psite)
   for (sample_name in names(reads_psite_list)) {
-  cu_barplot <- codon_usage_psite(
-    reads_psite_list,
-    annotation_dt,
-    sample = sample_name,
-    fastapath = json_codon_usage_psite$fastapath,
-    fasta_genome = FALSE,
-    frequency_normalization = json_codon_usage_psite$frequency
-  )
-  print(cu_barplot[["plot"]])
+    cu_barplot <- codon_usage_psite(
+      reads_psite_list,
+      annotation_dt,
+      sample = sample_name,
+      fastapath = json_codon_usage_psite$fastapath,
+      fasta_genome = FALSE,
+      frequency_normalization = json_codon_usage_psite$frequency
+    )
+    print(cu_barplot[["plot"]])
   }
   dev.off()
 }
--- a/ribowaltz_plot.xml	Thu Sep 22 20:30:20 2022 +0000
+++ b/ribowaltz_plot.xml	Mon Oct 23 12:10:37 2023 +0000
@@ -1,11 +1,11 @@
-<tool id="ribowaltz_plot" name="riboWaltz-plot" version="@VERSION@" profile="@PROFILE@">
+<tool id="ribowaltz_plot" name="riboWaltz-plot" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>visual inspection of ribosome profiling data</description>
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro='requirements'/>
     <expand macro='edam_ontology' />
     <expand macro='xrefs'/>
+    <expand macro='requirements'/>
     <command detect_errors="exit_code"><![CDATA[
         Rscript '${__tool_directory__}/ribowaltz_plot.R' -i '$input_rdata'
         #import json