Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cpv616/module1_2
  • nma904/module1_2
2 results
Show changes
Commits on Source (5)
#genomeID genomeName ancestor numChr #genomeID genomeName ancestor numChr
28620 Aquilegea 1 7 54057 Amaranthus 1 16
35405 Nelumbo 1 8 19990 Vitis 1 19
57266 Tetracentron 2 19 57266 Tetracentron 2 19
57268 Buxus 2 14 57268 Buxus 2 14
54057 Amaranthus 3 16 28620 Aquilegea 4 7
19990 Vitis 3 19 35405 Nelumbo 4 8
\ No newline at end of file
#genomeID genomeName ancestor numChr #genomeID genomeName ancestor numChr
64965 Vitis 1 19 64965 Vitis 6 19
64962 Prunus 1 8 64962 Prunus 6 8
64734 Quillaja 2 14 64734 Quillaja 5 14
64742 Cercis 3 7 64742 Cercis 4 7
64767 Sindora 4 12 64767 Sindora 3 12
64768 Senna 5 13 64768 Senna 2 13
64963 Phaseolus 6 11 64963 Phaseolus 1 11
64964 Medicago 6 8 64964 Medicago 1 8
...@@ -154,15 +154,21 @@ class GeneFamily: ...@@ -154,15 +154,21 @@ class GeneFamily:
[leaf1.replace("-", ","), leaf2.replace("-", ","), self.find_other_leaves(leaf1, leaf2, all_leaves)]) [leaf1.replace("-", ","), leaf2.replace("-", ","), self.find_other_leaves(leaf1, leaf2, all_leaves)])
newick_tree = newick_tree.replace(newick_tree[last_left: first_right + 1], leaf_pair) newick_tree = newick_tree.replace(newick_tree[last_left: first_right + 1], leaf_pair)
# print(median_structure)
# print(newick_tree) #print(median_structure)
#print(newick_tree)
first_right = newick_tree.find(")") first_right = newick_tree.find(")")
last_left = newick_tree.rfind("(", 0, first_right) last_left = newick_tree.rfind("(", 0, first_right)
# print("FR "+str(first_right)) # print("FR "+str(first_right))
# print("LL "+str(last_left)) # print("LL "+str(last_left))
print("Confirm ancestors:")
for median in median_structure: print(median)
print()
try: try:
neighbours = newick_tree[last_left + 1: first_right].replace(" ", "") neighbours = newick_tree[last_left + 1: first_right].replace(" ", "")
leaf1, leaf2 = neighbours.split(",") leaf1, leaf2 = neighbours.split(",")
...@@ -199,9 +205,12 @@ class GeneFamily: ...@@ -199,9 +205,12 @@ class GeneFamily:
leaves_to_remove = leaves1 + leaves2 leaves_to_remove = leaves1 + leaves2
other_leaves = [leaf[0] for leaf in all_leaves if leaf[0] not in leaves_to_remove] other_leaves = [leaf[0] for leaf in all_leaves if leaf[0] not in leaves_to_remove]
#print("all leaves")
# print(leaves_to_remove) #print(all_leaves)
# print(other_leaves) #print("leaves to remove")
#print(leaves_to_remove)
#print("other leaves")
#print(other_leaves)
result = ','.join(other_leaves) result = ','.join(other_leaves)
......
This diff is collapsed.