Skip to content

Commit 18b6c67

Browse files
committed
skip download of background files if already present
1 parent be243e4 commit 18b6c67

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ ImRex/data/interim/vdjdb-2022-03-30/
3939
!ImRex/data/interim/vdjdb-2022-03-30/vdjdb.txt
4040

4141
src/scripts/retrain_ImRex/retrain_model_2022.sh
42+
43+
*.html
44+
45+
output/logos/

src/scripts/tcrdist_comparison.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def tcrdist_comparison():
2020
centroids = {'ELAGIGILTV': 'CAWSETGLGTGELFF', 'GILGFVFTL': 'CASSIRSSYEQYF'}
2121
for i in range(2):
2222
df_ep = df[df['antigen.epitope'] == most_ep.index[i]]
23-
# tcrdist_comparison_ep(df_ep)
23+
tcrdist_comparison_ep(df_ep)
2424
imrex_per_ep_attributions(most_ep.index[i], df_ep, centroids[most_ep.index[i]])
2525

2626

@@ -71,9 +71,12 @@ def tcrdist_comparison_ep(df):
7171
# exit()
7272

7373
from tcrsampler.sampler import TCRsampler
74+
import tcrsampler
75+
import os
7476

7577
t = TCRsampler()
76-
# t.download_background_file("ruggiero_human_sampler.zip")
78+
if not os.path.isfile(os.path.join(os.path.dirname(tcrsampler.__file__), "db", "ruggiero_human_sampler.zip")):
79+
t.download_background_file("ruggiero_human_sampler.zip")
7780
tcrsampler_beta = TCRsampler(default_background='ruggiero_human_beta_t.tsv.sampler.tsv')
7881

7982
from tcrdist.adpt_funcs import get_centroid_seq

0 commit comments

Comments
 (0)