Skip to content
Snippets Groups Projects
Commit 505cc774 authored by Amandine  PERRIN's avatar Amandine PERRIN
Browse files

Correction of sort_proteins: allow '_' in the genome name

parent 53c88827
No related branches found
No related tags found
No related merge requests found
......@@ -477,8 +477,8 @@ def sort_proteins(x):
return x.split(".")[0], int(x.split(".")[2].split("_")[0]), int(x.split("_")[-1])
# if format is not like this, it must be something_00001:
# sort by 'something' and then 00001
return x.split("_")[0], int(x.split("_")[1])
except IndexError:
return "_".join(x.split("_")[:-1]), int(x.split("_")[-1])
except (IndexError, ValueError):
logger = logging.getLogger("utils")
logger.error(("ERROR: Protein {} does not have the required format. "
"It must contain, at least <alpha-num>_<num_only>, and at best "
......
1 member_1 member_2 member_3
3 member_1 member_10 member_100
9 member_3 member_12 other_member_2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment