Mercurial > repos > iuc > ribowaltz_process
comparison 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 |
comparison
equal
deleted
inserted
replaced
0:6d4c94373bba | 1:042cab870a39 |
---|---|
19 "gtffile", "g", 1, "character", | 19 "gtffile", "g", 1, "character", |
20 "codon_coverage_info", "Y", 1, "character", | 20 "codon_coverage_info", "Y", 1, "character", |
21 "cds_coverage_info", "Z", 1, "character", | 21 "cds_coverage_info", "Z", 1, "character", |
22 "psite_info_rdata", "O", 0, "character", | 22 "psite_info_rdata", "O", 0, "character", |
23 "refseq_sep", "s", 0, "character", | 23 "refseq_sep", "s", 0, "character", |
24 "indel_threshold", "t", 0, "integer", | |
24 "params_duplicate_filterting", "d", 0, "character", | 25 "params_duplicate_filterting", "d", 0, "character", |
25 "params_peridiocity_filterting", "l", 0, "character", | 26 "params_peridiocity_filterting", "l", 0, "character", |
26 "params_custom_filterting", "c", 0, "character", | 27 "params_custom_filterting", "c", 0, "character", |
27 "params_psite_additional", "p", 0, "character", | 28 "params_psite_additional", "p", 0, "character", |
28 "params_coverage_additional", "C", 0, "character" | 29 "params_coverage_additional", "C", 0, "character" |
46 sep <- opt$refseq_sep | 47 sep <- opt$refseq_sep |
47 if (opt$refseq_sep == "") { | 48 if (opt$refseq_sep == "") { |
48 sep <- NULL | 49 sep <- NULL |
49 } | 50 } |
50 # convert alignments in BAM files into list of data tables | 51 # convert alignments in BAM files into list of data tables |
51 reads_list <- bamtolist(bamfolder = opt$bamdir, annotation = annotation_dt, refseq_sep = sep) | 52 reads_list <- bamtolist(bamfolder = opt$bamdir, annotation = annotation_dt, refseq_sep = sep, indel_threshold = opt$indel_threshold) |
52 | 53 |
53 library("jsonlite") | 54 library("jsonlite") |
54 # remove duplicate reads | 55 # remove duplicate reads |
55 if (!is.null(opt$params_duplicate_filterting)) { | 56 if (!is.null(opt$params_duplicate_filterting)) { |
56 json_duplicate_filterting <- fromJSON(opt$params_duplicate_filterting) | 57 json_duplicate_filterting <- fromJSON(opt$params_duplicate_filterting) |
61 ) | 62 ) |
62 } | 63 } |
63 | 64 |
64 # selection of read lengths - periodicity filtering | 65 # selection of read lengths - periodicity filtering |
65 if (!is.null(opt$params_peridiocity_filterting)) { | 66 if (!is.null(opt$params_peridiocity_filterting)) { |
66 json_peridiocity_filterting <- fromJSON(opt$params_peridiocity_filterting) | 67 json_peridiocity_filterting <- fromJSON(opt$params_peridiocity_filterting) |
67 reads_list <- length_filter( | 68 reads_list <- length_filter( |
68 data = reads_list, | 69 data = reads_list, |
69 length_filter_mode = "periodicity", | 70 length_filter_mode = "periodicity", |
70 periodicity_threshold = json_peridiocity_filterting$periodicity_threshold | 71 periodicity_threshold = json_peridiocity_filterting$periodicity_threshold |
71 ) | 72 ) |
72 } | 73 } |
73 # selection of read lengths - length range filtering | 74 # selection of read lengths - length range filtering |
74 if (!is.null(opt$params_custom_filterting)) { | 75 if (!is.null(opt$params_custom_filterting)) { |
75 json_custom_filterting <- fromJSON(opt$params_custom_filterting) | 76 json_custom_filterting <- fromJSON(opt$params_custom_filterting) |
76 reads_list <- length_filter( | 77 reads_list <- length_filter( |
77 data = reads_list, | 78 data = reads_list, |
78 length_filter_mode = "custom", | 79 length_filter_mode = "custom", |
79 length_range = json_custom_filterting$length_range | 80 length_range = json_custom_filterting$length_range |
80 ) | 81 ) |
81 } | 82 } |
82 | 83 |
83 # compute P-site offset | 84 # compute P-site offset |
84 json_psite_additional <- fromJSON(opt$params_psite_additional) | 85 json_psite_additional <- fromJSON(opt$params_psite_additional) |
85 psite_offset <- psite( | 86 psite_offset <- psite( |