diff ribowaltz.R @ 1:042cab870a39 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:31 +0000
parents 6d4c94373bba
children
line wrap: on
line diff
--- a/ribowaltz.R	Thu Sep 22 20:30:54 2022 +0000
+++ b/ribowaltz.R	Mon Oct 23 12:10:31 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