Skip to content

Commit 3f451d1

Browse files
committed
attempt to fix #31
ete3 provides a copy function better than with deep copy. standard deep copy has a recursion limit of 1000, which might not be enough for big families
1 parent ad7ec22 commit 3f451d1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

FastOMA/_infer_subhog.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import collections
22
import csv
33
import itertools
4-
from copy import deepcopy
54
from pathlib import Path
65
import gzip
76

@@ -436,7 +435,7 @@ def infer_genetree_from_msa(self, msa):
436435
return genetree
437436

438437
def infer_rooted_genetree(self, gene_tree: TreeNode):
439-
genetree = deepcopy(gene_tree)
438+
genetree = gene_tree.copy()
440439
if self.conf.gene_rooting_method == "midpoint":
441440
r_outgroup = genetree.get_midpoint_outgroup()
442441
genetree.set_outgroup(r_outgroup) # print("Midpoint rooting is done for gene tree.")

0 commit comments

Comments
 (0)