# HG changeset patch # User earlhaminst # Date 1646920904 0 # Node ID 2db72467da510ec5e3d15624f5c024094595086b # Parent 541a2ffc01ff5fb21281a32dc6398d7592c9dd3d "planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/ete commit 67e136d433c0d925db362342919305b46fdffecd" diff -r 541a2ffc01ff -r 2db72467da51 ete_homology_classifier.xml --- a/ete_homology_classifier.xml Fri Nov 20 16:56:22 2020 +0000 +++ b/ete_homology_classifier.xml Thu Mar 10 14:01:44 2022 +0000 @@ -3,7 +3,7 @@ ete_macros.xml - + diff -r 541a2ffc01ff -r 2db72467da51 ete_lineage_generator.py --- a/ete_lineage_generator.py Fri Nov 20 16:56:22 2020 +0000 +++ b/ete_lineage_generator.py Thu Mar 10 14:01:44 2022 +0000 @@ -41,7 +41,14 @@ RANK_IDX: mapping from rank names to indices (distance to root/leaf?) lower: use lower taxa for filling "NA"s """ - lineage_taxids = ncbi.get_lineage(taxid) + try: + lineage_taxids = ncbi.get_lineage(taxid) + except ValueError: + sys.stderr.write("[%s] could not determine lineage!\n" % taxid) + return + if lineage_taxids is None: + sys.stderr.write("[%s] could not determine lineage!\n" % taxid) + return lineage_ranks = ncbi.get_rank(lineage_taxids) lineage_names = ncbi.get_taxid_translator(lineage_taxids, try_synonyms=True) if lower: @@ -121,6 +128,8 @@ with open(options.input_species_filename) as f: for line in f.readlines(): line = line.strip().replace('_', ' ') + if line == "": + continue try: taxid = int(line) except ValueError: diff -r 541a2ffc01ff -r 2db72467da51 ete_lineage_generator.xml --- a/ete_lineage_generator.xml Fri Nov 20 16:56:22 2020 +0000 +++ b/ete_lineage_generator.xml Thu Mar 10 14:01:44 2022 +0000 @@ -1,4 +1,4 @@ - + from a list of species/taxids using the ETE Toolkit ete_macros.xml @@ -120,6 +120,19 @@ + + + + + + + + + + + + +