Skip to content

Commit

Permalink
Exit gracefully when lookup table not found
Browse files Browse the repository at this point in the history
  • Loading branch information
emjbishop committed Sep 13, 2024
1 parent 7369247 commit 1b3a1d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tcrconvert/convert.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pandas as pd
import sys
from importlib.resources import files

# Standard column names for different sources of TCR data
Expand Down Expand Up @@ -39,6 +40,7 @@ def convert_gene(df, frm, to, frm_cols=[], species='human'):
lookup = pd.read_csv(lookup_f)
except FileNotFoundError:
print('Lookup table not found, please download IMGT reference FASTAs and run build_lookup_from_fastas()')
sys.exit() # Quit

# Warn about no Adaptive C genes
if to == 'adaptive' or to == 'adaptivev2':
Expand Down

0 comments on commit 1b3a1d1

Please sign in to comment.