Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
haessar committed Oct 2, 2024
2 parents 008d7f6 + 9d4c6bf commit 5bc3ea0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.2.10
v2.2.11
8 changes: 8 additions & 0 deletions bin/split_genes_at_gaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5bc3ea0

Please sign in to comment.