Skip to content

Commit

Permalink
pylint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GabSal123 committed Mar 1, 2024
1 parent c543127 commit 908e6a9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions data_collection/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def check_if_valid_name(gene,folder_path,raise_exception=False):
"""

correct_symbol = True
with open(folder_path+f'{gene}.txt','r') as rf:
with open(folder_path+f'{gene}.txt','r',encoding='utf-8') as rf:
line = rf.readline()
if 'Error' in line:
correct_symbol = False
Expand All @@ -309,7 +309,6 @@ def check_if_valid_name(gene,folder_path,raise_exception=False):
print(f"Symbol: {gene} does not exist in the LOVD database")



def download_gene_lovd(gene_list:list,folder_path,raise_exception = False):
"""
Downloads data into txt files from gene_list.
Expand All @@ -322,8 +321,4 @@ def download_gene_lovd(gene_list:list,folder_path,raise_exception = False):
for gene in gene_list:
url = f"https://databases.lovd.nl/shared/download/all/gene/{gene}"
get_file_from_url(url,folder_path+f'/{gene}.txt')
check_if_valid_name(gene,folder_path,raise_exception)




git check_if_valid_name(gene,folder_path,raise_exception)

0 comments on commit 908e6a9

Please sign in to comment.