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><![CDATA[
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input2.gtf Tue Jun 18 05:36:32 2024 +0000 @@ -0,0 +1,8 @@ +chr12 HAVANA gene 11208360 11208972 . - . gene_id "ENSMUSG00000047002.2"; gene_type "protein_coding"; gene_name "Msgn1"; level 2; mgi_id "MGI:1860483"; havana_gene "OTTMUSG00000065713.1"; +chr12 HAVANA transcript 11208360 11208972 . - . gene_id "ENSMUSG00000047002.2"; transcript_id "ENSMUST00000049877.2"; gene_type "protein_coding"; gene_name "Msgn1"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; level 2; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; mgi_id "MGI:1860483"; tag "basic"; tag "appris_principal_1"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_gene "OTTMUSG00000065713.1"; havana_transcript "OTTMUST00000159929.1"; +chr12 HAVANA exon 11208360 11208972 . - . gene_id "ENSMUSG00000047002.2"; transcript_id "ENSMUST00000049877.2"; gene_type "protein_coding"; gene_name "Msgn1"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; exon_number 1; exon_id "ENSMUSE00000372682.2"; level 2; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; mgi_id "MGI:1860483"; tag "basic"; tag "appris_principal_1"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_gene "OTTMUSG00000065713.1"; havana_transcript "OTTMUST00000159929.1"; +chr12 HAVANA CDS 11208385 11208948 . - 0 gene_id "ENSMUSG00000047002.2"; transcript_id "ENSMUST00000049877.2"; gene_type "protein_coding"; gene_name "Msgn1"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; exon_number 1; exon_id "ENSMUSE00000372682.2"; level 2; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; mgi_id "MGI:1860483"; tag "basic"; tag "appris_principal_1"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_gene "OTTMUSG00000065713.1"; havana_transcript "OTTMUST00000159929.1"; +chr12 HAVANA start_codon 11208946 11208948 . - 0 gene_id "ENSMUSG00000047002.2"; transcript_id "ENSMUST00000049877.2"; gene_type "protein_coding"; gene_name "Msgn1"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; exon_number 1; exon_id "ENSMUSE00000372682.2"; level 2; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; mgi_id "MGI:1860483"; tag "basic"; tag "appris_principal_1"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_gene "OTTMUSG00000065713.1"; havana_transcript "OTTMUST00000159929.1"; +chr12 HAVANA stop_codon 11208382 11208384 . - 0 gene_id "ENSMUSG00000047002.2"; transcript_id "ENSMUST00000049877.2"; gene_type "protein_coding"; gene_name "Msgn1"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; exon_number 1; exon_id "ENSMUSE00000372682.2"; level 2; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; mgi_id "MGI:1860483"; tag "basic"; tag "appris_principal_1"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_gene "OTTMUSG00000065713.1"; havana_transcript "OTTMUST00000159929.1"; +chr12 HAVANA UTR 11208360 11208384 . - . gene_id "ENSMUSG00000047002.2"; transcript_id "ENSMUST00000049877.2"; gene_type "protein_coding"; gene_name "Msgn1"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; exon_number 1; exon_id "ENSMUSE00000372682.2"; level 2; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; mgi_id "MGI:1860483"; tag "basic"; tag "appris_principal_1"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_gene "OTTMUSG00000065713.1"; havana_transcript "OTTMUST00000159929.1"; +chr12 HAVANA UTR 11208949 11208972 . - . gene_id "ENSMUSG00000047002.2"; transcript_id "ENSMUST00000049877.2"; gene_type "protein_coding"; gene_name "Msgn1"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; exon_number 1; exon_id "ENSMUSE00000372682.2"; level 2; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; mgi_id "MGI:1860483"; tag "basic"; tag "appris_principal_1"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_gene "OTTMUSG00000065713.1"; havana_transcript "OTTMUST00000159929.1";
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output2.gtf Tue Jun 18 05:36:32 2024 +0000 @@ -0,0 +1,5 @@ +##gff-version 2 +##source-version rtracklayer 1.64.0 +##date 2024-06-17 +chr12 HAVANA exon 11206635 11208972 . - . gene_id "ENSMUSG00000047002.2"; gene_type "protein_coding"; gene_name "Msgn1"; level "2"; mgi_id "MGI:1860483"; havana_gene "OTTMUSG00000065713.1"; transcript_id "ENSMUST00000049877.2"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_transcript "OTTMUST00000159929.1"; exon_number "1"; exon_id "ENSMUSE00000372682.2.ext" +chr12 HAVANA CDS 11208385 11208948 . - 0 gene_id "ENSMUSG00000047002.2"; gene_type "protein_coding"; gene_name "Msgn1"; level "2"; mgi_id "MGI:1860483"; havana_gene "OTTMUSG00000065713.1"; transcript_id "ENSMUST00000049877.2"; transcript_type "protein_coding"; transcript_name "Msgn1-201"; protein_id "ENSMUSP00000055001.1"; transcript_support_level "NA"; tag "CCDS"; ccdsid "CCDS25814.1"; havana_transcript "OTTMUST00000159929.1"; exon_number "1"; exon_id "ENSMUSE00000372682.2"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/second_input2.gtf Tue Jun 18 05:36:32 2024 +0000 @@ -0,0 +1,4 @@ +# stringtie --merge -p 1 -m 50 -c 0 -F 1.0 -T 1.0 -f 0.01 -g 0 -o /corral4/main/jobs/058/624/58624799/outputs/dataset_e626922f-3377-439f-bc63-2193dd017e36.dat /corral4/main/objects/a/e/8/dataset_ae875209-99bf-48a6-bd59-45c943915adc.dat /corral4/main/objects/f/f/5/dataset_ff53bd57-a0dd-43e1-b6b6-90dcfd194387.dat /corral4/main/objects/5/7/6/dataset_576d5eb0-adec-401b-8a75-de23a08db14a.dat +# StringTie version 2.1.7 +chr12 StringTie transcript 11206635 11209072 1000 . . gene_id "MSTRG.1"; transcript_id "MSTRG.1.1"; +chr12 StringTie exon 11206635 11209072 1000 . . gene_id "MSTRG.1"; transcript_id "MSTRG.1.1"; exon_number "1";