Skip to content

Commit

Permalink
added unzip command for hla.dat.zip IMGT download
Browse files Browse the repository at this point in the history
  • Loading branch information
jboktor committed Dec 17, 2024
1 parent 9fa54a2 commit ae03617
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def check_ref():
build_fasta()

def fetch_hla_dat():
'''Clones IMGTHLA github to database.'''
'''Clones IMGTHLA github to database and unzips hla.dat if needed.'''

if isdir(IMGTHLA):
run_command(['rm', '-rf', IMGTHLA])
Expand All @@ -94,6 +94,11 @@ def fetch_hla_dat():
run_command(command,
'[reference] Cloning IMGT/HLA database:')

# Check if hla.dat is zipped and unzip it if needed
if isfile(hla_dat + '.zip'):
run_command(['unzip', '-o', hla_dat + '.zip', '-d', dirname(hla_dat)],
'[reference] Unzipping hla.dat file:')

def checkout_version(commithash, verbose = True):
'''Checks out a specific IMGTHLA github version given a commithash.'''

Expand Down

0 comments on commit ae03617

Please sign in to comment.