Mercurial > repos > iuc > brew3r_r
changeset 1:3198f52bffaa draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/brew3r_r commit fa525468780f3dea175da15852b1b8c17e1a80d3
| author | iuc |
|---|---|
| date | Tue, 18 Jun 2024 05:36:32 +0000 |
| parents | 928a52b5c938 |
| children | 05f8e9d1e8b8 |
| files | brew3r.r_script.R brew3r_r.xml test-data/input2.gtf test-data/output2.gtf test-data/second_input2.gtf |
| diffstat | 5 files changed, 37 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/brew3r.r_script.R Tue Jun 11 08:26:37 2024 +0000 +++ b/brew3r.r_script.R Tue Jun 18 05:36:32 2024 +0000 @@ -91,17 +91,23 @@ multi.strand.query <- ov.simple$queryHits[duplicated(ov.simple$queryHits)] to.remove <- unstranded.intervals[multi.strand.query] # Remove these potentially error-prone intervals from the template - input_gr_template <- input_gr_template[-to.remove] + if (length(to.remove) > 0) { + input_gr_template <- input_gr_template[-to.remove] + } } } # Run BREW3R.r main function -new_gr_exons <- extend_granges( - input_gr_to_extend = input_gr_to_extend, - input_gr_to_overlap = input_gr_template, - add_new_exons = is.null(opt$no_add), - overlap_resolution_fn = opt$sup_output -) +if (length(input_gr_template) > 0) { + new_gr_exons <- extend_granges( + input_gr_to_extend = input_gr_to_extend, + input_gr_to_overlap = input_gr_template, + add_new_exons = is.null(opt$no_add), + overlap_resolution_fn = opt$sup_output + ) +} else { + new_gr_exons <- subset(input_gr_to_extend, type == "exon") +} # Prevent extension using pattern if (!is.null(opt$exclude_pattern)) { input_gr_pattern <- subset(
--- a/brew3r_r.xml Tue Jun 11 08:26:37 2024 +0000 +++ b/brew3r_r.xml Tue Jun 18 05:36:32 2024 +0000 @@ -1,7 +1,7 @@ <tool id="brew3r_r" name="BREW3R.r" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT"> <description>Extend GTF</description> <macros> - <token name="@TOOL_VERSION@">1.0.1</token> + <token name="@TOOL_VERSION@">1.0.2</token> <token name="@VERSION_SUFFIX@">0</token> </macros> <edam_topics> @@ -114,6 +114,12 @@ </assert_contents> </output> </test> + <test expect_num_outputs="1"> + <param name="gtf_to_extend" value="input2.gtf"/> + <param name="gtf_to_overlap" value="second_input2.gtf"/> + <param name="filter_unstranded" value="true"/> + <output name="output" value="output2.gtf" compare="diff" lines_diff="2"/> + </test> </tests> <help><