Skip to content

Commit

Permalink
Update maintenance/main.py
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Ralph <[email protected]>
  • Loading branch information
andrewkern and petrelharp authored Jan 17, 2025
1 parent 69c37bd commit 5753a8a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions maintenance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,13 @@ def black_format(code):


def ensembl_stdpopsim_id(ensembl_id):
# below is do deal with name changes in Ensembl
# TODO: remove this once we have moved to the new names
# this was added as a temporary fix to allow the release to be
# updated to 113, where the names of these species were changed
# in the future we might keep this code block, but comment it out
# to show others how maintenance updates were performed in the case
# where the species name changed in Ensembl
if ensembl_id == "canis_lupus_familiaris":
ensembl_id = "canis_familiaris"
elif ensembl_id == "escherichia_coli_str_k_12_substr_mg1655_gca_000005845":
ensembl_id = "escherichia_coli"
# Here is commented-out example code for dealing with name changes
# in Ensembl: when they changed the Ensembl ID of 'dog' from
# 'canis_familiaris' to 'canis_lupus_familiaris", we inserted these two lines;
# used this script to update `CanFam/genome_data.py` (which also put in
# the new Ensembl ID); and then removed the lines. The code:
# if ensembl_id == "canis_lupus_familiaris":
# ensembl_id = "canis_familiaris"
tmp = ensembl_id.split("_")[:2]
sps_id = "".join([x[0:3].capitalize() for x in tmp])
if len(sps_id) != 6:
Expand Down

0 comments on commit 5753a8a

Please sign in to comment.