Mercurial > repos > earlhaminst > ete
diff ete_homology_classifier.py @ 13:ed74587a13c8 draft
planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/ete commit 23b3c7c09a7d391b576e3b19f8b34dd63d636bdc
author | earlhaminst |
---|---|
date | Thu, 01 Sep 2022 16:11:32 +0000 |
parents | f1eca1158f21 |
children |
line wrap: on
line diff
--- a/ete_homology_classifier.py Tue Jun 07 08:58:05 2022 +0000 +++ b/ete_homology_classifier.py Thu Sep 01 16:11:32 2022 +0000 @@ -29,7 +29,7 @@ # Genetree nodes are required to be in gene_species format leaves_list = [_ for _ in leaves_list if '_' in _] - species_list = [_.split("_")[1] for _ in leaves_list] + species_list = [_.split("_")[-1] for _ in leaves_list] species_dict = {} for species in species_list: @@ -51,8 +51,8 @@ for leaf2 in leaves_list[i + 1:]: id1 = leaf1.split(":")[1] if ":" in leaf1 else leaf1 id2 = leaf2.split(":")[1] if ":" in leaf2 else leaf2 - species1 = id1.split("_")[1] - species2 = id2.split("_")[1] + species1 = id1.split("_")[-1] + species2 = id2.split("_")[-1] if species1 == species2: homology_type = 'paralogs' else: