diff --git a/app/fasta.py b/app/fasta.py index 628aa10eb..ae5db43a4 100644 --- a/app/fasta.py +++ b/app/fasta.py @@ -1,5 +1,6 @@ from pathlib import Path from urllib.request import urlretrieve +from utilities.SPDI_Normalization import init_fasta def download_fasta(): @@ -16,8 +17,6 @@ def download_fasta(): urlretrieve('https://ftp.ncbi.nlm.nih.gov/refseq/H_sapiens/annotation/' + build + '_latest/refseq_identifiers/' + filename, filepath) # Build indexes - # Disable this for now - # if not Path(filepath + '.fxi').is_file(): - # Fasta(filepath) + init_fasta() except Exception as error: print(error) diff --git a/utilities/SPDI_Normalization.py b/utilities/SPDI_Normalization.py index 1424281d9..69efcf9ef 100644 --- a/utilities/SPDI_Normalization.py +++ b/utilities/SPDI_Normalization.py @@ -22,6 +22,11 @@ def get_fasta(file): return fasta_cache[file] +def init_fasta(): + get_fasta(BUILD37_FILE) + get_fasta(BUILD38_FILE) + + def get_normalized_spdi(ref_seq, pos, ref, alt, build): if build == 'GRCh37': GRCh37_ref_seq_fasta = get_fasta(BUILD37_FILE)