From 918f9bca49034a730455f052f934c38f585bbf44 Mon Sep 17 00:00:00 2001 From: William Haese-Hill Date: Mon, 30 Sep 2024 12:14:59 +0100 Subject: [PATCH 1/2] reinstate iterating through all exons to remove leaves with pcall remove_leaf --- bin/split_genes_at_gaps.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/split_genes_at_gaps.lua b/bin/split_genes_at_gaps.lua index aac1663..91de122 100755 --- a/bin/split_genes_at_gaps.lua +++ b/bin/split_genes_at_gaps.lua @@ -95,6 +95,10 @@ function stream:process_current_cluster() local rest = clone_cc(cur_gene) for c in cur_gene:children() do if c:get_range():get_start() > g:get_range():get_end() then + -- ensure c is a leaf by removing any children + for cc in c:direct_children() do + pcall(remove_leaf, c, cc) + end pcall(remove_leaf, cur_gene, c) elseif c:get_range():overlap(g:get_range()) then if c:get_range():get_start() > g:get_range():get_start() - 1 then @@ -117,6 +121,10 @@ function stream:process_current_cluster() end for c in rest:children() do if c:get_range():get_end() < g:get_range():get_start() then + -- ensure c is a leaf by removing any children + for cc in c:direct_children() do + pcall(remove_leaf, c, cc) + end pcall(remove_leaf, rest, c) elseif c:get_range():overlap(g:get_range()) then -- XXX make sure we don't create invalid genes From 9d4c6bf151f17c1982957ae663ffe6171e21c504 Mon Sep 17 00:00:00 2001 From: haessar Date: Mon, 30 Sep 2024 14:38:21 +0000 Subject: [PATCH 2/2] "Update to v2.2.11 in version file" --- .version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.version b/.version index 05e20ae..1917698 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v2.2.10 \ No newline at end of file +v2.2.11 \ No newline at end of file